From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
Cc: | Nathan Bossart <nathandbossart(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql(at)j-davis(dot)com |
Subject: | Re: pg_dump --with-* options |
Date: | 2025-06-13 07:37:01 |
Message-ID: | 0FD71512-7E92-4AFD-BD24-0EFE9165CC31@yesql.se |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 13 Jun 2025, at 02:39, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
> By the way, if we keep --with-statistics in pg_dump, are we planning to
> continue using the --with-xxx naming pattern for new options that
> specify extra data to dump? I just wondered because pg_dump already has
> other naming styles like --sequence-data, --include-foreign-data,
> and --large-objects.
There are quite a number of different conventions in use for pg_dump
parameters, I'm not convinced that we are doing users a favour by adding yet
another one here with --with-XXX. AFAICT we have:
* --XXX which includes all of XXX, for example --large-objects
* --with-XXX which includes all of XXX, for example --with-data
* --XXX=YYY which includes XXX matching pattern YYY, for example --table
* --include-XXX=YYY which includes all of XXX matching pattern YYY, like
--include-foreign-data
* --exclude-XXX=YYY which excludes XXX matching pattern YYY, for example
--exclude-table
* --no-XXX which excludes all of XXX, for example --no-comments
* --XXX-only which excludes objects that aren't XXX
For some things we also have short options which corresponds to --XXX and
--exclude-XXX like -t and -T, but -e and -E break that again.
Most object types can be included and excluded, except --include-foreign-data
where there is no exclusion parameter (and the pattern also applies to the
servername and not data).
Then there are features affecting the dump output which either use --YYY or
--use-YYY , like --inserts and --use-set-session-authorization. Other features
which affect what can be be be dumped instead use --enable-XXX like
--enable-row-security. Then --snapshot deviates from both since it has neither
--use nor --enable even though it's a similar category of options.
On top of that, we have the --filter=FILE which can include and exclude objects
(limited to objects where there is a corresponding commandline parameter).
Changing existing parameters is of course hard since it will break scripts and
integrations, but should we really add --with-XXX and increase the
proliferation of concepts rather than trying to make it fit/shoehorn into one
of the ones we already have?
--
Daniel Gustafsson
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Guo | 2025-06-13 07:41:57 | Re: Eager aggregation, take 3 |
Previous Message | Perumal Raj | 2025-06-13 07:29:48 | Re: Logical Replication slot disappeared after promote Standby |