Sequence error postgres 9 to 10

786 views Asked by At

I'm trying to migrate my PostgreSQL 9.6.3 to 10.4. The restore seems to work correctly on the data, but i'm losing the sequences. I'm having erros like: "Column 'min_value' does not exists", "Column not found in pgSet: last_values"... It seems that PG 10 has a different way of working with sequences. My question is: Is there a way to restore a backp from PG 9 to 10 without losing data from the sequences?

Thank you.

1

There are 1 answers

2
Laurenz Albe On

You cannot do that without editing the dump from 9.6 before loading it.

The correct way to upgrade a database with dump/restore is to use pg_dump or pg_dumpall from the v10 installation to perform the dump. That is the supported way.