model-writtenrun 7552 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane reported intermittent buildfarm PANICs in visibilitymap_clear in #1; Peter Geoghegan localized the failure to heap updates during ANALYZE in #2, and Andres Freund supplied a confirming stack trace in #4.
- Tom reproduced the failure and found an InvalidBuffer visibility-map argument in #6, prompting Peter's experimental patch to restore conditional cleanup locking during heap vacuuming in #7; Peter explained that the stronger lock might merely have masked an existing bug in #9.
- Tom identified missing all-visible rechecks after releasing the old page's lock for TOAST work in #11 and another omission during relation extension in #12; Peter rejected permanently restoring stronger VACUUM locks in #14.
- Tom proposed consolidating the checks into one late retry point in #15, but abandoned that simplification because retrying after TOAST work could leak newly created out-of-line data, instead posting targeted pin-handling fixes in #17; check-world passed, although deterministic reproduction remained unresolved.
- Peter reviewed how the new pin check accompanies the existing space recheck and discussed testing limitations in #18, while Andres outlined broader heap_update refactoring ideas in #19 that were outside the targeted fix.
- The thread ended with Tom and Peter favoring backpatching to protect the API contract despite uncertain exposure in older branches in #20 and #21; Tom subsequently committed #17 unchanged as 34f581c39e, with backports through PostgreSQL 12 and older branches excluded because they required additional code churn.