From: Tom Lane <tgl@sss.pgh.pa.us>
To: Erwin de Haan <erwin.de.haan@calcasa.nl>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: pg_restore with -j > 1 breaks the "clean" phase by not removing dependencies in order
Date: Mon, 18 Mar 2024 10:40:42 -0400
Message-ID: <3563773.1710772842@sss.pgh.pa.us> (raw)
In-Reply-To: <DU2PR01MB862463D00FF021DB969FE61CC82D2@DU2PR01MB8624.eurprd01.prod.exchangelabs.com>
References: <DU2PR01MB862463D00FF021DB969FE61CC82D2@DU2PR01MB8624.eurprd01.prod.exchangelabs.com>
Erwin de Haan <erwin.de.haan@calcasa.nl> writes:
> I'm having some trouble getting parallel restores to work. When running pg_restore like this:
> pg_restore --no-password --host=$MAIN_CLUSTER-pg-cluster --port=5432 --dbname=$name --jobs=4 --format=d --no-owner --clean --if-exists --disable-triggers --role=${name}_owner "/temp_data/data-$name-$UNIQUE_SUFFIX"
> the restore errors on foreign key constraints while removing tables, is there anyway to keep this parallel but have it respect the tree of dependencies.
pg_restore does not parallelize the DROP stage of the process, so
I can't help thinking you've misidentified the source of the problem.
Can you provide a concrete example that misbehaves?
Also, what PG version is this?
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-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, erwin.de.haan@calcasa.nl
Subject: Re: pg_restore with -j > 1 breaks the "clean" phase by not removing dependencies in order
In-Reply-To: <3563773.1710772842@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