Re: pg_dumpall --roles-only interact with other options - Mailing list pgsql-hackers

From Zsolt Parragi
Subject Re: pg_dumpall --roles-only interact with other options
Date
Msg-id CAN4CZFNKnRqmB99L7XKyYawSGi-_joi_-mxRNs7civzmEqm51A@mail.gmail.com
Whole thread
In response to Re: pg_dumpall --roles-only interact with other options  (jian he <jian.universality@gmail.com>)
Responses Re: pg_dumpall --roles-only interact with other options
List 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



pgsql-hackers by date:

Previous
From: 陈宗志
Date:
Subject: [PROPOSAL] Doublewrite Buffer as an alternative torn page protection to Full Page Write
Next
From: Nathan Bossart
Date:
Subject: Re: pg_dumpall --roles-only interact with other options