model-writtenrun 3262 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported that concurrent SP-GiST reindexing could fail an assertion when creating a redirect tuple without a transaction ID, with a reproducer affecting PostgreSQL 12 through master #1.
- Tom Lane traced the failure to GetTopTransactionIdIfAny, found that forcing XID assignment broke parallel VACUUM, and initially proposed using the next transaction ID as a redirect expiry horizon #2.
- Tom Lane rejected that horizon as providing no additional safety and posted a patch allowing invalid redirect XIDs: concurrent reindexing excludes index scans and VACUUM, so VACUUM can later remove those redirects immediately; the patch also guarded the visibility test and renamed myXid to redirectXid #3.
- Tom Lane considered avoiding redirect creation entirely during concurrent reindexing, and Michael Paquier pointed to existing uses of ii_Concurrent, but Tom preferred retaining the attached fix and leaving a cleaner operation flag or redirect-avoidance approach for future work #4 #5 #6.
- Tom Lane committed the fix with backpatching to supported branches; the supplied commit adapts the patch to older code by retaining myXid and relying on TransactionIdPrecedes to handle invalid XIDs without an additional guard #3 3e3e2ebea7.
- After the fix landed, Michael Paquier questioned why reusing ii_Concurrent was considered fragile, leaving the optional redirect-avoidance improvement unresolved at the thread's end #7.