Re: Estimating HugePages Requirements?

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, "Bossart, Nathan" <bossartn(at)amazon(dot)com>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, Don Seiler <don(at)seiler(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Estimating HugePages Requirements?
Date: 2022-03-23 06:25:48
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin pgsql-hackers

On Tue, Mar 15, 2022 at 03:44:39PM -0700, Nathan Bossart wrote:
> A simple approach could be to just set log_min_messages to PANIC before
> exiting. I've attached a patch for this. With this patch, we'll still see
> a FATAL if we try to use 'postgres -C' for a runtime-computed GUC on a
> running server, and there will be no extra output as long as the user sets
> log_min_messages to INFO or higher (i.e., not a DEBUG* value). For
> comparison, 'postgres -C' for a non-runtime-computed GUC does not emit
> extra output as long as the user sets log_min_messages to DEBUG2 or higher.

> puts(config_val ? config_val : "");
> +
> + /* don't emit shutdown messages */
> + SetConfigOption("log_min_messages", "PANIC", PGC_INTERNAL, PGC_S_OVERRIDE);
> +
> ExitPostmaster(0);

That's fancy, but I don't like that much. And this would not protect
either against any messages generated before this code path, either,
even if that should be enough for the current HEAD .

My solution for the docs is perhaps too confusing for the end-user,
and we are talking about a Linux-only thing here anyway. So, at the
end, I am tempted to just add the "2> /dev/null" as suggested upthread
by Nathan and call it a day. Does that sound fine?

In response to


Browse pgsql-admin by date

  From Date Subject
Next Message Dirk Krautschick 2022-03-24 08:39:36 Vacuum behaviour for replicated nodes with pglogical (postgres 10)
Previous Message Michel SALAIS 2022-03-21 22:37:13 RE: How to check existing recovery points

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2022-03-23 07:03:04 Re: ExecRTCheckPerms() and many prunable partitions
Previous Message Michael Paquier 2022-03-23 06:17:35 Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)