Re: Estimating HugePages Requirements?

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Magnus Hagander <magnus@hagander.net>, "Bossart, Nathan" <bossartn@amazon.com>, Fujii Masao <masao.fujii@oss.nttdata.com>, Justin Pryzby <pryzby@telsasoft.com>, Andres Freund <andres@anarazel.de>, Mark Dilger <mark.dilger@enterprisedb.com>, Don Seiler <don@seiler.us>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2022-05-09T06:53:24Z
Lists: pgsql-hackers

Attachments

On Fri, May 06, 2022 at 10:13:18AM -0700, Nathan Bossart wrote:
> On Tue, Apr 26, 2022 at 10:34:06AM +0900, Michael Paquier wrote:
>> Yes, the redirection issue would apply to all the run-time GUCs.
> 
> Should this be tracked as an open item for v15?  There was another recent
> report about the extra log output [0].

That makes it for two complaints on two separate threads.  So an open
item seems adapted to adjust this behavior.

I have looked at the patch posted at [1], and I don't quite understand
why you need the extra dance with log_min_messages.  Why don't you
just set the GUC at the end of the code path in PostmasterMain() where
we print non-runtime-computed parameters?  I am not really worrying
about users deciding to set log_min_messages to PANIC in
postgresql.conf when it comes to postgres -C, TBH, as they'd miss the
FATAL messages if the command is attempted on a server already
starting.

Per se the attached.

[1]: https://www.postgresql.org/message-id/20220328173503.GA137769@nathanxps13
--
Michael

Commits

  1. Silence extra logging when using "postgres -C" on runtime-computed GUCs

  2. doc: Improve postgres command for shared_memory_size_in_huge_pages

  3. Introduce GUC shared_memory_size_in_huge_pages

  4. Support "postgres -C" with runtime-computed GUCs

  5. Make shared_memory_size a preset option

  6. Introduce GUC shared_memory_size

  7. Move the shared memory size calculation to its own function

  8. Add new GUC, max_worker_processes, limiting number of bgworkers.