model-writtenrun 7045 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Oct - Dec 2024 · 5 entries
- Vitaly Davydov reported that advancing a physical slot during a checkpoint could let WAL removal overtake the slot's on-disk restart_lsn, leaving that position unusable after an immediate restart, and proposed retaining WAL according to a saved-LSN field in #1 and #2.
- Vitaly extended the implementation to handle persistent-slot initialization, saving, restoration and invalidation in #3, while noting that several recovery tests still needed attention.
- Tomas Vondra agreed that discarding WAL based on unflushed state was unsafe and proposed capturing the minimum required LSN before checkpoint slot synchronization in #5 and #6.
- Tomas then demonstrated that logical slots also suffered a concurrency race: another session could recompute the minimum after restart_lsn changed but before the slot was saved, and he supplied injection points and a TAP reproducer in #11.
- Vitaly retained the per-slot design through #12 and, after a gap, #13, adding fallback handling for an invalid saved LSN and a recovery-test checkpoint workaround.
Mar - Jul 2025 · 20 entries
- Alexander Korotkov requested recomputation after saved-LSN changes and tests that failed without the fix in #14, while Masahiko Sawada highlighted the ReplicationSlot ABI constraint for backpatching in #17.
- Vitaly switched to Tomas's checkpoint-start minimum in #20, merged the logical reproducer with a new physical-slot test, and separately proposed removing redundant ReplicationSlotsComputeRequiredLSN() calls.
- Alexander reviewed the invalidation path in #21; Vitaly explained its extra slot synchronization in #22, and Alexander reorganized the series and moved its tests into src/test/recovery in #23.
- The revisions through #29 improved comments, diagnostics and test placement, including explanations requested by Amit Kapila in #25.
- Amit challenged the checkpoint-only approach's interaction with logical-slot persistence in #30 and #33, leading Alexander to propose retaining the ABI-compatible fix for stable branches while restoring a per-slot saved position for HEAD in #34 and #35.
- Amit favored the saved-LSN direction and requested clearer naming and persistency comments in #38; Alexander revived Vitaly's earlier implementation in #39, added checkpoint recomputation, and eliminated the recovery-test workaround.
- Alexander finalized the HEAD series in #44, and Amit accepted proceeding with the LSN fixes in #45 while leaving the separate physical-slot xmin question open.
- The saved-LSN implementation from #44 landed as ca307d5cec, with its commit explanation rewritten to describe the HEAD-only shared-memory change.
- The checkpoint-start implementation from #29 landed for stable branches as 2090edc6f3, and the unchanged test member of #44 landed separately as eb124c3d6d.
- The optional recomputation-removal patch was excluded from those landings: Alexander had deferred that optimization to PostgreSQL 19 in #23, and it was absent from the final HEAD series in #44.
- Alexander Lakhin reported excessive test runtime and a buildfarm timeout in #46, then confirmed that Alexander Korotkov's initial runtime patch #48 reduced his test from 519 seconds to 29 seconds in #49.
- Tom Lane requested cleaner TAP diagnostics in #50, and Hayato Kuroda requested extension checks and advance_wal() in #52 and #54; these changes were combined in #60 and landed as 4464fddf7b.
- Vignesh and Tom reported failures of the new restart-LSN monotonicity assertion in #55 and #57, prompting the assertion-removal proposal bundled into #60.
- Amit challenged the initial explanation in #61, Hayato explained segment-start feedback in #62, and Vignesh supplied a reproducer showing a reconnect reporting an older replay position in #66.
- After the runtime changes landed, Alexander resent the remaining assertion deletion with corrected reasoning in #68; Vignesh requested mention of pg_basebackup in #69, which was included in 70d8a91f82.
- Zhijie Hou reported a new checkpoint crash with max_replication_slots set to zero in #71; Dilip Kumar proposed a guard in #72, Hayato supplied conditional-recomputation code in #73, and Alexander refined it to cover all slots in #75.
- Hayato and Dilip reviewed that refinement in #76, #78 and #79, and it landed with only comment wrapping changed as 7195c804bd.
- Hayato proposed documenting backward restart-LSN movement in #80, and Vignesh extended his diagnostic reproducer in #81 to show that a standby could recover using locally available WAL despite requesting older segments.
- Alexander questioned whether the multi-segment example actually moved the slot's restart_lsn backward in #82; at Amit's request in #84, the documentation discussion moved to thread #51950 in the final message, #85.
- The documentation follow-up subsequently landed as 0810fbb02d from the final wording submitted in #596005 in thread #51950, superseding this thread's draft #80; the optimization and physical-slot xmin question had no resolution recorded in this thread.