Re: pg_dump versus hash partitioning
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org, Andrew <pgsqlhackers@andrewrepp.com>
Date: 2023-02-01T21:44:31Z
Lists: pgsql-hackers
On Wed, Feb 1, 2023 at 1:14 PM Robert Haas <robertmhaas@gmail.com> wrote: > It seems to me that the job of pg_dump is to produce a dump that, when > reloaded on another system, recreates the same database state. That > means that we end up with all of the same objects, each defined in the > same way, and that all of the tables end up with all the same contents > that they had before. Here, you'd like to argue that it's perfectly > fine if we instead insert some of the rows into different tables than > where they were on the original system. Under normal circumstances, of > course, we wouldn't consider any such thing, because then we would not > be faithfully replicating the database state, which would be > incorrect. But here you want to argue that it's OK to create a > different database state because trying to recreate the same one would > produce an error and the user might not like getting an error so let's > just do something else instead and not even bother telling them. This is a misrepresentation of Tom's words. It isn't actually self-evident what "we end up with all of the same objects, each defined in the same way, and that all of the tables end up with all the same contents that they had before" actually means here, in general. Tom's main concern seems to be just that -- the ambiguity itself. If there was a fully worked out idea of what that would mean, then I suspect it would be quite subtle and complicated -- it's an inherently tricky area. You seem to be saying that the way that this stuff currently works is correct by definition, except when it isn't. -- Peter Geoghegan
Commits
-
Simplify and speed up pg_dump's creation of parent-table links.
- 064709f803c0 16.0 landed
-
Fix pg_dump for hash partitioning on enum columns.
- bc8cd50fefd3 16.0 landed
- 8f83ce8c5244 12.15 landed
- 7e7c5b683985 13.11 landed
- 5fc1ac151d85 14.8 landed
- 2b216da1e55d 15.3 landed
- 012ffb365a05 11.20 landed