vacuumdb: Fix excluding multiple schemas with -N

Daniel Gustafsson <dgustafsson@postgresql.org>

Commit: 2143d96dc7b72b62166d711283d5925b7180bf85
Author: Daniel Gustafsson <dgustafsson@postgresql.org>
Date: 2023-09-25T14:03:17Z
Releases: 16.1
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@gmail.com>
Author: Kuwamura Masaki <kuwamura@db.is.i.nagoya-u.ac.jp>
Reported-by: Kuwamura Masaki <kuwamura@db.is.i.nagoya-u.ac.jp>
Discussion: https://postgr.es/m/CAMyC8qp9mXPQd5D6s6CJxvmignsbTqGZwDDB6VYJOn1A8WG38w@mail.gmail.com
Backpatch-through: 16

Files

PathChange+/−
src/bin/scripts/t/100_vacuumdb.pl modified +14 −1
src/bin/scripts/vacuumdb.c modified +16 −10

Discussion