model-writtenrun 5189 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Robins Tharakan reported visibilitymap_clear panics during concurrent ALTER TABLE operations on master and PostgreSQL 15 and 13, supplying backtraces and noting the difficulty of reproducing the failures reliably #1.
- Jeff Davis identified paths in heap_delete() that release and reacquire the buffer lock without rechecking whether a visibility-map pin is needed, supplied a debugger-assisted reproducer, and attached a patch that restarts through the pin check when necessary #2.
- Peter Geoghegan initially argued that the PostgreSQL 13 report showed the problem was not confined to newer vacuum behavior #3, but Jeff could not reproduce it on 13 and questioned how the all-visible flag could change while heap_delete() retained its pin #4 #5; Peter suggested recovery's visibility-map redo behavior as a possible explanation #6.
- Despite the unresolved PostgreSQL 13 reproduction, Jeff proposed committing the fix and backpatching through PostgreSQL 12 #7, and Michael Paquier agreed that the timing allowed buildfarm testing before PostgreSQL 15 RC #8.
- Robins verified that the patch fixed Jeff's reproducer on master and reported no failures during a further run of the original workload, while promising continued monitoring because the crashes had previously accumulated over a month #9.
- Jeff committed the attached patch unchanged as 163b0993a1, with backports through PostgreSQL 12, and announced completion #10; Peter's final, post-commit assessment endorsed the narrowly targeted restart logic, leaving no patch revision pending although reproduction on PostgreSQL 13 remained unexplained #11.