IT lexicon › Database › pg_dump

pg_dump

Database På svenska → Updated: 2026-07-29

PostgreSQL's logical backup tool. It produces either plain SQL or a compressed archive format that pg_restore can read selectively.

Thanks to MVCC the dump gets a consistent view of the database as of its start time without blocking ongoing work — readers and writers are unaffected. The big advantage over a physical backup is portability: a dump can be loaded into a different major version, a different architecture or a different installation, which makes it the standard route for upgrades and migrations. The drawbacks follow from the same fact: it reads all data through the server, which takes time on large databases, and it offers no way to restore to an arbitrary point in time. -j parallelizes across cores, and pg_dumpall includes roles and other cluster-wide objects.

← Back to the lexicon