Re: [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering) - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering)
Date
Msg-id 11788.1496715105@sss.pgh.pa.us
Whole thread Raw
In response to [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering)  (Ken Tanzer <ken.tanzer@gmail.com>)
Responses Re: [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering)  (Ken Tanzer <ken.tanzer@gmail.com>)
List 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 by date:

Previous
From: Scott Mead
Date:
Subject: Re: [GENERAL] Unable to install EASM postgre due to error 8023
Next
From: Garry Sim
Date:
Subject: Re: [GENERAL] Unable to install EASM postgre due to error 8023