Re: pg_dump --with-* options

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump --with-* options
Date: 2025-08-01 19:42:16
Message-ID: 40cedfc22da152928a74d472708aaadb8855d8d9.camel@j-davis.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2025-07-29 at 11:24 -0700, Jeff Davis wrote:
> On Wed, 2025-06-18 at 10:21 -0700, Jeff Davis wrote:
> > On Wed, 2025-06-18 at 10:43 -0500, Nathan Bossart wrote:
> > > IIUC the current proposal is to:
> > >
> > > * Dump/restore stats by default.
>
> We don't have a consensus for that, so unless a few people make an
> abrupt turnaround, this will remain off for v18.
>
> > > * Keep the --no-statistics, --no-schema, and --no-data options.
> > > * Keep the --statistics-only, --schema-only, and --data-only
> > > options.
> > > * Remove the --with-statistics, --with-schema, and --with-data
> > > options.
>
> The other parts of the proposal are very similar with mine below:
>
> >   * delete the --with-data and --with-schema options as unnecessary
> >   * (maybe?) rename --with-statistics to --statistics
> >   * keep --no-statistics, --no-data, --no-schema (or use "without"
> > instead?)
> >   * (maybe?) keep --statistics-only
> >   * reject the combination of an "only" option and a "with" option

Patch attached.

* removes --with-data and --with-schema (redundant)
* renames --with-statistics to just --statistics

I kept --statistics and --no-statistics for both pg_dump and
pg_restore, because: (a) I think it's good to have consistent options
between those two programs; and (b) it allows us to potentially change
the default to include statistics in the future. That leaves some
redundancy of the options, which some have expressed annoyance over,
but it doesn't seem like a major point of objection.

Regards,
Jeff Davis

Attachment Content-Type Size
v3-0001-Simplify-options-in-pg_dump-and-pg_restore.patch text/x-patch 30.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2025-08-01 20:02:22 Re: pg_dump --with-* options
Previous Message Tom Lane 2025-08-01 19:37:02 Re: Improve the performance of Unicode Normalization Forms.