Erwin de Haan <erwin.de.haan@xxxxxxxxxx> 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