pgsql: Tweak behavior of pg_dump --extension with configuration tables

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Tweak behavior of pg_dump --extension with configuration tables
Дата
Msg-id E1lWqWF-0004Dp-Ut@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Tweak behavior of pg_dump --extension with configuration tables

6568cef, that introduced the option, had an inconsistent behavior when
it comes to configuration tables set up by pg_extension_config_dump, as
the data of all configuration tables would included in a dump even for
extensions not listed by a set of --extension switches.

The contents dumped changed depending on the schema where an extension
was installed when an extension was not listed.  For example, an
extension installed under the public schema would have its configuration
data not dumped even when not listed with --extension, which was
inconsistent with the case of an extension installed on a non-public
schema, where the configuration would be dumped.

Per discussion with Noah, we have settled down to the simple rule of
dumping configuration data of an extension if it is listed in
--extension (default is unchanged and backward-compatible, to dump
everything on sight if there are no extensions directly listed).  This
avoids some weird cases where the dumps depended on a --schema for one.

More tests are added to cover the gap, where we cross-check more
behaviors depending on --schema when an extension is not listed.

Reported-by: Noah Misch
Reviewed-by: Noah Misch
Discussion: https://postgr.es/m/20210404220802.GA728316@rfd.leadboat.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/344487e2db03f3cec13685a839dbc8a0e2a36750

Modified Files
--------------
doc/src/sgml/ref/pg_dump.sgml               |  6 +++++
src/bin/pg_dump/pg_dump.c                   | 12 +++++++++-
src/test/modules/test_pg_dump/t/001_base.pl | 34 +++++++++++++++++++++++++++++
3 files changed, 51 insertions(+), 1 deletion(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix obsolete comments referencing JoinPathExtraData.extra_latera
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Use SIGURG rather than SIGUSR1 for latches.