pg_dumpall --roles-only interact with other options

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_dumpall --roles-only interact with other options
Date: 2026-01-31 03:50:50
Message-ID: CACJufxFf5=wSv2MsuO8iZOvpLZQ1-meAMwhw7JX5gNvWo5PDug@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi.

pg_dumpall --verbose --roles-only --no-schema --file=1.sql
pg_dumpall --verbose --roles-only --no-data --file=2.sql
pg_dumpall --verbose --roles-only --no-statistics --file=3.sql
pg_dumpall --verbose --roles-only --statistics-only --file=4.sql
pg_dumpall --verbose --roles-only --data-only --file=5.sql
pg_dumpall --verbose --roles-only --schema-only --file=6.sql

What should we expect for the above commands?
the current behavior is not good, i think, some even do not dump the
roles command.

I would expect the last three commands to raise errors, while the first three
should simply ignore the options (--no-schema, --no-data, --no-statistics).

This situation also happens to another pg_duampall option: --tablespaces-only.

what do you think?

--
jian
https://www.enterprisedb.com/

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-01-31 04:31:40 Re: AIX support
Previous Message David Rowley 2026-01-31 03:44:55 Re: More speedups for tuple deformation