]> git.ipfire.org Git - thirdparty/postgresql.git/commit
pg_dumpall: Fix handling of conflicting options.
authorNathan Bossart <nathan@postgresql.org>
Fri, 6 Mar 2026 20:00:04 +0000 (14:00 -0600)
committerNathan Bossart <nathan@postgresql.org>
Fri, 6 Mar 2026 20:00:04 +0000 (14:00 -0600)
commitb2898baaf7e40a187de5b0134d53d944b38209cd
tree76d929c776dcf0330dd805c67c80bc37f591701e
parent50ea4e09b6c2331b4cc6434fa12b43bc62de682c
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
src/bin/pg_dump/pg_dumpall.c
src/bin/pg_dump/t/001_basic.pl
src/bin/pg_dump/t/002_pg_dump.pl
src/bin/pg_dump/t/005_pg_dump_filterfile.pl
src/fe_utils/option_utils.c
src/include/fe_utils/option_utils.h