model-writtenrun 4974 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Thomas Munro proposed replacing walreceiver's ten idle wakeups per second with deadlines for termination, pings, status replies, and hot-standby feedback #1.
- Kyotaro Horiguchi questioned unnecessary state refactoring and found missing handling for disabled timeouts; Thomas retained a shared deadline-computation helper, fixed those cases, renamed the termination deadline, and revised timestamp handling #2 #3 #4.
- After an eight-month gap, Nathan Bossart took over with Thomas's encouragement, and they agreed to round sleeps upward to avoid spinning when a deadline was less than a millisecond away #5 #6 #7.
- Nathan split state refactoring from wakeup scheduling and removed redundant timeline arguments; Alvaro Herrera requested moving more API changes into the preparatory patch, while Nathan defended upward rounding as avoiding busy loops without materially hurting responsiveness #8 #9 #10.
- Bharath Rupireddy's review led to portable integer constants and overflow-safe timestamp arithmetic, and Nathan separately fixed narrowing of long sleep durations by clamping them to INT_MAX #11 #12 #13 #14.
- Bharath challenged timestamp-call optimizations and Alvaro questioned the state struct's scope, prompting Nathan to replace the two-patch series with a much smaller file-global wakeup array and defer broader refactoring and timestamp optimizations #15 #19 #20 #23.
- Kyotaro endorsed the simpler implementation and requested clearer sleep clamping; Nathan incorporated that cleanup while declining Bharath's proposed cached minimum because its complexity lacked a demonstrated benefit #24 #25 #27 #28.
- Thomas committed #28 as 05a7be9355, adding static linkage for the wakeup array, pgindent formatting, and the enum's typedef-list entry #29 #30.
- Bharath and Thomas supported extending the approach to idle logical-replication workers, and Nathan volunteered to pursue it, but that extension did not become an attached series in this thread #31 #32 #34 #35.
- Tom Lane then bisected a substantial check-world slowdown to 05a7be9355, reporting slower base-backup, rewind, and recovery tests; Nathan also found that his separate logical-worker experiment called table-synchronization processing too infrequently and initially suspected a revert would be necessary #36 #38.
- Thomas first tried restoring frequent replies while write or flush positions differed, but immediately acknowledged that this experiment did not correctly account for the apply position #40 #41.
- Thomas then identified the actual startup regression: the old code sent its first idle reply after roughly 100ms, whereas the new deadline initialization could delay it by the full ten-second status interval #43.
- Nathan replaced the frequent-reply experiment with immediately due initial reply and feedback deadlines; testing by both developers restored recovery-test performance, and Thomas's measurements reduced aggregate catchup waits from about 173 seconds to about 35 seconds #44 #45 #46 #47.
- Nathan simplified the fix further by directly forcing initial reply and feedback messages when streaming starts, reporting the same recovery-test improvement #48.
- Thomas proposed guarding the initial reply when wal_receiver_status_interval was disabled, and Nathan agreed that this preserved consistent behavior across repeated streaming rounds #49 #50.
- Thomas ultimately dropped that guard because other paths already force replies, committing Nathan's unchanged #48 as 5db195f76f and resolving the regression without reverting the wakeup optimization #51.
- The thread ended with both changes landed; Thomas left a possible condition-variable improvement to wait_for_catchup for future work because hundreds of polling waits still consumed about 35 seconds overall #51.