Re: pg_restore with -j > 1 breaks the "clean" phase by not removing dependencies in order - Mailing list pgsql-admin

From Tom Lane
Subject Re: pg_restore with -j > 1 breaks the "clean" phase by not removing dependencies in order
Date
Msg-id 3563773.1710772842@sss.pgh.pa.us
Whole thread Raw
In response to pg_restore with -j > 1 breaks the "clean" phase by not removing dependencies in order  (Erwin de Haan <erwin.de.haan@calcasa.nl>)
List pgsql-admin
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
itrespect 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



pgsql-admin by date:

Previous
From: Ron Johnson
Date:
Subject: Re: pg_restore with -j > 1 breaks the "clean" phase by not removing dependencies in order
Next
From: M Sarwar
Date:
Subject: Prefixing few more columns to CROSSTAB result set- Row-Data