pg_restore problem to load constraints with tables

Started by Fabrice Chapuisalmost 2 years ago2 messages
#1Fabrice Chapuis
fabrice636861@gmail.com

Hi,
When a table is reloaded wit pg_restore, it is recreated without indexes or
constraints. There are automatically skipped. Is there a reason for this?

g_restore -j 8 -v -d zof /shared/pgdump/aq/backup/dbtest/shtest --no-owner
--role=test -t mytable 2>&1 | tee -a dbest.log

pg_restore: skipping item 7727 SEQUENCE SET xxx_seq
pg_restore: skipping item 5110 INDEX xxxxx_cons
pg_restore: skipping item 5143 CONSTRAINT xxx
pg_restore: skipping item 5670 FK CONSTRAINT xxx

Thanks for your feedback

Fabrice

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Fabrice Chapuis (#1)
Re: pg_restore problem to load constraints with tables

Fabrice Chapuis <fabrice636861@gmail.com> writes:

When a table is reloaded wit pg_restore, it is recreated without indexes or
constraints. There are automatically skipped. Is there a reason for this?

[ shrug ] That's how the -t switch is defined. If you want something
else, you can use the -l and -L switches to pick out a custom
collection of objects to restore.

regards, tom lane