model-writtenrun 8605 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Noah Misch traced intermittent ten-second subscription-test stalls to WalSndLoop() sleeping before the keepalive needed to advance replication status, and proposed routing caught-up waiting through WalSndWaitForWal() in #1; that patch landed unchanged as 4216858122.
- After the first landing, Noah reported more frequent BSD buildfarm races and considered reverting temporarily in #2, while Tom Lane argued in #3 that the separate race should soon be fixed and did not justify reverting.
- Noah also reproduced an independent recovery-test race by delaying WAL transmission and proposed waiting for replication before immediate shutdown in #2; d60cfb6bf2 added that wait and was backpatched to PostgreSQL 10.
- In #4, Noah relayed Fujii Masao's report that the first patch made idle physical walsenders consume 100% CPU, because XLogSendPhysical() returns immediately when caught up, and initially favored making it wait like XLogSendLogical().
- Kyotaro Horiguchi questioned the shared waiting function and latch handling in #5, Tom Lane highlighted logical-replication-specific behavior in #7, and Fujii favored either another keepalive call or a minimal logical-only waiting change in #8.
- Noah chose the minimal conditional fix in #9, attaching both a revert and a replacement that preserves physical-replication sleeping in WalSndLoop(); he also explained why the existing latch-reset ordering was valid.
- Fujii examined the replacement's blocking comment in #10, Noah explained why it specifically names WalSndWaitForWal() in #11, and Fujii accepted that explanation in #16; Kyotaro acknowledged in #15 that the current version could not have his suspected latch problem.
- At the thread's last message, Michael Paquier reported that idle physical and logical walsenders no longer consumed 100% CPU in #17, leaving the reviewed replacement awaiting commitment.
- The two parts of #9 subsequently landed together: 72a3dc321d applied the revert unchanged, and f246ea3b2a applied the replacement with only a comment punctuation correction.