Re: Improve logging when using Huge Pages

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, sfrost(at)snowman(dot)net, alvherre(at)alvh(dot)no-ip(dot)org, andres(at)anarazel(dot)de, nathandbossart(at)gmail(dot)com, jchampion(at)timescale(dot)com, john(dot)naylor(at)enterprisedb(dot)com, masao(dot)fujii(at)oss(dot)nttdata(dot)com, noriyoshi(dot)shinoda(at)hpe(dot)com, pgsql-hackers(at)postgresql(dot)org, rjuju123(at)gmail(dot)com, sawada(dot)mshk(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, thomas(dot)munro(at)gmail(dot)com
Subject: Re: Improve logging when using Huge Pages
Date: 2023-03-22 07:37:01
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Mar 21, 2023 at 09:19:41PM -0500, Justin Pryzby wrote:
> You set this patch to "waiting on author" twice. Would you let me know
> what I could do to help progress the patch? Right now, I have no idea.

My mistake, I've been looking at an incorrect version of the patch.
Thanks for correcting me here.

I have read through the proposed v5 of the patch, that seems to be the
latest one available:

I have noted something.. For the WIN32 case, we have that:

+++ b/src/backend/port/win32_shmem.c
@@ -327,6 +327,8 @@ retry:
+ huge_pages_active = ((flProtect & SEC_LARGE_PAGES) != 0);

Are you sure that this is correct? This is set in
PGSharedMemoryCreate(), part of CreateSharedMemoryAndSemaphores() in
the startup sequence that creates the shmem segment. However, for a
normal backend created by EXEC_BACKEND, SubPostmasterMain() reattaches
to an existing shared memory segment, so we don't go through the
creation path that would set huge_pages_active for the process just
started, (note that InitPostmasterChild() switches IsUnderPostmaster,
bypassing the shmem segment creation).

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2023-03-22 07:39:52 Re: Comment in preptlist.c
Previous Message Peter Eisentraut 2023-03-22 07:34:00 meson: Fix support for empty darwin sysroot