pg_dumpall: Skip global objects with --statistics-only or --no-schema.
authorJeff Davis <jdavis@postgresql.org>
Wed, 16 Jul 2025 16:57:07 +0000 (09:57 -0700)
committerJeff Davis <jdavis@postgresql.org>
Wed, 16 Jul 2025 16:57:07 +0000 (09:57 -0700)
commit973caf7291c119ac1679734ae23721bbbb7df0da
treec84720b50dd67d89597e5cdbe10f6bb496c3cfdc
parent40c66f8585bcb13e60b8c2323f1f96b34285bafb
pg_dumpall: Skip global objects with --statistics-only or --no-schema.

Previously, pg_dumpall would still dump global objects such as roles
and tablespaces even when --statistics-only or --no-schema was specified.
Since these global objects are treated as schema-level data, they should
be skipped in these cases.

This commit fixes the issue by ensuring that global objects are not
dumped when either --statistics-only or --no-schema is used.

Author: Fujii Masao <masao.fujii@oss.nttdata.com>
Reviewed-by: Corey Huinker <corey.huinker@gmail.com>
Discussion: https://postgr.es/m/08129593-6f3c-4fb9-94b7-5aa2eefb99b0@oss.nttdata.com
Backpatch-through: 18
src/bin/pg_dump/pg_dumpall.c