model-writtenrun 5545 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Sep 2020 · 1 entry
- Shenhao Wang proposed initializing MaxBackends before shared-preload libraries so extensions could use it in _PG_init(), observing that backend counts now depended on configuration rather than registered workers #1; Bharath Rupireddy reviewed the reasoning and raised EXEC_BACKEND questions #2.
Aug 2021 · 4 entries
- After a long gap, Nathan Bossart revived the proposal because RequestAddinShmemSpace() calculations could silently use zero MaxBackends, and supplied a slightly revised patch #3.
- Robert Haas and Alvaro Herrera initially supported the reorder #4 #5, but Andres Freund explained that extensions such as Citus adjust resource GUCs during initialization and suggested a later hook or checked accessor #6 #8 #10.
- Nathan replaced early initialization with guarded GetMaxBackends()/SetMaxBackends() access #14; Greg Sabino Mullane's review removed optional counting flags and corrected a comment, while subsequent testing resolved EXEC_BACKEND concerns #16 #17 #20.
- Shenhao requested avoiding repeated function calls in loops, and Nathan added local caching #21 #22.
Jan - May 2022 · 21 entries
- In January, Fujii Masao questioned the scope and churn #23, leading Nathan to try a MaxBackends macro and fix its EXEC_BACKEND collision #24 #25, but Robert and Michael Paquier preferred explicit calls #26 #28.
- Michael's broader design concerns led Nathan to extract just the stale-comment corrections #30 #31, which Michael committed unchanged as 5ecd0183fb and announced in #33.
- Robert argued that a value derived from several GUCs specifically needed checked access #37, reviving the accessor work with fewer repeated calls and inline helpers replacing misleading macros #40 #42.
- Robert committed the accessor patch from #42 unchanged as aa64f23b02 and reported finding no blocking problems #44.
- Michael supplied additional caching cleanup #47, accepted by Robert and Nathan #48 #50, and committed it unchanged as 4567596316.
- Nathan also supplied a multixact.c comment typo correction #50, which Michael committed unchanged as 0147fc7c8c and confirmed alongside the caching cleanup #51.
- Julien Rouhaud then pointed out that rejecting early MaxBackends access still left extensions unable to size shared memory correctly #53, and demonstrated a late shmem_request_hook that fixed pg_wait_sampling allocation #59.
- Michael and Julien favored reverting the accessor rather than retaining an incomplete solution late in the release cycle #60 #61, while Andres defended its misuse detection #62 and Robert emphasized providing a workable sizing API #66.
- Nathan proposed reverting the recent commits, restoring early initialization and blocking GUC changes during preload #72; Robert caught an error-recovery problem in the custom-GUC flag, prompting a revised internal setter API #73 #75.
- Robert committed only the unchanged revert component from #75 as 7fc0e7de9f, removing the accessor, its follow-ups and the comment cleanup while recognizing legitimate GUC-changing extensions #80.
- Tom Lane rejected a blanket GUC-change prohibition and preferred preserving _PG_init() ordering with a later callback #81 #85; discussion also set aside additional GUC enforcement machinery #89 #91.
- Nathan returned to Julien's hook implementation with minor edits and bundled restoration of the reverted comments #92, replacing the uncommitted early-initialization and GUC-blocking approach.
- Robert argued for requiring all shared-memory requests to use the new hook rather than leaving subtle extension interactions possible #96 #98, and Tom and Julien supported the compatibility break #99 #103 #106.
- Nathan implemented the exclusive request phase and migrated pg_prewarm and pg_stat_statements #107, then incorporated Tom's advice to share the phase with LWLock requests and make invalid calls fatal #108 #110 #112.
- Anton A. Melnikov successfully tested the revised series on Linux and Windows and verified MaxBackends-dependent allocation in an extended pg_stat_statements #113.
- Robert restored the unchanged comment component from #112 as 701d918a42, then questioned adding an unusable _PG_fini() to autoprewarm #114.
- Robert and Tom agreed that the long-disabled module-unloading machinery should be removed rather than expanded #116 #117, so Nathan submitted the remaining hook patch together with a separate cleanup #119; broader hook-list redesign was deferred #114.
- Michael found overlooked unloading documentation, requested documentation for the new request hook and suggested applying cleanup first #121 #123, which Nathan incorporated in #122 and #124.
- Robert committed the unchanged unloading-cleanup component from #124 as ab02d702ef and announced it in #125.
- Michael forwarded the unchanged remaining hook patch #128, and Robert committed it as 4f2400cb3f, completing the replacement design #129.
- The thread ended with the chosen changes landed and Julien reporting compatibility patches for affected extension repositories #131, which Robert welcomed in the final reply #132; MaxBackends remained unavailable during preload _PG_init(), with resource requests moved to the later hook.