model-writtenrun 4648 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane opened the thread after enum OIDs changing across dump and restore caused hash-partition constraint failures, proposing to make loading through partition roots the default because encoding, endianness, and collation changes posed related risks #1.
- Robert Haas opposed rushing a broad default change into minor releases, citing tuple-routing costs, confusing dump entries, and applications that depend on preserving individual partition contents #2 #16.
- Tom explained that changing enum hashing would break existing hash indexes and partitioned tables across pg_upgrade, while Peter Geoghegan and David G. Johnston supported treating successful logical restoration as the priority #6 #21 #19.
- David Rowley recovered the earlier design discussion, prompting Tom to return to an enum-only compromise; Robert accepted forcing root loading for that case in stable branches while proposing separate future hashing infrastructure #22 #23 #27.
- Alvaro Herrera demonstrated that unsafe hash partitioning could occur below another partitioning level, so detection needed to inspect the entire ancestry; Tom also rejected an override for enum hashing because restoring directly into leaves would almost certainly fail #25 #28 #29.
- Tom submitted automatic enum-root loading together with two independent performance improvements: avoiding unused TableAttachInfo objects and replacing repeated inheritance scans with bulk parent-link construction #30.
- Robert questioned whether rerouted rows could violate partition-specific foreign keys, while Tom argued that data and post-data dependency boundaries prevent premature constraint creation and that the existing documentation warning overstated the risk #31 #32 #35 #36.
- Julien Rouhaud identified a concrete parallel-restore deadlock: workers truncated their original partitions before copying rows through the root into potentially different partitions #37.
- Tom concluded that root-loading restores must skip TRUNCATE to prevent both deadlocks and possible data loss, and considered detecting root loading from COPY statements or adding an archive marker #40.
- After Justin Pryzby pointed to related partition-dump work, Tom recognized that forcing COPY would obstruct useful INSERT-based exports and favored preserving INSERT support with a marker in the TABLE DATA definition field #41 #42.
- The second submission combined COPY inspection for legacy archives with explicit markers for new archives, added a reproducing TAP test, and retained the original enum fix and performance patches #44.
- Julien verified that the revised series fixed his workload and requested INSERT coverage, accurate wal_level wording, and skipping enum-hash detection before PostgreSQL 11; Tom accepted these changes and declined an unsafe-mode override #45 #46 #47.
- Tom committed the first four patches from the second submission as bc8cd50fef, adding the reviewed cutoff adjustment, broader tests, and documentation cleanup, with backports through PostgreSQL 11 #44 #48.
- The two performance patches from the same submission landed separately, with their implementation preserved, as 064709f803; Tom announced completion and Julien acknowledged it, leaving no submitted patches pending #44 #48 #49.