model-writtenrun 3758 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Nathan Bossart proposed a common pqsignal() wrapper in #1 to prevent forked children from modifying shared memory through inherited backend signal handlers, centralize errno restoration, and remove superseded startup-process protection; he identified syscall overhead and racy pqsignal() return values as concerns.
- After reporting a Windows failure in #2, Nathan supplied #3, using PG_SIGNAL_COUNT to size the handler array on Windows.
- Andres Freund requested clearer process terminology, static assertions for signal bounds, and retention of defensive process-exit checks in #4; Nathan incorporated these requests in #6, narrowing the proposed revert to the obsolete startup handler check and its unused logging helper.
- Andres questioned whether default signal actions could leave forked children running in #4; Nathan explained why the relevant defaults and process-group signaling appeared safe in #5, and Andres reported no concrete counterexample in #8.
- Andres verified that intentionally inherited postmaster handlers remain safe because signals stay blocked until process globals are initialized in #7; Nathan added an assertion and explanatory comment in #9, then rebased the series in #10.
- Nathan reported that the wrapper barely appeared in profiling even under an extreme signal workload in #11, and Andres agreed in #12 that signal delivery costs made the additional getpid() call unlikely to matter.
- Nathan proposed tracking execution inside signal handlers in #14; Andres suggested broader assertions against unsafe operations and rejected throwing ERROR from a handler in #15, after which Nathan deferred that improvement to another thread in #16.
- Noah Misch explicitly reviewed and supported all three final patches in #17.
- Nathan committed the first patch from #10 unchanged apart from rebasing as 3b00fdba9f, introducing the common wrapper and backend PID protection.
- Nathan committed the errno-centralization patch from #10 as 28e4632509, adding a documentation update that removed obsolete manual errno preservation from the example handler.
- Nathan committed the third patch from #10 unchanged apart from rebasing as 8fd0498de2, removing the redundant startup check and unused logging helper while preserving the defensive process-exit checks.
- Nathan confirmed completion in #18; all three patches had landed on the development branch, with broader signal-handler state assertions left for separate work.