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 <[email protected]>
Co-Author: Andrew Dunstan <[email protected]>
Reviewed-By: Tushar Ahuja <[email protected]>
Reviewed-By: Jian He <[email protected]>
Reviewed-By: Vaibhav Dalvi <[email protected]>
Reviewed-By: Srinath Reddy <[email protected]>

Discussion: 
https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/763aaa06f03401584d07db71256fc0ab47235cce

Modified Files
--------------
doc/src/sgml/ref/pg_dumpall.sgml     | 113 ++++-
doc/src/sgml/ref/pg_restore.sgml     | 119 +++++-
src/bin/pg_dump/meson.build          |   1 +
src/bin/pg_dump/parallel.c           |  14 +
src/bin/pg_dump/pg_backup.h          |   2 +-
src/bin/pg_dump/pg_backup_archiver.c |  67 ++-
src/bin/pg_dump/pg_backup_archiver.h |   1 +
src/bin/pg_dump/pg_backup_tar.c      |   2 +-
src/bin/pg_dump/pg_dump.c            |   2 +-
src/bin/pg_dump/pg_dumpall.c         | 801 +++++++++++++++++++++++++++++------
src/bin/pg_dump/pg_restore.c         | 703 +++++++++++++++++++++++++++++-
src/bin/pg_dump/t/001_basic.pl       |  55 +++
src/bin/pg_dump/t/007_pg_dumpall.pl  | 639 ++++++++++++++++++++++++++++
src/tools/pgindent/typedefs.list     |   1 +
14 files changed, 2354 insertions(+), 166 deletions(-)

Reply via email to