Re: pg_dump --with-* options
Corey Huinker <corey.huinker@gmail.com>
From: Corey Huinker <corey.huinker@gmail.com>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Jeff Davis <pgsql@j-davis.com>, Fujii Masao <masao.fujii@oss.nttdata.com>, Robert Haas <robertmhaas@gmail.com>,
Nathan Bossart <nathandbossart@gmail.com>, Peter Eisentraut <peter@eisentraut.org>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-07-31T20:28:08Z
Lists: pgsql-hackers
> > > > I assume that should be read as something like "include only", because > > --include=data would also be excluding the schema and the stats. > > Of course. > In general, I like the idea of --include, but it would need to be consistent in behavior across pg_dump/pg_restore/pg_upgrade(if applicable). Under the current defaults, if a person wanted a dump to include stats on pg_dump they would need "--include=data,schema,statistics" (checking first whether it was "statistics" or "stats"), but they could use the defaults on pg_restore. Using the defaults on both would allow for stats to be restored, but none would have been generated. That is confusing to me, and I imagine it will be even more confusing to somebody who hasn't been reading this thread. I don't see anything wrong with a full complement of --something-only, --no-something flags. The combinatorics aren't that hard, only tedious. If we *must* make the defaults for pg_dump different from pg_restore and pg_upgrade, then adding the --with-something flags becomes necessary, and we let redundant non-conflicting combinations slide. All of these problems are solved if we include statistics by default across all three programs. Anything else involves complicated explanations that will confuse the users who read them, and surprise the users who don't.
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