pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_dumpall: Fix handling of conflicting options.
Date: Fri, 06 Mar 2026 20:01:16 +0000
Message-ID: <E1vybMK-002j9a-31@gemulon.postgresql.org> (raw)

pg_dumpall: Fix handling of conflicting options.

pg_dumpall is missing checks for some conflicting options,
including those passed through to pg_dump.  To fix, introduce a
new function that checks whether mutually exclusive options are
set, and use that in pg_dumpall.  A similar change could likely be
made for pg_dump and pg_restore, but that is left as a future
exercise.

This is arguably a bug fix, but since this might break existing
scripts, no back-patch for now.

Author: Jian He <jian.universality@gmail.com>
Co-authored-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Wang Peng <215722532@qq.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/CACJufxFf5%3DwSv2MsuO8iZOvpLZQ1-meAMwhw7JX5gNvWo5PDug%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b2898baaf7e40a187de5b0134d53d944b38209cd

Modified Files
--------------
src/bin/pg_dump/pg_dumpall.c                | 70 +++++++++++++++--------------
src/bin/pg_dump/t/001_basic.pl              | 34 +++++++++++++-
src/bin/pg_dump/t/002_pg_dump.pl            |  2 -
src/bin/pg_dump/t/005_pg_dump_filterfile.pl |  4 +-
src/fe_utils/option_utils.c                 | 35 +++++++++++++++
src/include/fe_utils/option_utils.h         |  6 +++
6 files changed, 111 insertions(+), 40 deletions(-)



Message-ID: <E1vybMK-002j9a-31@gemulon.postgresql.org>
Permalink:  ../E1vybMK-002j9a-31@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vybMK-002j9a-31@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: pg_dumpall: Fix handling of conflicting options.
  In-Reply-To: <E1vybMK-002j9a-31@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox