Re: [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering)
| От | Tom Lane |
|---|---|
| Тема | Re: [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering) |
| Дата | |
| Msg-id | 11788.1496715105@sss.pgh.pa.us обсуждение |
| Ответ на | [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering) (Ken Tanzer <ken.tanzer@gmail.com>) |
| Ответы |
Re: [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering)
|
| Список | pgsql-general |
Ken Tanzer <ken.tanzer@gmail.com> writes:
> ...The rest of the DB is fine, but tbl_payment has 0 rows. I believe this is
> because tbl_payment has a constraint that calls a function has_perm() that
> relies on data in a couple of other tables, and that tbl_payment is being
> restored before those tables. I was able to created a new dump in Custom
> format, reorder the List file, and restore that successfully.
> So I can switch to Custom format for future backups. But regarding the
> existing backups I have in Tar format, is there any way to successfully
> restore them?
FWIW, the business with making and editing a list file should work just
fine with a tar-format dump, not only with a custom-format dump. The
metadata is all there in either case.
As already noted, it's hard to get pg_dump/pg_restore to cope
automatically with hidden dependencies like what you have here.
The fact that those other tables would need to be restored first
simply isn't visible to pg_dump.
regards, tom lane
В списке pgsql-general по дате отправления: