pgsql: Dump ALTER TABLE ... ATTACH PARTITION as a separate ArchiveEntry

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Dump ALTER TABLE ... ATTACH PARTITION as a separate ArchiveEntry
Дата
Msg-id E1kz97q-0000fa-OS@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Dump ALTER TABLE ... ATTACH PARTITION as a separate ArchiveEntry.

Previously, we emitted the ATTACH PARTITION command as part of
the child table's ArchiveEntry.  This was a poor choice since it
complicates restoring the partition as a standalone table; you have
to ignore the error from the ATTACH, which isn't even an option when
restoring direct-to-database with pg_restore.  (pg_restore will issue
the whole ArchiveEntry as one PQexec, so that any error rolls back
the table creation as well.)  Hence, separate it out as its own
ArchiveEntry, as indeed we already did for index ATTACH PARTITION
commands.

Justin Pryzby

Discussion: https://postgr.es/m/20201023052940.GE9241@telsasoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9a4c0e36fbd671b5e7426a5a0670bdd7ba2714a0

Modified Files
--------------
src/bin/pg_dump/common.c       | 39 ++++++++++++++++++++-
src/bin/pg_dump/pg_dump.c      | 77 ++++++++++++++++++++++++++++++------------
src/bin/pg_dump/pg_dump.h      | 10 +++++-
src/bin/pg_dump/pg_dump_sort.c |  7 ++++
4 files changed, 109 insertions(+), 24 deletions(-)


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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: pgsql: Fix function prototypes in dependency.h.
Следующее
От: Amit Kapila
Дата:
Сообщение: pgsql: Optimize DropRelFileNodeBuffers() for recovery.