From: Tom Lane <tgl@sss.pgh.pa.us>
To: Zsolt Ero <zsolt.ero@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16732: pg_dump creates broken backups
Date: Fri, 20 Nov 2020 11:28:33 -0500
Message-ID: <1303022.1605889713@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKw-smD2cRb_ZnOfm45yoH4CStLZwCbcRxUR50+A4BMWm9RVgA@mail.gmail.com>
References: <16732-f34c8da8c206c290@postgresql.org>
<CAKw-smD2cRb_ZnOfm45yoH4CStLZwCbcRxUR50+A4BMWm9RVgA@mail.gmail.com>
Zsolt Ero <zsolt.ero@gmail.com> writes:
> Sorry this is not so general, I over-simplified the example. The key is
> --use-list (with possibly --jobs)
> What I've double checked is that the following breaks it consistently:
> pg_restore --schema-only --dbname=app --format=custom --single-transaction
> $BACKUP_FILE
> pg_restore --list $BACKUP_FILE > dump_list.full
> pg_restore --data-only --dbname=app --format=custom
> --use-list=dump_list.full --jobs=4 $BACKUP_FILE
I suspect actually the problem has more to do with having split the
restore into --schema-only and --data-only steps. That forces
pg_restore to create the FK constraints before it's loaded the
data, and in certain cases such as circular FK relationships,
there will be no safe restore order for the data.
However, that's all just speculation since you haven't shown us
a reproducible case.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, zsolt.ero@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16732: pg_dump creates broken backups
In-Reply-To: <1303022.1605889713@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox