pg_restore -j 4 -d mydb mydb.dump

Category: Databases & SQL

pg_restore -j 4 -d mydb mydb.dump

Restore a backup with parallel workers

-j 4 restores tables concurrently, which speeds up large restores dramatically; it requires a custom or directory format dump. One worker's error does not stop the others, so add --exit-on-error for strict behavior. Related: pg_dump -Fc.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.