Re: Improve logging when using Huge Pages

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: "Shinoda, Noriyoshi (PN Japan FSIP)" <noriyoshi(dot)shinoda(at)hpe(dot)com>, pgsql-hackers(at)postgresql(dot)org, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "rjuju123(at)gmail(dot)com" <rjuju123(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Improve logging when using Huge Pages
Date: 2021-09-07 13:16:53
Message-ID: 20210907131653.GK26465@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 07, 2021 at 07:12:36PM +0900, Fujii Masao wrote:
> One big concern about the patch is that log message is always reported
> when shared memory fails to be allocated with huge pages enabled
> when huge_pages=try. Since huge_pages=try is the default setting,
> many users would see this new log message whenever they start
> the server. Those who don't need huge pages but just use the default
> setting might think that such log messages would be noisy.

I don't see this as any issue. We're only talking about a single message on
each restart, which would be added in a major release. If it's a problem, the
message could be a NOTICE or INFO, and it won't be shown by default.

I think it should say "with/out huge pages" without "enabled/disabled", without
"again", and without "The server", like:

+ (errmsg("could not map anonymous shared memory (%zu bytes)"
+ " with huge pages.", allocsize),
+ errdetail("Anonymous shared memory will be mapped "
+ "without huge pages.")));

--
Justin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-09-07 13:48:53 Re: Use "superuser" instead of "super user" in code comments
Previous Message James Coleman 2021-09-07 13:16:49 Re: Parallelize correlated subqueries that execute within each worker