From c9acd214ae37272f3a5eac97aef557b73a692039 Mon Sep 17 00:00:00 2001 From: Konstantin Knizhnik Date: Tue, 19 Nov 2024 11:56:40 +0200 Subject: [PATCH] Do not create DSM segment for wal_redo_postgres (#9793) ## Problem See https://github.com/neondatabase/neon/issues/9738 ## Summary of changes Do not create DSM segment for wal_redo Postgres --------- Co-authored-by: Konstantin Knizhnik --- pgxn/neon_walredo/walredoproc.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pgxn/neon_walredo/walredoproc.c b/pgxn/neon_walredo/walredoproc.c index 37abb3fa03f1..619b7255aee3 100644 --- a/pgxn/neon_walredo/walredoproc.c +++ b/pgxn/neon_walredo/walredoproc.c @@ -453,7 +453,6 @@ WalRedoMain(int argc, char *argv[]) static void CreateFakeSharedMemoryAndSemaphores(void) { - PGShmemHeader *shim = NULL; PGShmemHeader *hdr; Size size; int numSemas; @@ -486,7 +485,6 @@ CreateFakeSharedMemoryAndSemaphores(void) hdr->totalsize = size; hdr->freeoffset = MAXALIGN(sizeof(PGShmemHeader)); - shim = hdr; UsedShmemSegAddr = hdr; UsedShmemSegID = (unsigned long) 42; /* not relevant for non-shared memory */ } @@ -523,8 +521,6 @@ CreateFakeSharedMemoryAndSemaphores(void) */ InitShmemIndex(); - dsm_shmem_init(); - /* * Set up xlog, clog, and buffers */ @@ -599,10 +595,6 @@ CreateFakeSharedMemoryAndSemaphores(void) ShmemBackendArrayAllocation(); #endif - /* Initialize dynamic shared memory facilities. */ - if (!IsUnderPostmaster) - dsm_postmaster_startup(shim); - /* * Now give loadable modules a chance to set up their shmem allocations */