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

From Michael Paquier
Subject Re: Improve logging when using Huge Pages
Date
Msg-id ZBfpEYG0qTCiBGDh@paquier.xyz
Whole thread Raw
In response to Re: Improve logging when using Huge Pages  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Mon, Mar 20, 2023 at 01:54:46PM +0900, Michael Paquier wrote:
> 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.  This is the main reason why a GUC would be a better
> fit, in my opinion, because it makes for a cheaper check, while still
> allowing a SQL query to check the value of the GUC.

[ Should have read more carefully ]

..  Which is something you cannot do with -C because mmap() happens
after the runtime-computed logic for postgres -C.  It does not sound
right to do the mmap() for a GUC check, so indeed a function may be
more adapted rather than move mmap() call a bit earlier in the
postmaster startup sequence.
--
Michael

Attachment

pgsql-hackers by date:

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