model-writtenrun 8410 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Masahiko Sawada reported that concurrent B-tree scans could generate duplicate FPI_FOR_HINT records for the same page under shared buffer locks, supplied a reproducer, and proposed either checking whether items were already dead or using exclusive locking #1.
- Alvaro Herrera noted that checksums and wal_log_hints had changed the cost of this historically harmless operation #2, while Peter Geoghegan supported the dead-item check but opposed exclusive locking #3.
- James Coleman identified the affected deployment as PostgreSQL 11 and, following Peter Geoghegan's questions about index cardinality and NULLs, confirmed that its created_at values were effectively unique and non-null, with rows eventually deleted #4 #5 #6 #7 #8 #11.
- Masahiko Sawada submitted the minimal dead-item check and separately suggested coordinating hint-bit image generation through a buffer-descriptor flag #9; Kyotaro Horiguchi offered brief agreement and discussed double-checking for that broader proposal, without a substantive review of the attached fix #10.
- Alvaro Herrera committed Masahiko Sawada's patch with a rewritten comment as 242dfcbafa and announced its backpatching through PostgreSQL 9.5 #12; the committed approach reduces duplicate images while retaining shared-lock concurrency.
- In the same follow-up, Alvaro Herrera questioned the buffer-descriptor proposal and supplied an experimental delta that upgrades to an exclusive lock upon finding a killable item and restarts the scan, explicitly leaving its correctness and performance unverified #12.
- Ranier Vilela proposed a separate optimization that skips already-dead items before tuple processing #13, then extended it with an upfront conditional exclusive-lock upgrade to avoid restarting work #14; the thread ends with the minimal fix committed and these optimization and locking proposals unresolved.