model-writtenrun 4517 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Feb - Mar 2023 · 3 entries
- Kartyshov Ivan reopened the read-your-writes problem for asynchronous replicas in #1, supplying WAIT syntax, AFTER syntax, and SQL-callable alternatives while leaving the client responsible for carrying the primary's LSN.
- Greg Stark preferred a single callable interface with a timeout in #2, Michael Paquier examined snapshot and replay-loop implications in #3, and Peter Eisentraut proposed eventual protocol-level support while accepting functions as an incremental step in #4.
- Ivan selected pg_wait_lsn() in #5, fixed build integration, and kept it current through the June rebase in #8.
Oct 2023 - Apr 2024 · 19 entries
- Korotkov identified snapshot conflicts, unsafe atomic accesses, and a waiter-registration race in #9, then reproduced recovery cancellation and primary-side hanging in #10.
- Ivan attempted to avoid snapshot interference by manipulating xmin in #11 and #16, but Korotkov explained in #14 and #17 that releasing or restoring xmin could invalidate a surrounding query's snapshot.
- The function alternative was dropped in #20; atomic-access fixes and documentation followed through #24, including Dilip Kumar's request in #23 to make the alternatives understandable.
- After Amit Kapila favored AFTER syntax and requested a concrete usage explanation in #26, Korotkov took over substantial implementation work in #27, retaining BEGIN AFTER and introducing sorted waiters, immediate removal, cleanup, and race rechecking.
- Lakhin's cosmetic feedback entered #29, while Ivan independently added completion, examples, and a replay fast path in #30, then combined those changes in #31.
- Bharath Rupireddy reviewed validation and replay overhead in #33, and Amit questioned implicit transactions and the lack of syntax consensus in #34, preventing the proposed immediate landing.
- Korotkov proposed a real stored procedure with non-atomic execution and snapshot release in #36, then supplied that redesign in #38, eliminating the need for new SQL grammar.
- Ivan developed the procedure through #46, adding defaults, tests, and documentation while reviewers debated timeout limits and units; Korotkov explained the application or pooler usage model in #52 and deferred protocol integration.
- Korotkov renamed the procedure and expanded its documentation in #55, then moved latch operations outside the spinlock in #57 after Thomas Munro's objection in #56, also incorporating Lakhin's fixes.
- Euler Taveira proposed pg_wal_replay_wait() in #59, which was adopted in #60; Euler's and Pavel Borisov's arguments led to bigint milliseconds in #63 instead of floating-point seconds.
- Promotion wakeups were added in #65, and Bharath's detailed review in #66 produced clearer errors, negative-timeout rejection, and documentation improvements in #69.
- Andy Fan proposed returning elapsed waiting time in #72, but Ivan and Korotkov retained a void procedure and pointed to client timing and wait-event monitoring in #73 and #76.
- The first landing, 06c418e163, came from #69 with catalog-snapshot invalidation, a catalog-version bump, and a corrected timeout-test expectation.
- Herrera reviewed the landed locking and array design in #79, and Daniel Gustafsson reported a compiler warning in #80; their inline fixes, together with a separately credited Sawada report, became e37662f221.
- Herrera's scaling concern led Korotkov to propose an in-place shared-memory pairing heap in #82 and commit that structural replacement as bf1e650806 without an intervening attachment.
- Herrera supplied the LWLock conversion in #83, and Korotkov combined it with stronger state protection in #86; those two patches landed separately as 25f42429e2 and ee79928441.
- Herrera also questioned missing error cleanup and inadequate multi-waiter coverage in #87; the cleanup concern produced 74eaf66f98, while Ivan supplied additional replication tests in #89.
- Heikki Linnakangas demonstrated waiter-removal races and questioned snapshot assumptions and multi-command usability in #90, recommending postponement beyond PostgreSQL 17.
- Korotkov reverted the feature and its five follow-up commits with 772faafca1, confirmed the decision in #91, and received a concrete multi-command failure example from Heikki in #92.
Jun - Sep 2024 · 12 entries
- Ivan restarted the work for PostgreSQL 18 in #93, incorporating the earlier infrastructure fixes, unconditional waiter cleanup, expanded replication tests, and an injection-point test.
- Korotkov relaxed the non-atomic restriction to a snapshot check and added actual simultaneous-waiter coverage in #94, then questioned the injection test's ability to reproduce the reported race in #95.
- Kyotaro Horiguchi's review in #96 identified a logical-walsender assertion failure and proposed clearer documentation, latch pointers, and timeout refinements; Ivan and Korotkov incorporated these through #97 and #99.
- Korotkov removed the injection test in #99 because its complexity obscured what it tested, fixed documentation and background-session shutdown in #100, and removed the insufficiently motivated cascading tests in #101.
- The final snapshot revision in #101 checked both active and registered snapshots with GetOldestSnapshot() and documented the allowed execution contexts; Korotkov committed it as 3c5db1d6b0 with only rebase adjustments, procedure OID assignment, and a catalog-version bump.
- Kevin Hale Boyes spotted a documentation typo and questioned promotion-check ordering in #102; the typo became 8036d73ae3, while the promotion question prompted the follow-up series in #104.
- Michael Paquier reported an intermittent drongo test failure in #105; Korotkov investigated background psql startup and reported in #108 that repeated runs had not reproduced it, allowing the follow-up work to proceed.
- After cosmetic corrections and an uninitialized-variable fix, the promotion patch from #110 landed as 867d396ccd, ensuring that recovery ending does not cause an error when the target LSN was already replayed.
- Korotkov reported in #111 that extended testing with Andrew Dunstan still could not reproduce the drongo failure, leaving that isolated failure under observation.
- Lakhin reproduced a different promotion-test race on a slow ARM system in #112 and also identified wording problems; Korotkov responded with cleanup and a catch-up-only test fix in #113.
- Lakhin showed that the first fix still failed in #114, and Korotkov determined that the observed insert LSN might not yet be written, adding pg_switch_wal() before wait_for_catchup() in #115.
- The final message, #116, confirmed 100 successful test runs; later that day the cleanup landed as 85b98b8d5a and the promotion-point fix as 2520226c95, leaving the feature and this reported regression fixed.