Re: pg_dump --with-* options
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Peter Eisentraut
<peter@eisentraut.org>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-06-18T17:21:37Z
Lists: pgsql-hackers
On Wed, 2025-06-18 at 10:43 -0500, Nathan Bossart wrote: > IIUC the current proposal is to: > > * Dump/restore stats by default. > * Keep the --no-statistics, --no-schema, and --no-data options. > * Keep the --statistics-only, --schema-only, and --data-only options. > * Remove the --with-statistics, --with-schema, and --with-data > options. > > How does that sound? For those that want to keep stats off by default, another proposal might be: * keep stats defaults as they are now (pg_dump defaults to "off", pg_restore defaults to "on") * delete the --with-data and --with-schema options as unnecessary * (maybe?) rename --with-statistics to --statistics * keep --no-statistics, --no-data, --no-schema (or use "without" instead?) * (maybe?) keep --statistics-only * reject the combination of an "only" option and a "with" option That removes 2 or three options, and rejects some ambiguous combinations. That would seem to address some of the immediate concerns raised in this thread, without needing to relitigate the default. It also leaves the door open to potentially change the default for stats to "on" in the future, because we will have both --with- statistics and --no-statistics. The only downside of this approach is that we'd be stuck with both -- with-statistics and --no-statistics forever. That's a bit inconsistent with the other options, and it doesn't satisfy Robert's concern about the --help output. But Robert also wants stats off by default for pg_dump and on by default for pg_restore, which I think means we need both --with-statistics and --no-statistics anyway. Robert, comments? Regards, Jeff Davis
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Simplify options in pg_dump and pg_restore.
- 6a46089e458f 19 (unreleased) landed
- a3e8dc143862 18.0 landed
-
pg_dump: reject combination of "only" and "with"
- 0ed92cf50cc4 19 (unreleased) landed
- 60121890f7f2 18.0 landed
-
Change pg_dump default for statistics export.
- 34eb2a80d5a3 18.0 cited