model-writtenrun 5319 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jul - Aug 2022 ยท 20 entries
- Justin Pryzby reported that large objects appeared lost after pg_upgrade when pg_largeobject had previously undergone VACUUM FULL, and traced the regression to relfilenode preservation #1.
- Michael Paquier reproduced the problem with a same-version upgrade and supplied a minimal TAP-test addition, while Julien Rouhaud demonstrated that the data remained on disk and became visible after correcting the catalog relfilenode #2 #5.
- Justin submitted a direct pg_class update for pg_largeobject and its index, including Michael's VACUUM FULL test; Shruthi Gowda tested the fix successfully, and Robert Haas requested a clearer generated comment #4 #6 #7.
- Justin then added removal of the new cluster's orphaned large-object files, but Robert questioned the cleanup's assumptions about default relfilenodes and modifications to the destination cluster #12 #18.
- Bruce Momjian validated the core relfilenode reasoning, and Robert committed the pg_dump fix and regression test as d498e052b4, omitting the disputed cleanup from #12 so the data-loss fix would not wait #19 #20.
- Further discussion exposed destination-cluster collision risks and the difficulty of discovering the original large-object filenames through template0, leading Robert to pursue a server-side storage operation instead of manual file removal #21 #22 #25.
- Robert's replacement used binary-upgrade relfilenode setters followed by TRUNCATE, with immediate storage removal to handle unchanged filenames; he abandoned VACUUM FULL because pg_restore's multi-command execution put it inside a transaction block #27.
- Andres Freund suggested a dedicated binary-upgrade helper, but Robert preferred reusing TRUNCATE's existing machinery; Bruce endorsed the binary-upgrade exception and later supported applying it to PostgreSQL 15 as well as master #28 #30 #29 #32.
- Robert combined the two patches from #27 into bbe08b8869, correcting only a comment typo, and confirmed the PostgreSQL 15 backpatch #33.
- Tom Lane reported cross-version upgrade failures showing invalid freeze horizons, and Robert reproduced the problem: TRUNCATE overwrote the horizon values set immediately beforehand #34 #36.
- Robert posted a follow-up that moved horizon restoration after TRUNCATE and added before-and-after horizon checks; Tom found it plausible, and Robert confirmed committing it #37 #38 #39.
- A buildfarm failure exposed the test's nonstandard psql invocation, prompting Tom to flag missing startup-file suppression and recommend the test framework's psql methods #41 #42 #44.
- Robert proposed using safe_psql(), checking the regression database, sorting results, and capturing horizons after VACUUM FULL; Tom approved, and those changes landed as 212bdc0cbc from the unindexed attachment discussed in #45 #46.
- After an apparent recovery, Tom reported further intermittent horizon mismatches and found evidence of autovacuum activity, shifting the investigation from psql invocation to concurrent horizon advancement #48 #50 #54 #55.
- Jonathan S. Katz proposed allowing horizons to increase, but Robert objected that an unbounded comparison would miss many corrupt values; Jonathan subsequently supplied a version allowing values up to the originals plus 1000 #59 #60 #76.
- The group also considered bounds based on the current transaction ID, explicit VACUUM, and checkpoint data, while Tom, Andres, and Peter Geoghegan argued that disabling autovacuum would weaken realistic coverage #66 #65 #75 #71 #72 #73.
- Robert offered an alternative patch that delayed autovacuum on the new node, then identified that Jonathan's comparison checked only the first relation; Tom explained that the observed failures involved autovacuum on the old node, which Robert's alternative did not address #77 #78 #83.
- Peter proposed using amcheck to verify tuple-level horizon invariants, but no replacement was ready before the beta deadline, so Robert proposed reverting the test changes and Tom agreed #84 #87 #88.
- The discussion-driven 87e22f675f removed both the horizon checks and the earlier VACUUM FULL test addition, leaving the production fixes intact; Robert confirmed completion in #92.
- The thread ended with the replacement test approaches uncommitted and disagreement unresolved over disabling autovacuum before or after pg_upgrade, with Tom clarifying that pg_upgrade's own suppression during its execution did not resolve that concern #94 #95 #97.