model-writtenrun 1691 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Ryan Bird reported in #1 that PostgreSQL 14.18 repeatedly terminated a waiting WAL receiver during timeline divergence, causing monitoring to see misleading streaming status and delaying recovery of an unwritable synchronous cluster.
- Xuneng Zhou proposed separating the installation-flag reset from receiver shutdown in #2, preserving a waiting receiver while still clearing the flag required for safe archive recovery.
- Noah Misch confirmed the reachable-state reasoning in #6, requested a TAP regression test, and proposed asserting that WALRCV_STOPPING cannot occur on the non-shutdown path; he also explained that streaming status alone had never guaranteed replication health and suggested a possible future connecting status.
- Michael Paquier supplied a simpler regression test based on the absence of a termination log entry during a cascading standby's timeline switch in #7, and Xuneng accepted that approach over his standalone reproduction test in #8.
- Michael proposed a state-accessor wrapper and a complementary test proving that primary_conninfo reloads do generate the termination message in #9, so changes to that message could not silently invalidate the negative test; the additional assertion and positive test were intended for HEAD.
- Xuneng incorporated the tests and assertion into branch-specific variants in #10, after which Michael extracted the positive shutdown test as c9e38a569c and requested separate commits for the fix and assertion support in #11.
- Xuneng split the remaining implementation into three patches in #12; Michael approved the organization and identified an accidentally retained copy of the already committed positive test in #13, which Xuneng acknowledged in #14.
- Michael committed the conditional-shutdown fix and timeline-switch test from #12 as 17b2d5ec75, with helper placement and comment refinements and without the duplicate positive test.
- The other two components of #12 landed separately as the state accessor e0ca61e7c4 and the WALRCV_STOPPING assertion 65f4976189, with only comment edits.
- After those commits, Michael proposed additional startup-process assertions in #15, and Xuneng approved them in #16.
- Michael confirmed in #18 that the regression fix had been applied to all supported stable branches through PostgreSQL 13 for the upcoming minor releases.
- The additional startup-process assertions landed unchanged from #15 as 2fc3107962, with Michael announcing completion on HEAD in #19.
- Noah clarified in #20 that the message for 17b2d5ec75 incorrectly described WALRCV_STOPPED as unreachable, while confirming that the implementation handles that state correctly; Michael reported no outstanding work in #21, leaving the suggested connecting status as an unimplemented future idea.