model-writtenrun 2878 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andrew Bille reported a reproducible SerialAdd() assertion failure under concurrent serializable transactions in #1, then demonstrated missing pg_serial files without assertions and connected those errors to a production report in #2.
- Alexander Lakhin supplied diagnostic instrumentation in #3 and traced the missing-file failure to SerialAdd() processing an XID older than tailXid, causing it to read a page that had never been written.
- Heikki Linnakangas explained in #4 that global xmin can advance before ClearOldPredicateLocks() removes obsolete finished transactions, and proposed skipping SerialAdd() storage when tailXid is invalid or the XID precedes it.
- Alexander Lakhin supplied revised diagnostics in #5, showing that an older target page could also make the zeroing loop exhaust disk space, and confirmed that Heikki's proposed fix eliminated that failure.
- Heikki Linnakangas committed #4 unchanged as 1a43de5e0a and announced backpatching to all supported branches in #6; the diagnostic instrumentation was not included.
- After the race fix landed, Maxim Orlov proposed a separate patch in #7 to protect the 64-bit nextXid read with XidGenLock on platforms where that read is not atomic; the thread ends with that proposal awaiting review.