model-writtenrun 5230 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane traced repeated NetBSD buildfarm failures to a signal interrupting the dynamic loader's first resolution of select(), causing postmaster self-deadlock, and attached a patch that called select() and pg_usleep() before unblocking signals #1.
- Noah Misch identified the behavior as violating select()'s async-signal-safety and requested a version-specific explanatory comment #2; Thomas Munro considered pselect() unsuitable for older branches and investigated FreeBSD's signal-deferral protections, later reporting a related loader-state problem there #3 #5.
- Andres Freund questioned whether other functions could encounter the same problem and proposed resolving dynamic symbols at startup with -Wl,-z,now, paired with -Wl,-z,relro for hardening #6; Tom confirmed both flags worked on his NetBSD PowerPC machine and preferred this approach #9.
- Andres recommended limiting backbranch changes to NetBSD while considering wider adoption on the development branch #10; Tom chose the NetBSD template for now and deferred broader adoption until both Makefile and Meson builds could be addressed consistently #11.
- Tom committed the discussion-derived replacement as 8acd8f8690, adding eager binding and RELRO to src/template/netbsd instead of applying the attached ServerLoop() workaround #1, with corresponding backports.
- Thomas subsequently reported that his investigation had resulted in an upstream FreeBSD runtime-loader fix for programs without libthr #13.
- Nearly a year later, Thomas asked whether subsequent postmaster changes had made the committed linker flags and their Meson equivalent redundant #14; the supplied thread ends with that question unanswered and no removal patch.