model-writtenrun 5556 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jun 2021 · 2 entries
- Don Seiler asked how deployment automation could reserve enough huge pages before starting PostgreSQL, because shared_buffers alone underestimated the requirement; Julien Rouhaud noted extension allocations, and Magnus Hagander explained why querying an already-running server could not predict a changed configuration #1 #2 #6 #10.
- Nathan Bossart offered Amazon RDS's established approach of starting the postmaster only far enough to calculate shared-memory requirements, then submitted a pg_ctl implementation #11 #14.
Aug - Sep 2021 · 17 entries
- After an August rebase, Justin Pryzby suggested treating shared_buffers as the total allocation budget, but Andres Freund rejected that because extension and configuration overhead would make the actual buffer allocation unpredictable #18 #21 #22.
- Andres instead requested a separate sizing function and a bootstrap or configuration-reporting entry point; Nathan replaced the pg_ctl approach with postgres --output-shmem and CalculateShmemSize() #23 #24.
- Michael Paquier requested documentation, while Magnus emphasized the risks of probing by actually allocating memory; Nathan documented the option, enabled inspection alongside a running server, and clarified that the result described the new invocation's configuration #25 #26 #27 #29.
- Andres proposed a shared_memory_size GUC and a directly computed huge-page count, and requested that the reusable sizing refactor be split out; Nathan supplied that extraction, while Michael identified postgres -C as the natural interface and noted its existing problems with runtime values #30 #31 #32.
- Nathan's first GUC patch depended on the extracted sizing function, and Michael supplied a revision that reordered startup prerequisites to account for preloaded extensions; Nathan then moved calculations into InitializeShmemGUCs(), added huge_pages_required, and documented both settings #34 #35 #36.
- Michael found a possible Windows division by zero and questioned whether Windows needed a huge-page-count setting; Nathan split the GUCs into separate patches and ultimately limited page-count reporting to Linux, where users must reserve pages explicitly #37 #38 #39 #43.
- Kyotaro Horiguchi tested the estimates and found them too small, while Michael identified startup-order problems; Nathan changed the approach to move -C handling later, and Kyotaro subsequently confirmed that the reported sizes matched actual requirements #42 #41 #43 #50.
- Michael committed the CalculateShmemSize() component of #43 as 0bd305ee1d, with formatting cleanup, while expressing concern that loading extensions without the usual data-directory lock could break existing extensions #46.
- Nathan separated the GUC additions from command-line reporting and introduced GUC_RUNTIME_COMPUTED: ordinary settings retained the early -C path, while runtime settings required an offline cluster and proceeded through locked startup without allocating shared memory #47 #48.
- Following Michael's review, Nathan removed redundant units and confined platform-specific huge-page checks to the platform implementations; Michael then committed the shared_memory_size component of #51 as bd1788051b, with variable naming, placement, and formatting cleanup #49 #53.
- Fujii Masao noticed that shared_memory_size was categorized inconsistently with other internal preset parameters; Nathan included the correction in #56, and Michael extracted it into 3b231596cc before refreshing the remaining series #54 #57 #59.
- Nathan experimented with clearer lock-file errors and quieter shutdown reporting in #60, but Michael preferred keeping the initial runtime-GUC support simple and documenting its restrictions, so that diagnostic expansion was left out #61 #62.
- Robert Haas proposed shared_memory_size_in_huge_pages to avoid the ambiguity of huge_pages_required; after discussion with Nathan, Tom Lane, Michael, and Kyotaro, Nathan selected Robert's name #63 #65 #68 #69 #71 #72.
- Michael refreshed the simpler runtime-GUC patch and added TAP tests for offline data_checksums inspection, rejection on a running server, and ordinary settings on a running server; it landed from #73 as 0c39c29207 with light comment, documentation, and formatting edits #74 #75.
- Nathan resent the remaining huge-page GUC under its agreed name, accepted Justin's comment correction, and addressed Michael's requests for optional mmap flags and clearer offline-use documentation #76 #77 #78 #79 #80.
- After platform testing, Michael committed #80 as 43c1c4f65e, additionally restructuring GetHugePageSize() to allow either output pointer to be NULL and retaining documentation examples showing system huge-page sizes #82.
- Nathan also proposed initializing the memory GUCs in bootstrap and single-user modes, but the discussion identified little bootstrap benefit and potentially misleading single-user estimates because preloaded extensions were absent; no implementation of that proposal landed in this thread #81 #83 #85 #86 #87.
Mar - May 2022 · 7 entries
- Six months later, Magnus reported that the documented estimation command still printed an unexpected shutdown log line; Nathan supplied a documentation workaround redirecting stderr and reopened the question of suppressing the extra output #88 #89.
- Nathan proposed suppressing shutdown messages by selecting PANIC immediately before exit, but Michael objected that this would not suppress earlier messages and initially preferred the simpler documentation workaround #92 #94.
- Michael committed the unchanged documentation patch from #89 as bbd4951b73; Magnus then pointed out that redirecting stderr also hid useful FATAL errors, including rejection of inspection on a running cluster #95 #96.
- Nathan next proposed selecting FATAL earlier for all -C requests, preserving an explicit PANIC setting and handling inspection of log_min_messages itself; the resulting patch kept useful failures visible while suppressing routine output #97 #98.
- The April discussion reaffirmed that SHOW could not predict a changed configuration before restart, but inspecting runtime settings alongside a running server remained unresolved because of control-file access and extension-initialization concerns #100 #101 #102 #103.
- After another report of the logging problem, Michael simplified Nathan's patch to force FATAL only for runtime-computed GUC inspection, removing the special handling for ordinary settings and undoing the documentation redirection #104 #105 #106.
- The final revision #105 landed as 8bbf8461a3 with only comment wrapping changes; Nathan acknowledged completion, leaving the estimation and logging fixes landed while concurrent runtime inspection and additional startup-mode support remained unimplemented #107 #108.