model-writtenrun 5278 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alvaro Herrera opened the thread with an ftruncate() EINTR retry patch after Nicola Contu's sporadic query failures persisted, choosing a focused fix rather than also protecting write() #1.
- Andres Freund objected that pending cancellation flags do not imply interrupts can be processed, while Thomas Munro demonstrated that Linux posix_fallocate() can return EINTR and undo its progress even with SA_RESTART, making repeated signals capable of preventing completion #2 #4 #6.
- Alvaro first removed the pending-interrupt checks and then moved retrying into the caller, but Andres's experiments showed that neither approach solved signal-induced starvation and supported blocking signals with unconditional EINTR retries #8 #10 #11.
- Thomas and Andres agreed to leave SIGQUIT available for immediate shutdown, and Thomas supplied a replacement series that blocked signals during allocation and separately removed Linux's redundant ftruncate() while expanding wait reporting #12 #13 #14 #15.
- Alvaro tested the signal-blocking patch successfully under GDB, while Andres requested ftruncate() retries for debugger-induced interruptions and questioned the misleading DSMFillZeroWrite event name #16 #17.
- Thomas landed the first part of #15 with an additional ftruncate() retry loop and errno preservation as 4518c798b2, backpatching the allocation fix to supported releases.
- Thomas landed the second part of #15, retaining retries for non-Linux ftruncate(), as 712704d353, and separately implemented Andres's naming feedback as 7bae3bbf62; the cleanup and new wait event were confined to development #18.
- Buildfarm failures exposed that DSM startup could clobber the postmaster's signal mask, so Thomas restricted mask manipulation to child processes in 80845b7c0b and then questioned the remaining assumption about the caller's original mask #19 #20.
- Alvaro and Tom Lane supported preserving the caller's mask, but Tom warned that changing the existing PG_SETMASK interface could break external callers; Thomas instead proposed using sigprocmask() directly in this POSIX-only code, and Tom accepted that choice #21 #22 #23 #24 #25.
- The save-and-restore patch #24 landed unchanged as 3b8d23a3e1, retaining the postmaster guard and receiving backpatches alongside the earlier fixes.
- The portability discussion prompted Thomas to replace Windows sigsetmask() emulation with sigprocmask(); after Tom's code inspection, #26 landed unchanged as c94ae9d827 #27 #28.
- A month later, Thomas extended the Windows cleanup with minimal sigaction() support, including handler masks and removal of manual postmaster signal masking, while leaving unused features such as sa_sigaction unimplemented #29.
- Justin Pryzby reported a recovery-test PANIC during that patch's testing, but Andres identified an existing hash-code problem unrelated to the signal changes #30 #31.
- Thomas landed the sigaction() patch #29 as b28ac1d24d with only comment and commit-message differences, closing the submitted work while leaving latch-based postmaster wakeups as a preferred future direction #32.