pgsql: pg_dump: make dumpPublication et al. less unlike sibling functio

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_dump: make dumpPublication et al. less unlike sibling functio
Date: 2021-12-31 00:41:00
Message-ID: E1n35ye-0003QO-HT@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_dump: make dumpPublication et al. less unlike sibling functions.

dumpPublication, dumpPublicationNamespace, dumpPublicationTable, and
dumpSubscription failed to check dataOnly. This is just a latent bug,
because pg_backup_archiver.c would filter out the ArchiveEntry later;
but they're wasting cycles in data-only dumps, and the omission might
become a live bug someday. In any case, it's not good to have some
dumpFoo functions do this and some not.

On the same reasoning, make dumpPublicationNamespace follow the
same pattern as every other dumpFoo function for checking the
DUMP_COMPONENT_DEFINITION flag. (Since 5209c0ba0, we wouldn't
even get here if that flag isn't set, so checking it is just
pro forma right now. But it might not be so forever.)

Since this is just cosmetic and/or future-proofing, no need for
back-patch.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5e65df64d631257ce60016bec0aca43f042b1d33

Modified Files
--------------
src/bin/pg_dump/pg_dump.c | 38 ++++++++++++++++++++++++++++++--------
1 file changed, 30 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2021-12-31 03:17:10 pgsql: ci: Add continuous integration for github repositories via cirru
Previous Message Alvaro Herrera 2021-12-30 22:40:12 pgsql: Small cleanups related to PUBLICATION framework code