Re: pg_dump --with-* options

Fujii Masao <masao.fujii@oss.nttdata.com>

From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Corey Huinker <corey.huinker@gmail.com>
Cc: Nathan Bossart <nathandbossart@gmail.com>, Jeff Davis <pgsql@j-davis.com>, Robert Haas <robertmhaas@gmail.com>, Peter Eisentraut <peter@eisentraut.org>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-06-17T01:02:48Z
Lists: pgsql-hackers

On 2025/06/17 4:35, Corey Huinker wrote:
>     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:
> 
> 
> Those should also be mutually exclusive, and I'll write up a patch to add them to the checks.

--sequence-data behaves similarly, i.e., it still dumps sequence data
even when used with --schema-only. So I've been thinking of both
--statistics and --sequence-data as options that include additional data,
regardless of whether --*-only is specified.

It seems better to keep their behavior consistent to avoid confusing users.

Regards,

-- 
Fujii Masao
NTT DATA Japan Corporation




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Simplify options in pg_dump and pg_restore.

  2. pg_dump: reject combination of "only" and "with"

  3. Change pg_dump default for statistics export.