Re: Improve logging when using Huge Pages

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Justin Pryzby <pryzby@telsasoft.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, sfrost@snowman.net, alvherre@alvh.no-ip.org, andres@anarazel.de, jchampion@timescale.com, john.naylor@enterprisedb.com, masao.fujii@oss.nttdata.com, noriyoshi.shinoda@hpe.com, pgsql-hackers@postgresql.org, rjuju123@gmail.com, sawada.mshk@gmail.com, tgl@sss.pgh.pa.us, thomas.munro@gmail.com
Date: 2023-04-20T21:16:17Z
Lists: pgsql-hackers
On Thu, Mar 23, 2023 at 07:23:28AM +0900, Michael Paquier wrote:
> On Wed, Mar 22, 2023 at 05:18:28PM -0500, Justin Pryzby wrote:
>> Wow, good point.  I think to make it work we'd need put
>> huge_pages_active into BackendParameters and handle it in
>> save_backend_variables().  If so, that'd be strong argument for using a
>> GUC, which already has all the necessary infrastructure for exposing the
>> server's state.
> 
> I am afraid so, duplicating an existing infrastructure for a need like
> the one of this thread is not really appealing.

AFAICT this would involve adding a bool to BackendParameters and using it
in save_backend_variables() and restore_backend_variables(), which is an
additional 3 lines of code.  That doesn't sound too bad to me, but perhaps
I am missing something.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add GUC parameter "huge_pages_status"

  2. Add check on initial and boot values when loading GUCs

  3. Clean up some inconsistencies with GUC declarations

  4. Clean up some GUC declarations and comments