Skip to content

Commit

Permalink
Do not allocate shared memory for wal_redo process (#165)
Browse files Browse the repository at this point in the history
* Do not allocate shared memory for wal_redo process

* Add comment
  • Loading branch information
knizhnik authored and tristan957 committed Nov 8, 2023
1 parent 8d9e935 commit 29c2995
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/backend/port/sysv_shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, Size size)
}
}
#endif
/*
* NEON: do not create shared memory segments for single user wal redo postgres.
* Many spawned instances of wal redo may exhaust kernel.shmmni
*/
if (am_wal_redo_postgres)
return valloc(size);

shmid = shmget(memKey, size, IPC_CREAT | IPC_EXCL | IPCProtection);

Expand Down

0 comments on commit 29c2995

Please sign in to comment.