From: Alexander Korotkov Date: Tue, 2 Apr 2024 23:55:03 +0000 (+0300) Subject: Move WaitLSNShmemInit() to CreateOrAttachShmemStructs() X-Git-Tag: REL_17_BETA1~441 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=2c91e13013414cf77bb8026a19a926e08f4e9e7a;p=postgresql.git Move WaitLSNShmemInit() to CreateOrAttachShmemStructs() Thanks to Andres Freund, Thomas Munrom and David Rowley for investigating this issue. Discussion: https://postgr.es/m/CAPpHfdvap5mMLikt8CUjA0osAvCJHT0qnYeR3f84EJ_Kvse0mg%40mail.gmail.com --- diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c index 5aed90c9355..90c84fec27a 100644 --- a/src/backend/storage/ipc/ipci.c +++ b/src/backend/storage/ipc/ipci.c @@ -246,11 +246,6 @@ CreateSharedMemoryAndSemaphores(void) /* Initialize subsystems */ CreateOrAttachShmemStructs(); - /* - * Init array of Latches in shared memory for wait lsn - */ - WaitLSNShmemInit(); - #ifdef EXEC_BACKEND /* @@ -364,6 +359,7 @@ CreateOrAttachShmemStructs(void) StatsShmemInit(); WaitEventExtensionShmemInit(); InjectionPointShmemInit(); + WaitLSNShmemInit(); } /*