model-writtenrun 2800 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tomas Vondra opened the investigation with stress tests showing that reconnects could move restart_lsn backward after a checkpoint had removed the required WAL, attaching diagnostic assertions and experimental Max() defenses in #1.
- Vondra identified an asymmetric if condition and a separate confirmed_flush regression in #2, while Masahiko Sawada explained how retained candidates and replayed RUNNING_XACTS records could install an obsolete restart position in #4.
- Vondra replaced the broad defenses with a focused else-if fix in #5, reporting that it stopped the replication failures while additional candidate-field assertions still failed.
- Vondra expanded the experiments in #10 to compare resetting slot state on acquisition against fixing LogicalIncreaseRestartDecodingForSlot(), reporting that either approach prevented the observed crashes but neither resolved confirmed_flush moving backward.
- Ashutosh Bapat argued that retained candidate pairs remain valid even when stale in #16 and questioned resetting effective xmin fields in #18, while Amit Kapila favored the targeted branch fix and retaining useful candidates in #19.
- Kapila proposed backpatching the functional fix separately from additional development-branch assertions in #23, and Vondra agreed in #26; confirmed_flush behavior remained a separate unresolved concern discussed in #24 and #25.
- Vondra handed the fix to Sawada in #29, and Sawada posted the extracted functional patch with a commit message in #30, leaving the reset experiment and assertions outside the proposed landing.
- Bapat supplied an independent snapshot-builder filtering experiment in #33, following his design in #22; his testing report in #31 said the candidate-skipping path had not been observed, and the thread never established this alternative as the chosen fix.
- Kapila approved the focused patch subject to simpler spinlock handling in #35, and Sawada incorporated that suggestion in #36.
- Sawada committed #36 unchanged apart from its base as 15dc1abb17, announcing in #39 that he accelerated the landing for upcoming minor releases and considered a contemporaneous buildfarm failure unrelated.
- Vondra requested a PostgreSQL 12 backpatch in #40, but Tom Lane declined in #41 because its exceptional release was restricted to a different regression fix.
- The thread ended with the functional fix committed and backpatched through PostgreSQL 13, while Vondra proposed the remaining restart_lsn assertions in #42 and left candidate resets, other backward-moving fields, and their justification unresolved.