model-writtenrun 9885 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Marco Pfatschbacher opened the thread with #1, reporting that shared monitoring-pipe reads caused severe OpenBSD scheduling overhead and proposing separate pipes for auxiliary processes and backends.
- Andres Freund and Tom Lane objected to the descriptor and process-startup costs in #2 and #4, while Thomas Munro and Tom explored kqueue-based monitoring in #3 and #5; the separate-pipe proposal was not adopted.
- Andres suggested avoiding unconditional PostmasterIsAlive() calls in #9, Robert Haas explained that latch return codes already provided reliable death notification in #10, and Thomas implemented that approach for archiving and replication in #11.
- Andres cautioned in #12 that busy loops might never reach their waits, so replacing unconditional checks could change when processes notice postmaster death.
- After a long gap, Marco supplied an inline getppid()-based alternative in #13, while Thomas reported successful kqueue process-exit monitoring and questioned redundant system calls in #14; neither alternative became the attached series that landed here.
- Thomas revived the return-code patch in #15 but proposed centralized exit handling, while discussion through #18 and #20 separated cheap signal-driven checks for busy loops from wait-based cleanup.
- Thomas explicitly split the Linux signal work into thread #38497 and posted default automatic exit handling here in #21, then fixed an out-of-bounds event-array scan in #22; the separate Linux work landed as 9f09529952, whose trailer also credits this thread's design discussion.
- Heikki Linnakangas argued in #23 for explicit opt-in with an assertion requiring callers to handle postmaster death, leading Thomas to introduce WL_EXIT_ON_PM_DEATH and repair previously unhandled waits in #24.
- Kyotaro Horiguchi questioned backend shutdown semantics in #25, and Thomas corrected syslogger handling in #26 so it could collect other processes' final messages; #28 retained pgstat's special cleanup and deferred broader WaitEventSet reuse to separate work.
- After the rebase in #29, Kyotaro audited the call sites and found unused flags and documentation issues in #30; Thomas addressed them and standardized termination on proc_exit(1) in #32, which Kyotaro accepted in #33.
- Tom Lane's review in #35 requested explicit casts for ignored return values and direct termination inside the platform-specific death-detection branches, avoiding an event scan on every wait; Thomas implemented both changes in #36.
- Thomas committed #36 as cfdf4dc4fc with one harmless pointer-increment cleanup omitted and confirmed the push in #37, completing the cleanup series while leaving recovery-loop check frequency, broader event-set reuse and operating-system monitoring improvements as future work.