pgsql: vacuumdb: Fix excluding multiple schemas with -N

From: Daniel Gustafsson <dgustafsson(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: vacuumdb: Fix excluding multiple schemas with -N
Date: 2023-09-25 14:06:28
Message-ID: E1qkmEG-005sFs-5G@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

vacuumdb: Fix excluding multiple schemas with -N

When specifying multiple schemas to exclude with -N parameters, none
of the schemas are actually excluded (a single -N worked as expected).
This fixes the catalog query to handle multiple exclusions and adds a
test for this case.

Backpatch to v16 where this was introduced.

Author: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Author: Kuwamura Masaki <kuwamura(at)db(dot)is(dot)i(dot)nagoya-u(dot)ac(dot)jp>
Reported-by: Kuwamura Masaki <kuwamura(at)db(dot)is(dot)i(dot)nagoya-u(dot)ac(dot)jp>
Discussion: https://postgr.es/m/CAMyC8qp9mXPQd5D6s6CJxvmignsbTqGZwDDB6VYJOn1A8WG38w@mail.gmail.com
Backpatch-through: 16

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2143d96dc7b72b62166d711283d5925b7180bf85

Modified Files
--------------
src/bin/scripts/t/100_vacuumdb.pl | 15 ++++++++++++++-
src/bin/scripts/vacuumdb.c | 26 ++++++++++++++++----------
2 files changed, 30 insertions(+), 11 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2023-09-25 15:25:34 pgsql: Doc: improve cross-reference in Makefile comment.
Previous Message Daniel Gustafsson 2023-09-25 14:05:29 pgsql: vacuumdb: Fix excluding multiple schemas with -N