Re: pg_dump --with-* options

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql(at)j-davis(dot)com
Subject: Re: pg_dump --with-* options
Date: 2025-06-12 14:18:56
Message-ID: CA+TgmoactJEUHeXuxHLKNXHzm6-XrQFigPur-4nHTMFSiSRkiQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 6, 2025 at 11:40 AM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
> On Fri, Jun 06, 2025 at 09:14:32AM +0200, Peter Eisentraut wrote:
> > We have
> >
> > -a, --data-only dump only the data, not the schema or statistics
> > --no-data do not dump data
> > --with-data dump the data # this one is new
> >
> > (and there is also --section=data), and then three analogous options for
> > "schema" and "statistics".
> >
> > What is the purpose of the --with-data option? Dumping the data is the
> > default. Is this to override an earlier --no-data option?
>
> I believe the idea is that these will allow folks to be explicit about what
> they want instead of needing to understand the defaults for every
> component.

Am I too late to propose ripping this out?

I mean, if I look at pg_dump --help and there are options for
--with-broccoli and --without-mushrooms, I know that the defaults are
no brocooli, yes mushrooms, and I know which options I need to specify
to get the behavior that I want, whatever that happens to be. If all
options exist in both forms, it's a lot more confusing. Maybe there's
some issue of cross-version compatibility here that justifies this
complexity, but I don't see what it would be. I would think
--with-data has always been the default and always will be, so we just
don't need --with-data for anything. But maybe I'm confused.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Konstantin Knizhnik 2025-06-12 14:22:22 Re: Non-reproducible AIO failure
Previous Message Fujii Masao 2025-06-12 14:02:39 Re: Add progressive backoff to XactLockTableWait functions