From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Nathan Bossart <nathandbossart@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: pg_dump --with-* options
Date: Sat, 14 Jun 2025 16:05:36 +0900
Message-ID: <94f89b0a-5d83-4a67-9092-50ba3913441c@oss.nttdata.com> (raw)
In-Reply-To: <aEyK6FxJqcv53s8b@nathan>
References: <7cc52488-f876-4ad3-affd-6e4b0ef0cb09@eisentraut.org>
<aEMLzPQtjRbj2R7X@nathan>
<CA+TgmoactJEUHeXuxHLKNXHzm6-XrQFigPur-4nHTMFSiSRkiQ@mail.gmail.com>
<aErpuM6RXSlK1FBW@nathan>
<1854ffbf-f8eb-4bc3-b9f8-223bbf58c392@oss.nttdata.com>
<271f899c54d112b353e009286af7c6cdb7c3d609.camel@j-davis.com>
<aEyK6FxJqcv53s8b@nathan>
On 2025/06/14 5:32, Nathan Bossart wrote:
> On Fri, Jun 13, 2025 at 08:58:04AM -0700, Jeff Davis wrote:
>> On Fri, 2025-06-13 at 09:39 +0900, Fujii Masao 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?
>>
>> Good point. Now that we are getting rid of some of the other options,
>> we don't need to worry about consistency with them, and I think we
>> should just use "--statistics".
>
> +1
+1
I noticed that --statistics (i.e., the current --with-statistics) causes
statistics to be dumped even when used with --data-only or --schema-only.
So, as far as I understand, here are the possible combinations of dump
targets and options:
schema, data, stats: --statistics
schema, data: (default)
schema, stats: --schema-only --statistics
data, stats: --data-only --statistics
schema only: --schema-only
data only: --data-only
stats only: --statistics-only
This makes me wonder if --no-data and --no-schema are still necessary.
They were also introduced in v18, but might now be redundant. If so,
should we consider removing them?
If we do keep them, we could also use --no-schema --statistics to
dump data and statistics, but I find --data-only --statistics more intuitive.
Regards,
--
Fujii Masao
NTT DATA Japan Corporation
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: masao.fujii@oss.nttdata.com, nathandbossart@gmail.com, pgsql@j-davis.com, robertmhaas@gmail.com, peter@eisentraut.org
Subject: Re: pg_dump --with-* options
In-Reply-To: <94f89b0a-5d83-4a67-9092-50ba3913441c@oss.nttdata.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox