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-07-29 18:24:54
Message-ID: f379d0aeefe8effe13302a436bc28f549f09e924.camel@j-davis.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

The main difference is whether we:

(a) keep both --statistics and --no-statistics in pg_dump and
pg_restore; or

(b) for pg_dump have --statistics but not --no-statistics and for
pg_restore have --no-statistics but not --statistics.

Option (a) creates redundancies whereas (b) creates a divergence. I
suppose I prefer (a), but I don't have a terribly strong opinion and if
more people prefer (b) then I'll go with that.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Doruk Yilmaz 2025-07-29 18:30:43 Re: [Patch] add new parameter to pg_replication_origin_session_setup
Previous Message Tomas Vondra 2025-07-29 18:24:23 Re: Enable data checksums by default