model-writtenrun 7150 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jun - Oct 2023 · 7 entries
- Heikki Linnakangas opened the thread with #1, proposing a common postmaster_child_launch() interface, typed child dispatch, startup-data blobs, and a smaller ClientSocket structure to reduce differences between fork and EXEC_BACKEND startup.
- Tristan Partin reviewed the preparatory patches in #2, while Andres Freund requested a separate shared-memory attachment refactor, designated child-type indexes, and less duplicated initialization in #3.
- Heikki isolated listen-socket FD_CLOEXEC handling in #4, retained LOG for administrator-facing close failures, and committed it unchanged as b0bea38705 after Thomas Munro approved and tested it in #5.
- Jeff Janes reported repeated close failures with logging_collector in #7; Michael Paquier had already posted a fix in thread #48355 at #541178, but Heikki independently submitted the later initialization patch in #8, whose initialization placement and callback registration were revised following #9 before landing as 5fec3c870e, credited to Michael and backpatched.
- Heikki then proposed tracking the number of live listen sockets in #11, landing e29c464395 with additional array cleanup; Michael's crash diagnosis in #13 and #14 immediately led to the NULL-pointer guard in 5da0a622e8.
- The original connection-acceptance check relocation from #1 landed unchanged as 16671ba6e7, and #17 resumed the remaining six patches with review fixes and working Windows support.
- In #17, Heikki defined launch_backend.c's role as restoring equivalent post-fork state across platforms, leaving broader process initialization outside that abstraction and retaining readable child names on the command line.
Nov 2023 - Jul 2024 · 26 entries
- The revision in #18 separated shared-memory creation from attachment and moved attachment into InitProcess(); Tristan endorsed the first three patches in #19, while Andres requested smaller mechanical commits and unified process-type enums in #20.
- Andres's observation that auxiliary processes lacked InitLWLockAccess() in #20 produced f93133a250, restoring developer-only LWLOCK_STATS output without backpatching, as explained in #23.
- The obsolete signal-handler explanation for set_stack_base() was identified in #21; Thomas Munro retained the call for consistent stack measurement and rewrote its comment in 3b51265ee3, following #22.
- Heikki narrowed the next submission to initialization prerequisites in #26, replacing the unreliable nonempty-bgw_name test with explicit worker presence and passing BackgroundWorker through the fork functions.
- Alexander Lakhin's EXEC_BACKEND Valgrind report in #27 exposed pre-existing uninitialized parameter padding, fixed by b19890d49d; Heikki declined backpatching in #29, and Tom Lane supported that decision in #31.
- Alexander found additional worker-padding failures in #32, so the BackgroundWorker patches from #26 were squashed with zero-initialization and a clearer has_bgworker name into 388491f1e5.
- The shared-memory split and InitProcess changes from #26 landed unchanged as 69d903367c and fd5e8b440d, with completion reported in #33.
- The remaining launch work returned in #34, now split into callback extraction, file movement, auxiliary initialization, common launching, and backend_startup.c extraction; moving fork_process() and InitPostmasterChild() was deferred because its benefit was uncertain.
- Heikki opened an independent process-type cleanup in #35, replacing AuxProcType and selected process flags with MyBackendType while retaining am_walsender for symmetry with related flags; its indexing-comment correction landed unchanged as 2b53a462cf.
- Andres questioned auxiliary-process indexing in #36, and the exchange in #37 and #38 led to #39, deriving backend IDs from PGPROC positions instead of allocating separate sinval identifiers.
- Reid Thompson questioned enum-order dependencies in #40; #41 removed the unnecessary check and introduced a dense occupied-slot array to prevent the new numbering scheme from worsening sinval scans.
- Prepared-transaction tests exposed lost VXID ownership, so #42 restored the original backend ID inside PGPROC.vxid and folded the sinval optimization into the main numbering patch.
- Andres reviewed pointer-arithmetic costs, locking, and zero-based indexing in #43 and #45; #44 introduced cached MyProcNumber, and Robert Haas supported consistently zero-based numbering in #46.
- The pgprocno-removal patch from #44 landed with explanatory comment changes as 28f3915b73, leaving the numbering conversion for #47.
- The remaining numbering work from #47 landed as ab355e3a88, with additional VXID cleanup, and 024c521117, completing the zero-based ProcNumber conversion and permitting pg_temp_0.
- The process-type patches last attached in #42 then landed as 067701f577 and 393b5599e5, incorporating current child types, a corrected enum bound, and slot-sync-worker checks.
- Heikki resumed the principal launch series in #49; Richard Guo separately identified stale function names in the completed numbering work in #50, producing the comment fix ef4cfdce0e.
- After Tristan's review in #52, Heikki added the unattached socket-option relocation 73f7fb2a4c, moving per-connection setup from the postmaster into pq_init().
- The CAC patch from #49 landed unchanged as d162c3a73b, while its ConnCreate removal and ClientSocket work were combined and revised into 4945e4ed4a, allocating Port through pq_init() as explained in #53.
- The remaining series in #53 standardized startup-data names and AuxiliaryProcessMainCommon(), while Tristan's request for explicit background-worker diagnostics landed unchanged as a3f349c612.
- The Win32 callback and launch_backend.c extractions from #53 landed with light cleanup as 14cddee9cc and f1baed18bc.
- The auxiliary initialization and common-launch patches from #53 were combined into aafc05de1b, with startup-data ownership, allocation, and slot-sync integration fixes; the backend_startup.c extraction followed with light cleanup as 05c3980e7f, completing the main series in #54.
- Tom Lane reported compiler warnings from child-type assertions in #55, leading to their removal in d63d486d6c; Jelte Fennema-Nio proposed a replacement static assertion in #57, whose landing is not established by the supplied candidates.
- Anton Melnikov raised missing Windows export annotations in #58, but Heikki explained in #59 that they had already been fixed elsewhere, and Anton acknowledged that in #60.
- Thomas Munro's UBSan report and inline guard in #61 led to f3412a61f3, while Nathan Bossart's argument-check patch in #62 landed unchanged as a06e8f84a1; both were backpatched to version 17 and confirmed in the final message #63.
- By #63, the main refactoring and reported follow-up defects had landed without a revert; the static-assert proposal in #57 remained unconfirmed, and broader InitProcess/InitAuxiliaryProcess consolidation had been explicitly deferred in #53.