| From: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
|---|---|
| To: | jian he <jian(dot)universality(at)gmail(dot)com> |
| Cc: | Nathan Bossart <nathandbossart(at)gmail(dot)com>, wangpeng <215722532(at)qq(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: pg_dumpall --roles-only interact with other options |
| Date: | 2026-02-09 19:09:54 |
| Message-ID: | CAN4CZFNKnRqmB99L7XKyYawSGi-_joi_-mxRNs7civzmEqm51A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> It would be better to simply reject the CONFLICT ONLY option and keep the rest
> of the logic same as the HEAD.
I agree, that's why I showed that test case that failed.
This version is definitely better, it's also more readable than the
previous version with the many ifs.
But it is again missing a few cases that should error out before
pg_dump, as currently it fails after pg_dump errors out:
--schema-only --no-schema
--data-only --no-data
--statistics-only --no-statistics
/* Make sure the user hasn't specified a mix of globals-only options */
- if (globals_only && roles_only)
+ if (globals_only &&
+ (roles_only || tablespaces_only || with_statistics ||
statistics_only || schema_only || data_only))
The comment above the checks also seems stale, as we have more checks
with the patch
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2026-02-09 19:15:37 | Re: pg_dumpall --roles-only interact with other options |
| Previous Message | 陈宗志 | 2026-02-09 18:52:58 | [PROPOSAL] Doublewrite Buffer as an alternative torn page protection to Full Page Write |