Re: Estimating HugePages Requirements? - Mailing list pgsql-hackers

From Bossart, Nathan
Subject Re: Estimating HugePages Requirements?
Date
Msg-id 3E81D643-0759-4373-BEA6-5BF8818710BF@amazon.com
Whole thread Raw
In response to Re: Estimating HugePages Requirements?  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Estimating HugePages Requirements?
List pgsql-hackers
Should we also initialize the shared memory GUCs in bootstrap and
single-user mode?  I think I missed this in bd17880.

Nathan

diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index 48615c0ebc..4c4cf44871 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -324,6 +324,12 @@ BootstrapModeMain(int argc, char *argv[], bool check_only)

     InitializeMaxBackends();

+    /*
+     * Initialize runtime-computed GUCs that depend on the amount of shared
+     * memory required.
+     */
+    InitializeShmemGUCs();
+
     CreateSharedMemoryAndSemaphores();

     /*
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 0775abe35d..cae0b079b9 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -3978,6 +3978,12 @@ PostgresSingleUserMain(int argc, char *argv[],
     /* Initialize MaxBackends */
     InitializeMaxBackends();

+    /*
+     * Initialize runtime-computed GUCs that depend on the amount of shared
+     * memory required.
+     */
+    InitializeShmemGUCs();
+
     CreateSharedMemoryAndSemaphores();

     /*


pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: Support for NSS as a libpq TLS backend
Next
From: Alexander Korotkov
Date:
Subject: Re: postgres.h included from relcache.h - but removing it breaks pg_upgrade