pgsql: pg_restore: add --no-globals option to skip globals - Mailing list pgsql-committers

From Andrew Dunstan
Subject pgsql: pg_restore: add --no-globals option to skip globals
Date
Msg-id E1vxuEV-002PwN-15@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
pg_restore: add --no-globals option to skip globals

This is a followup to commit 763aaa06f03 Add non-text output formats to
pg_dumpall.

Add a --no-globals option to pg_restore that skips restoring global
objects (roles and tablespaces) when restoring from a pg_dumpall
archive.  When -C/--create is not specified, databases that do not
already exist on the target server are also skipped.

This is useful when restoring only specific databases from a pg_dumpall
archive without needing the global objects to be restored first.

Author: Mahendra Singh Thalor <mahi6run@gmail.com>

With small tweaks by me.

Discussion: https://postgr.es/m/CAKYtNArdcc5kx1MdTtTKFNYiauo3=zCA-NB0LmBCW-RU_kSb3A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3c19983cc0816001ad849a9f0bcaf2ea8321b93d

Modified Files
--------------
doc/src/sgml/ref/pg_restore.sgml    | 18 +++++++++++++++++-
src/bin/pg_dump/pg_restore.c        | 30 ++++++++++++++++++++++++------
src/bin/pg_dump/t/001_basic.pl      | 16 ++++++++++++++--
src/bin/pg_dump/t/007_pg_dumpall.pl | 21 ++++++++++++++++++++-
4 files changed, 75 insertions(+), 10 deletions(-)


pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: pgsql: Improve writing map.dat preamble
Next
From: Michael Paquier
Date:
Subject: pgsql: Revert "Change default value of default_toast_compression to "lz