model-writtenrun 1477 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Nov - Dec 2022 · 5 entries
- Amit Kapila opened the investigation after a CI assertion failure during table-sync slot creation showed that the snapshot xmin could precede the supposedly safe decoding horizon, although his initial code inspection found no explanation #1.
- Andres Freund proposed replacing the assertion with an unconditional error reporting both transaction IDs and strengthening snapshot checks, while Thomas Munro explained that nearby missing-contrecord errors could result from shutdown and Takamichi Osumi reported unsuccessful reproduction attempts #2 #4 #5.
- Amit's diagnostic patch grew to invalidate catalog snapshots before checking MyProc->xmin, reject existing snapshots, and require a read-only transaction; Andres reviewed these changes and approved the final submission #7 #10 #13 #14 #15.
- Amit committed the final diagnostic patch unchanged as 240e0dbacd, improving safety and future diagnostics while the underlying race remained unresolved #16.
- Masahiko Sawada subsequently reproduced the failure and identified an outdated aggregate xmin overwriting a newly initialized slot's protection; his first fix held ProcArrayLock throughout slot aggregation #17.
Jan - Feb 2023 · 4 entries
- Hayato Kuroda independently reproduced the failure and requested an exclusive-lock assertion, while Amit supplied a debugger-based reproducer and requested preservation of the exposed API on stable branches #19 #20 #25 #26.
- Sawada supplied revised patches for HEAD and stable branches and incorporated Amit's request to explain why aggregation needed protection from concurrent slot initialization #29 #30 #32.
- Andres objected to scanning slots while holding ProcArrayLock exclusively and proposed acquiring ReplicationSlotControlLock first and retaining it through the global update; Amit clarified the exclusive-lock approach, which Sawada implemented #35 #37 #39.
- Andres also suggested simplifying initial horizon installation, but Amit questioned its benefit for infrequent slot creation, and that separate redesign was not pursued in the submitted fix #36 #38.
Jan - Feb 2024 · 1 entry
- After progress stalled, Robert Haas questioned the performance assumptions and suggested preventing xmin retreat directly; the patch was returned with feedback, although Alexander Lakhin later reproduced the failure with a concurrent workload and confirmed that the lock-inversion patch fixed it #41 #43 #44.
Oct - Dec 2025 · 8 entries
- Pradeep Kumar revived the work in October 2025 by finding that the old patch missed the newer slot-synchronization caller, then submitted a complete updated patch adding the required lock in slotsync.c #45 #47.
- Zhijie Hou explained that simply preventing horizon reset would interfere with dropping or invalidating the last slot; Amit and Sawada agreed to retain lock inversion instead #51 #52 #53.
- Hou added locking for the newer conflict-detection slot caller in launcher.c and supplied branch variants, while explaining that an injection-point test inside the lock-holding function appeared impractical because of interrupt handling #55.
- Hou then reduced contention by using exclusive ReplicationSlotControlLock only for initial slot xmin installation and shared locking for ordinary aggregation; Amit endorsed this revised approach #56 #57.
- Sawada challenged whether concurrent aggregation could regress catalog xmin or become unsafe after a crash, and Hou explained that slot positions and horizons are persisted before effective horizons advance, so temporary regression only retains unnecessary tuples #61 #62 #63 #64.
- Sawada accepted that reasoning and requested comments documenting lock order and harmless regression; Hou added them, and Sawada prepared the final branch patches with minor editorial changes #65 #66 #67.
- Chao Li approved the final master patch with three comment corrections, and the thread ended with Sawada agreeing to incorporate them and limit backpatching to PostgreSQL 14 and newer because PostgreSQL 13 was no longer supported #68 #69.
- The supplied race-fix commit 57048d6e17 followed immediately, deriving from the final branch submission #67 with light comment corrections; both the diagnostic change and the underlying race fix had then landed.