model-writtenrun 61 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alperen Keles reported that CLUSTER silently loses a row inserted by a transaction and then updated in a rolled-back subtransaction; REPACK also reproduced the problem #1.
- Takeshi Ideriha found that selecting the row before CLUSTER prevents the loss, and Ayush Tiwari identified a missing HEAP_XMAX_INVALID hint as the likely cause #2 #3.
- Shihao Zhong proposed preserving the original tuple in rewriteheap.c and adding its logical rewrite mapping, with an isolation test showing that concurrent VACUUM FULL can also lose a newly created table's pg_class row #4.
- Takeshi independently supplied a simpler xmin-hint check, but Shihao and Takeshi confirmed that preserving the tuple without adding its logical mapping breaks logical decoding after the catalog rewrite #5 #6 #7.
- Michael Paquier objected that rechecking visibility inside rewriteheap.c violates its contract and proposed setting hints in HeapTupleSatisfiesVacuumHorizon(); Shihao accordingly moved the fix into its current-transaction and concurrent-inserter branches, making the logical mapping change unnecessary #8 #9 #10.
- Michael raised performance concerns, while Zhijie Hou supplied an injection-point reproducer showing that the concurrent-inserter branch could invalidate a MultiXact and discard another transaction's active row lock #11 #12.
- Michael measured substantial VACUUM slowdowns and proposed landing only the simple current-transaction fix first; Takeshi and Zhijie supported that split, and their discussion established that MultiXacts could be skipped and equal xmin/xmax could avoid unnecessary checks #13 #15 #16 #17 #18.
- Manu reproduced the performance regressions and supplied incremental optimizations that skipped MultiXacts and equal xmin/xmax, then used a clog-only abort check to avoid expensive ProcArray lookups #19.
- Michael posted the reduced current-transaction fix with a plain regression test; Shihao reported that it fixed both the original report and the pg_statistic case, and Ayush and Zhijie approved it #20 #21 #22 #23.
- Zhijie demonstrated that Manu's clog-only optimization could mark an old HOT tuple invalid while its successor remained in progress, causing BRIN summarization to fail; Manu reproduced the failure and restored ProcArray confirmation after the clog filter #24 #25.
- Michael committed the exact code and tests from #20 as e7f4463e86 and announced backpatches through PostgreSQL 14, leaving the concurrent-inserter case outside that commit #26.
- Manu assembled the remaining concurrent-inserter fix, Shihao's catalog isolation test, and Zhijie's abort-window test into a new series on top of the commit, reporting that the optimizations removed the measured common-case regressions #27.
- Michael criticized the accumulated conditions as insufficiently justified and difficult to maintain, and Manu withdrew the remaining series pending a clearer account of when setting the hint is safe #28 #29.
- The final message reports a broader race in which an updater aborts between VACUUM FULL reading the old and new tuple versions, so no earlier hint can prevent the loss; Manu supplied a reproducer and described an unposted rewrite redesign that would stop passing dead tuples to rewriteheap.c and resolve pending tuples after update outcomes become final, leaving this broader problem unresolved #30.