model-writtenrun 8351 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexey Kondratov reported that advancing a physical replication slot lost its position even after a clean restart and proposed fixing the unreachable saving path in #1; Kyotaro Horiguchi objected to changing user-visible return values in #2, leading to an LSN-comparison revision in #4.
- Kyotaro Horiguchi proposed making the modifying helpers dirty their slots and exposing a dirty-state query in #5; Alexey corrected that implementation in #6 while questioning whether the new API was necessary.
- Concerned that WAL could become removable before slot state was saved, Alexey moved saving and recomputation into the slot-specific paths and adjusted logical restart-LSN handling in #7.
- Kyotaro argued that the stronger persistence guarantee and replication-protocol changes exceeded this fix's scope, supplying a narrower SQL-path patch in #8; Alexey retained it with explanatory comments in #9.
- Michael Paquier introduced an explicit advance_done flag and physical/logical restart tests in #10; Alexey identified a logical no-op flag issue in #11, and Andres Freund questioned the interface changes and requested real-LSN tests in #12.
- Kyotaro and Craig Ringer examined the costs and semantics of forced flushing in #13, #14, and #17; Michael ultimately chose checkpoint-based persistence, removed immediate saving, documented possible rollback after crashes, and revised the tests in #18, leaving an explicit flush option for future work.
- Kyotaro verified the final code and tests and requested less implementation-specific documentation in #20; Michael supplied that wording in #22 and committed #18 with only documentation edits as b0afdcad21, announcing backpatches through PostgreSQL 11 in #24.
- Months later, Andres reopened the thread in #26 because advancing a physical slot still failed to update the global minimum LSN, preventing retained WAL from becoming removable without an independent recomputation.
- Alexey restored physical-slot LSN recomputation in #27, and Michael added a WAL-recycling regression test in #28; Kyotaro reported successful testing in #29, while Alexey reported stable repeated runs in #30.
- Michael moved both LSN and xmin recomputation to the common SQL wrapper in #31, deliberately allowing recomputation even without advancement, and committed it unchanged apart from comment wrapping as b48df818dc; his announcement in #32 described additional test adjustments needed for stable branches.
- After the second commit, Alexey proposed avoiding redundant calculations by moving them back to the modifying paths and correcting logical.c's updated_restart condition in #33.
- Amit Kapila challenged the assumption that logical advancement always recomputes the thresholds and requested a test in #34; Michael defended unconditional recomputation for simplicity, consistency, and explicit threshold refresh in #35, leaving both fixes landed and Alexey's final cleanup proposal uncommitted.