Add support for --no-table-access-method in pg_{dump,dumpall,restore}
authorMichael Paquier <michael@paquier.xyz>
Mon, 17 Jan 2022 05:51:46 +0000 (14:51 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 17 Jan 2022 05:51:46 +0000 (14:51 +0900)
commit2158628864cfbc03c838834a46c193bde5807361
treeb51144b680bad500b57eaa7b9a95165107705cc3
parentf47ed79cc8a0cfa154dc7f01faaf59822552363f
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
doc/src/sgml/ref/pg_dump.sgml
doc/src/sgml/ref/pg_dumpall.sgml
doc/src/sgml/ref/pg_restore.sgml
src/bin/pg_dump/pg_backup.h
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dumpall.c
src/bin/pg_dump/pg_restore.c
src/bin/pg_dump/t/002_pg_dump.pl