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
steps followed:
add new tables to DB and took dump
delete the newly added tables
try restore with dump file
restore exited with code 1 but still tables are restore successfully.
error in pg_restore:
pg_restore: [archiver (db)] could not execute query: err-1: table "test1" does not exist
Command was: DROP TABLE public.test1;
WARNING: errors ignored on restore: 2
Is this the expected behavior for dump/restore feature with tables add/delete steps?