Re: Improve logging when using Huge Pages
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: "Shinoda, Noriyoshi (PN Japan FSIP)" <noriyoshi.shinoda@hpe.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Masahiko Sawada <sawada.mshk@gmail.com>
Cc: "rjuju123@gmail.com" <rjuju123@gmail.com>,
"tgl@sss.pgh.pa.us" <tgl@sss.pgh.pa.us>,
Kyotaro Horiguchi <horikyota.ntt@gmail.com>,
Justin Pryzby <pryzby@telsasoft.com>
Date: 2021-11-02T14:35:18Z
Lists: pgsql-hackers
On 2021/11/02 18:31, Shinoda, Noriyoshi (PN Japan FSIP) wrote:
> Fujii-san, Sawada-san,
>
> Thank you for your comment.
>
>> Also, with the patch, the log message is emitted also during initdb and starting up in single user mode:
>
> Certainly the log output when executing the initdb command was a noise.
> The attached patch reflects the comments and uses IsPostmasterEnvironment to suppress the output message.
Thanks for updating the patch!
+ ereport(IsPostmasterEnvironment ? LOG : NOTICE, (errmsg("Anonymous shared memory was allocated without huge pages.")));
This change causes the log message to be output with NOTICE level
even when IsPostmasterEnvironment is false. But do we really want
to log that NOTICE message in that case? Instead, isn't it better
to just output the log message with LOG level only when
IsPostmasterEnvironment is true?
Justin and I posted other comments upthread. Could you consider
whether it's worth applying those comments to the patch?
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add GUC parameter "huge_pages_status"
- a14354cac0e3 17.0 landed
-
Add check on initial and boot values when loading GUCs
- a73952b79563 16.0 cited
-
Clean up some inconsistencies with GUC declarations
- d9d873bac670 16.0 cited
-
Clean up some GUC declarations and comments
- 7d25958453a6 16.0 cited