]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add non-text output formats to pg_dumpall
authorAndrew Dunstan <andrew@dunslane.net>
Mon, 23 Feb 2026 20:08:55 +0000 (15:08 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Thu, 26 Feb 2026 13:29:56 +0000 (08:29 -0500)
commit763aaa06f03401584d07db71256fc0ab47235cce
treee73b34324924c3c9a9a22a52a6fa6db6d3fa9ea1
parent7bb50dd7d6b9f3cbad005aeb6eb9e4a065481b25
Add non-text output formats to pg_dumpall

pg_dumpall can now produce output in custom, directory, or tar formats
in addition to plain text SQL scripts. When using non-text formats,
pg_dumpall creates a directory containing:
- toc.glo: global data (roles and tablespaces) in custom format
- map.dat: mapping between database OIDs and names
- databases/: subdirectory with per-database archives named by OID

pg_restore is extended to handle these pg_dumpall archives, restoring
globals and then each database. The --globals-only option can be used
to restore only the global objects.

This enables parallel restore of pg_dumpall output and selective
restoration of individual databases from a cluster-wide backup.

Author: Mahendra Singh Thalor <mahi6run@gmail.com>
Co-Author: Andrew Dunstan <andrew@dunslane.net>
Reviewed-By: Tushar Ahuja <tushar.ahuja@enterprisedb.com>
Reviewed-By: Jian He <jian.universality@gmail.com>
Reviewed-By: Vaibhav Dalvi <vaibhav.dalvi@enterprisedb.com>
Reviewed-By: Srinath Reddy <srinath2133@gmail.com>
Discussion: https://postgr.es/m/cb103623-8ee6-4ba5-a2c9-f32e3a4933fa@dunslane.net
14 files changed:
doc/src/sgml/ref/pg_dumpall.sgml
doc/src/sgml/ref/pg_restore.sgml
src/bin/pg_dump/meson.build
src/bin/pg_dump/parallel.c
src/bin/pg_dump/pg_backup.h
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_backup_archiver.h
src/bin/pg_dump/pg_backup_tar.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dumpall.c
src/bin/pg_dump/pg_restore.c
src/bin/pg_dump/t/001_basic.pl
src/bin/pg_dump/t/007_pg_dumpall.pl [new file with mode: 0644]
src/tools/pgindent/typedefs.list