model-writtenrun 822 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported a buildfarm failure where logical decoding requested an obsolete timeline during standby promotion, and reproduced it by delaying the walsender immediately after slot acquisition #1.
- Bertrand Drouvot proposed consulting the insertion timeline before recovery is marked complete #2, and Xuneng Zhou identified the same vulnerability in the local WAL reader used by SQL logical decoding #3.
- Hayato Kuroda supplied an unsuccessful reproducer that focused on post-promotion WAL #4; Xuneng explained that pre-promotion WAL could already require the new timeline's segment while RecoveryInProgress() still returned true #5.
- Bertrand submitted separate fixes and tests for the walsender and local-reader paths, using GetWALInsertionTimeLineIfSet() and a startup injection point after old WAL segment cleanup #6.
- Xuneng reworked Hayato's reproducer to delay decoding until startup was paused during promotion and confirmed that Bertrand's fix resolved the failure #7; Bertrand preferred the submitted regression test because it needed only one clearly named injection point #8.
- Hayato added a physical-streaming reproducer and possible fix #10, but Bertrand requested a separate thread because it was a distinct problem and the attachments displaced his series in cfbot #11, then resent the logical-decoding patches unchanged #12.
- Hayato questioned the asynchronous SQL test #14, while Xuneng challenged the synchronization and loose output checks #15; Bertrand revised both tests to verify exact results before releasing startup #16, and Xuneng accepted that single-injection-point design #17.
- Michael Paquier assessed the bug as an availability issue recoverable by retrying, identified additional local-reader callers, supported separating physical replication, and accepted adding the missing helper to PostgreSQL 16 #19.
- Michael backported GetWALInsertionTimeLineIfSet() to PostgreSQL 16 without a matching attached patch in 2a04624daa, then committed the walsender fix and test from #16 with explanatory edits in eb4e7224a1.
- Michael reported hundreds of successful repeated test runs but also PostgreSQL 17 buildfarm failures caused by missing injection_points availability checks #20; he removed only that branch's new test and injection point in c011d5b654, retaining the backend fix and newer-branch coverage.
- Xuneng pointed out repack and two-phase-commit callers of the local reader #21; Michael committed the remaining local-reader fix and SQL test from #16 with light editorial changes in a8ee70bd5e.
- Michael declared both logical-decoding fixes complete, explained why repack and two-phase-commit callers were irrelevant to this standby race, and limited backpatching to PostgreSQL 16 rather than extending the local-reader fix to PostgreSQL 14 and 15 #22.
- Bertrand and Xuneng accepted the backpatch scope #23 #24; the logical-decoding series was fully landed, with tests retained on PostgreSQL 18 and newer, while the physical-replication proposal remained deferred to separate work.