From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com> |
Cc: | PG-General Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Help with restoring a dump in Tar format? (dependencies/ordering) |
Date: | 2017-06-06 02:11:45 |
Message-ID: | 11788.1496715105@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Ken Tanzer <ken(dot)tanzer(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Garry Sim | 2017-06-06 02:13:03 | Re: Unable to install EASM postgre due to error 8023 |
Previous Message | Scott Mead | 2017-06-06 02:09:37 | Re: Unable to install EASM postgre due to error 8023 |