model-writtenrun 3072 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Daniel Shelepanov opened the thread with #1, proposing that pg_visibility temporarily set PROC_IN_VACUUM while checking visibility-map consistency to avoid false corruption reports.
- Robert Haas explained in #2 that VACUUM's conservatively calculated horizon can move backward and therefore cannot safely serve a corruption checker; Tom Lane proposed a separate calculation in #3, and Robert questioned the use of latestCompletedXid in #4.
- With Daniel occupied elsewhere, Nikita Malakhov suggested using the oldest running transaction in #6, but no replacement patch followed, and Daniel Gustafsson closed the CommitFest entry as returned with feedback in #8.
- Alexander Korotkov revived the work in #9 with a dedicated strict-horizon calculation that ignored process xmin values, KnownAssignedXids, and walsender xmin values, accepting weaker corruption detection to avoid false reports.
- Alexander Lakhin's reproducer exposed failures in both revised attempts: #10 prompted initialization from latestCompletedXid plus one in #11, and the remaining failure in #12 prompted moving the calculation into core code with proper ProcArrayStruct access in #13.
- Alexander Lakhin reported thousands of successful iterations in #14, while he and Dmitry Koval questioned the remaining PROC_IN_VACUUM and enum machinery in #14 and #15; Alexander Korotkov removed it in #16, citing snapshot hazards and complexity, then addressed a further comment correction in #18.
- Alexander Korotkov redesigned the implementation again in #19, extending GetRunningTransactionData() with a database-specific oldest running transaction ID, moving relation-specific selection into pg_visibility, and adding a TAP test for the original concurrency problem.
- The redesigned patch from #19 landed as e85662df44 with only comment corrections and formatting changes; the credited reviews by Alexander Lakhin and Dmitry Koval covered earlier implementations.
- Noah Misch found that the committed database-specific calculation compared against the wrong variable and suggested avoiding unnecessary process metadata fetches in #20; Alexander Korotkov supplied two separate fixes in #21, and Noah approved them in #22.
- The two patches from #21 landed unchanged as separate commits: 6c1af5482e corrected the comparison and was backpatched to PostgreSQL 17, while 6897f0ec02 applied the cache-access optimization to the development branch.
- Heikki Linnakangas reported a hot-standby assertion failure in #23 because GetRunningTransactionData() cannot run during recovery; Alexander Korotkov responded with #25, using nextXid on standby and adding a streaming-standby test.
- Heikki accepted the code in #26 but requested clearer documentation of the limited standby checking and why KnownAssignedXids remains unsuitable even for shared catalogs; Alexander incorporated that reasoning in #27.
- The last thread message, #27, announced an intention to commit the revised standby fix; it subsequently landed as e2ed7e3227 with only a punctuation adjustment, completing the attached fixes.