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:
https://www.postgresql.org/message-id/ZA+Bpk/6LcYiUXnh@telsasoft.com
I have noted something.. For the WIN32 case, we have that:
+++ b/src/backend/port/win32_shmem.c
@@ -327,6 +327,8 @@ retry:
Sleep(1000);
continue;
}
+
+ huge_pages_active = ((flProtect & SEC_LARGE_PAGES) != 0);
break;
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).
--
Michael