pg_restore has problems with restoring sequences. - Mailing list pgsql-admin

From robert
Subject pg_restore has problems with restoring sequences.
Date
Msg-id 129cd073-60bf-96db-e129-24bd9a37319e@redcor.ch
Whole thread Raw
Responses Re: pg_restore has problems with restoring sequences.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
Hi there,

I want to restore data from a box running V10 in a docker to my local box.

I use

     pg_dump -h localhost  -U USER -Fc DATABASE > dumpfile

then I restore it with:

     dropdb DATABASE

     pg_restore -O  -U user  -d DATABASE  dumpfile


doing this then I get these warnings, and many (not all) sequences are not created.


pg_restore: [archiver (db)] Error from TOC entry 15277; 0 0 SEQUENCE SET 
selected_event_zone_id_seq odoo
pg_restore: [archiver (db)] could not execute query: ERROR: relation 
"selected_event_zone_id_seq" does not exist
LINE 1: SELECT pg_catalog.setval('selected_event_zone_id_seq', 6, tr...
                                  ^
     Command was: SELECT pg_catalog.setval('selected_event_zone_id_seq', 6, true);

WARNING: errors ignored on restore: 20


how can I fix this.

This procedure never was problematic using postgresql 9.X


thanks

robert



pgsql-admin by date:

Previous
From: bob gailer
Date:
Subject: PG Admin questions
Next
From: Tom Lane
Date:
Subject: Re: pg_restore has problems with restoring sequences.