model-writtenrun 7098 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jan - Feb 2024 · 1 entry
- Bharath Rupireddy opened the thread with checkpoint-driven XID-age and inactivity limits, generic invalidation reporting, and persistent inactivity timestamps and counts to address slots retaining WAL and transaction horizons indefinitely #1.
Mar 2024 · 15 entries
- Discussion distinguished recovery conflicts from other invalidation causes, leading to a conflicting boolean for recovery conflicts alongside a general invalidation_reason column #25 #50 #53.
- Shveta Malik found that SQL consumers escaped timeout handling because timestamps were maintained only for walsenders, while Amit Kapila questioned whether checkpoint-based XID checks would release horizons when vacuum needed them #45 #31 #42.
- Amit and Bertrand Drouvot favored per-slot timeout configuration, and Bharath implemented SQL, replication-command and subscription controls with failover synchronization and upgrade propagation; the inactivity counter was set aside for separate statistics work #43 #67 #70 #74.
- Bertrand argued that server downtime should not count toward inactivity, prompting shared-memory timestamps and timeout checks at acquisition, view access and checkpoint, while the XID-age companion was postponed #79 #81.
- The series then added pg_alter_replication_slot but dropped subscription-side timeout configuration because independently changing the publisher's slot could leave subscription metadata inconsistent #84 #102.
- The reporting component of #102 landed as 6ae701b437, adding invalidation_reason and restoring conflicting as a boolean, with only a catalog-version bump beyond the attached patch.
- Bertrand's testing established that inactivity timestamps were useful for monitoring independently of automatic invalidation, so Bharath extracted last_inactive_time and added dedicated TAP coverage #103 #105 #108 #114.
- Amit supplied a comment fix-up, and Shveta's promotion test led to excluding synchronized standby slots from timestamp updates; the resulting #135 landed as a11f330b55 with an explicit restore-time zero assignment and comment edits #123 #127 #136.
- After that landing, Shveta found that RecoveryInProgress() was always true while restoring slots, leaving formerly synchronized slots without a timestamp after a promoted server restarted, and Bharath combined a repair with the clearer name inactive_since #139 #143.
- Nathan Bossart argued that administrators protecting fleets needed server-level policy, reopening the choice between per-slot timeout settings and a GUC #140.
- Shveta supplied an alternative preserving synchronized slots' own timestamps, while Bertrand favored retaining the primary's inactivity information; Bharath initially chose copied primary timestamps and separated that behavior from the rename #155 #162 #164.
- The rename component of #164 landed as 6d49c8d4b4, with only catalog-version bookkeeping added; this separated patch supersedes the earlier attachment #557906 credited by thread #49359, while synchronization behavior and timeout invalidation remained under review.
- The remaining synchronization patch gained timestamp-conversion fixes and shared TAP helpers, while a concurrent manual-synchronization shutdown race was identified for separate work #168 #169 #172 #175.
- Bharath restored the timeout companion using a server GUC instead of the earlier per-slot API, incorporating the administrative-policy discussion #180.
- Amit questioned copying a value affected by local slot acquisition, and Masahiko Sawada highlighted differing clocks; Bharath switched synchronized slots to local timestamps, exempted them from standby timeout invalidation and reset their timestamps at promotion #184 #194 #199.
Apr 2024 · 3 entries
- Amit's final review found that the promotion reset also ran during ordinary primary startup, so Bharath added a StandbyMode guard and Shveta tested it; 6f132ed693 then landed with comment-only edits from #217, superseding the earlier #557906 credited by thread #49359 #216 #218.
- Timeout work resumed separately, and Amit's objection to duplicated invalidation helpers led Bharath to reuse InvalidatePossiblyObsoleteSlot instead #219 #222 #223.
- Bharath restored XID-age invalidation and reported a wraparound-avoidance experiment, then added once-per-vacuum checks after discussion of when horizons actually needed releasing, retaining checkpoint checks for standbys and documenting unresolved tradeoffs #224 #229 #230.
Jun - Sep 2024 · 2 entries
- Later review removed redundant horizon recalculation and shutdown-time timeout checks, and Peter Smith argued against invalidating a slot just as a client acquired it; Bharath made timeout invalidation checkpoint-only and again deferred the XID companion #235 #237 #238 #239.
- Shveta's testing exposed misleading errors and changing timestamps after invalidation, leading to timestamp-preservation and test corrections, while invalid-slot alteration was moved to separate work #244 #245 #246 #249 #257.
Nov 2024 - Feb 2025 · 14 entries
- After a gap, Nisha Moond took over the remaining patch, rebased it and fixed restart assertions and timeout applicability on standbys and promoted servers #270 #273.
- Nisha separated general invalid-slot acquisition errors from the timeout feature, then addressed Vignesh's temporary-slot assertion report and Peter's unlocked eligibility-check race #277 #281 #283 #286 #287.
- Hayato Kuroda identified timeout overflow and interactions with pg_upgrade and pg_createsubscriber, which Nisha corrected; Peter's public naming proposal subsequently produced idle_replication_slot_timeout and idle_timeout, with documentation explaining checkpoint latency #290 #293 #302 #305.
- Amit requested minute units and a proposed one-day default, making the tests slow again, so Peter advocated retaining them behind PG_TEST_EXTRA rather than discarding coverage #314 #315 #322 #323.
- An intermittent existing timestamp-test failure reported by Mihail was traced by Hou to backward-moving WSL clocks, while Vignesh's separate eligibility review led to excluding slots that did not reserve WAL #316 #317 #329 #333.
- Amit requested moving general acquisition cleanups to another thread, and Nisha split the timeout feature from its tests; after Amit rejected the remaining long test duration, Hayato supplied a fast injection-point alternative that Nisha forwarded and refined #342 #345 #349 #350 #353.
- Vignesh supplied a fix-up consolidating checkpoints and correcting the injection guard, which Nisha incorporated, while unrelated invalid-slot timestamp and copying behavior moved to separate discussions #354 #360 #363 #368.
- The proposed one-day default was replaced with a disabled default, and Nisha omitted the slow PG_TEST_EXTRA alternative, leaving the main feature and injection-point test for commitment #367 #369.
- Amit requested a single pass for WAL and timeout invalidation and reconsidered shutdown checkpoints, leading to a bitmap-based implementation; review then corrected sparse cause-name lookup and multi-cause control flow #376 #381 #382 #383 #384 #386.
- Hou supplied a horizon-condition fix, and subsequent review extracted cause-selection helpers and uncovered an acquisition/invalidation race; Nisha incorporated these corrections along with Hayato's test extension-check ordering fix #397 #399 #406.
- Álvaro Herrera and Nathan renewed concerns that inactivity limits would not protect against active slots causing storage or XID exhaustion, while Amit and Hou clarified the abandoned-slot cleanup use case #401 #402 #404 #405.
- Peter's final review and Amit's attached cleanup produced #410, whose feature patch landed as ac0e33136a with only a rewritten comment #407 #409.
- The injection-point test from the same #410 landed separately as 8a695d7998, with small test-injection, comment and include-order adjustments, and Amit announced the completed landing #413.
- At the end of the thread, timeout invalidation and its fast test had landed and the commitfest entry was closed, while XID-age protection remained uncommitted and was explicitly left for a new thread #411 #412 #414.