Re: pg_dump --with-* options

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(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-06-12 20:39:00
Message-ID: CADkLM=fguOpQui=_OBUObuR-Gt36pBdUYzQXQ4n9TdkxXL_BAQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 12, 2025 at 4:22 PM Nathan Bossart <nathandbossart(at)gmail(dot)com>
wrote:

> On Thu, Jun 12, 2025 at 04:12:35PM -0400, Corey Huinker wrote:
> > The use case for --statistics-only is to extract the existing statistics
> > for the tables and indexes that are involved in a given query that is
> > giving you problems, allowing you to apply those statistics to an
> existing
> > QA/dev database and tweak them without further impacting operations on
> the
> > production database. I think this will prove to be very useful, and
> having
> > a --statistics-only flag conveys the clear intent of "I want the stats,
> and
> > only the stats",
>
> I do think this is useful functionality, I only suggested removing it
> because AFAICT it is redundant, i.e., you can accomplish the same thing
> with --with-statistics --no-schema --no-data. It seems like we're trying
> to avoid having multiple ways to do the same thing.
>

By that same argument, we should remove --schema-only and --data-only as
well. I think we shouldn't because those two options have proved very
convenient for users and they convey clear intent to the person reading the
script, and I believe that --statistics-only will prove the same over time.

> > If we're hot to remove options, how about we remove the sections flags?
> > Their utility is reliant upon the user understanding exactly which things
> > go in which section, and further assumes that everything
> deterministically
> > goes in exactly one section, which is no longer the case as Jeff
> > pointed out recently. They have outlived their usefulness.
>
> I almost brought this up earlier as something else we could potentially
> trim. That's v19 material at this point, though.
>

+1 for 19.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-06-12 20:57:01 Re: pg_dump --with-* options
Previous Message Dmitry Koval 2025-06-12 20:36:25 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands