Re: Improve logging when using Huge Pages - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Improve logging when using Huge Pages
Date
Msg-id 848204.1679288949@sss.pgh.pa.us
Whole thread Raw
In response to Re: Improve logging when using Huge Pages  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Improve logging when using Huge Pages  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> On Tue, Mar 14, 2023 at 02:02:19PM +0900, Kyotaro Horiguchi wrote:
>> I slightly prefer using a function for this, as if GUC is used, it can
>> only return "unknown" for the command "postgres -C
>> huge_page_active". However, apart from this advantage, I prefer using
>> a GUC for this information.

> The main advantage of a read-only GUC over a function is that users
> would not need to start a postmaster to know if huge pages would be
> active or not.

I'm confused here, because Horiguchi-san is saying that that
won't work.  I've not checked the code lately, but I think that
"postgres -C var" prints its results before actually attempting
to establish shared memory, so I suspect Horiguchi-san is right.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Improve logging when using Huge Pages
Next
From: Michael Paquier
Date:
Subject: Re: Improve logging when using Huge Pages