model-writtenrun 7567 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Thomas Munro opened the thread with #1, citing David Rowley's Windows recovery measurement of 93 seconds versus 70 seconds without repeated liveness checks, and proposed polling only every 1024 calls on platforms without postmaster-death signals.
- Heikki Linnakangas warned that throttling HandleStartupProcInterrupts() could delay death detection in sleeping recovery loops in #2 and identified ShutdownWalRcv() as another affected loop in #4; Thomas favored event-based waits while keeping barrier handling responsive in #3.
- Thomas's revision #5 converted recovery-pause and walreceiver-shutdown sleeps to WaitLatch(), documented the distinction between sleeping and CPU-bound loops, and supplied a prerequisite repair for using WaitLatch() without a latch.
- Fujii Masao identified promotion-latency and excessive-wakeup concerns in #6; Thomas outlined condition variables as a possible solution in #7 but initially deferred them because of uncertainty about startup-process interrupt handling.
- David Rowley reported successful Windows recovery tests for the latch repair in #8, and Thomas committed that member of #7 unchanged as 733fa9aa51, leaving the optimization under review in #9.
- Fujii questioned archive-recovery behavior with pg_standby in #10; Thomas explained that RestoreArchivedFile() could already block inside system(), treated subprocess interrupt handling as a separate issue, and resent the remaining optimization in #11.
- Michael Paquier questioned the counter's placement and suggested applying the wait-loop changes separately in #12; after several months, Thomas split the patches in #13 and revisited Fujii's latency concerns.
- Thomas replaced the timed polling waits with walreceiver-state and recovery-pause condition variables in #14, then confirmed that CHECK_FOR_INTERRUPTS() was already reachable from the startup process in #15.
- Michael requested a named constant for the polling interval in #16, and the polling member of #14 landed as 57dcc2ef33 with that constant, a named unsigned counter, and revised comments.
- The walreceiver member of #14 landed as de829ddf23, with its condition variable narrowed to STOPPED transitions instead of broadcasting every state change, as Thomas explained in #17.
- The recovery-pause member of #14 landed as 600f2f50b7, adapted to newer pause-state management and extended to RecoveryRequiresIntParameter(); Thomas left consolidation of the two pause loops for later in #17.
- Fujii supplied a follow-up naming cleanup in #18, Thomas endorsed it in #19, and the unchanged rename from WalrcvExit to WalReceiverExit landed as 84007043fc.
- Thomas proposed broader SIGIO-based postmaster-death notification in #22 and posted a separate proof of concept in #23, reporting success on several Unix systems while asking about portability to illumos, AIX, and HPUX.
- Heikki favored trying the SIGIO patch after branching in #24, while Tom Lane examined HPUX 10.20 and concluded that its SIGIO visibility would disable the feature under the proposed guard in #25.
- Thomas withdrew the SIGIO experiment in #26 after discovering that only the last backend to call F_SETOWN on the shared pipe would receive the signal; the five earlier commits remained landed, and a separate pipe per backend seemed unjustified.