pgsql: Add non-text output formats to pg_dumpall

Поиск
Список
Период
Сортировка
Искать

pgsql: Add non-text output formats to pg_dumpall

От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
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 
Co-Author: Andrew Dunstan 
Reviewed-By: Tushar Ahuja 
Reviewed-By: Jian He 
Reviewed-By: Vaibhav Dalvi 
Reviewed-By: Srinath Reddy 

Discussion: https://postgr.es/m/cb103623-8ee6-4ba5-a2c9-f32e3a4933fa@dunslane.net

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(-)

FAQ