pgsql: Add support for --no-table-access-method in pg_{dump,dumpall,res

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add support for --no-table-access-method in pg_{dump,dumpall,res
Date: 2022-01-17 05:52:02
Message-ID: E1n9Kvy-00084r-Sz@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add support for --no-table-access-method in pg_{dump,dumpall,restore}

The logic is similar to default_tablespace in some ways, so as no SET
queries on default_table_access_method are generated before dumping or
restoring an object (table or materialized view support table AMs) when
specifying this new option.

This option is useful to enforce the use of a default access method even
if some tables included in a dump use an AM different than the system's
default.

There are already two cases in the TAP tests of pg_dump with a table and
a materialized view that use a non-default table AM, and these are
extended that the new option does not generate SET clauses on
default_table_access_method.

Author: Justin Pryzby
Discussion: https://postgr.es/m/20211207153930.GR17618@telsasoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2158628864cfbc03c838834a46c193bde5807361

Modified Files
--------------
doc/src/sgml/ref/pg_dump.sgml | 17 +++++++++++++++++
doc/src/sgml/ref/pg_dumpall.sgml | 11 +++++++++++
doc/src/sgml/ref/pg_restore.sgml | 11 +++++++++++
src/bin/pg_dump/pg_backup.h | 2 ++
src/bin/pg_dump/pg_backup_archiver.c | 12 ++++++++++++
src/bin/pg_dump/pg_dump.c | 3 +++
src/bin/pg_dump/pg_dumpall.c | 5 +++++
src/bin/pg_dump/pg_restore.c | 4 ++++
src/bin/pg_dump/t/002_pg_dump.pl | 16 ++++++++++++++--
9 files changed, 79 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2022-01-17 07:02:34 Re: pgsql: Test replay of regression tests, attempt II.
Previous Message Thomas Munro 2022-01-17 03:35:48 pgsql: Test replay of regression tests, attempt II.