pg_dump --with-* options
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-06-06T07:14:32Z
Lists: pgsql-hackers
I'm looking at the new in PG18 pg_dump --with-* options, and I'm having trouble understanding them. (I did not look into the source code or the git or mailing list history for this, to try to understand it as a user.) We have -a, --data-only dump only the data, not the schema or statistics --no-data do not dump data --with-data dump the data # this one is new (and there is also --section=data), and then three analogous options for "schema" and "statistics". What is the purpose of the --with-data option? Dumping the data is the default. Is this to override an earlier --no-data option? The man page is only minimally more verbose: "Dump data. This is the default." But why do you then need this option? I think we should add some more documenting detail for these, but right now I don't know what it would be.
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