commands:
bin/pg_dump -b -o -Fc -Z 0 -p 5333 -U user template1 -f db.dump
bin/pg_restore -c -h localhost -p 5333 -U user -d template1 db.dump
:
add new tables to the database and take dump
delete newly added tables
try to restore the dump file
recovery completed with code 1, but still the tables are successfully restored.
error in pg_restore:
pg_restore: [archiver (db)] query failed: err-1: table "test1" does not exist
Command: DROP TABLE public.test1;
WARNING: errors are ignored during recovery: 2
Is this the expected behavior for the dump / restore function when adding / removing tables?
Rasna source
share