diff options
| author | Heikki Linnakangas | 2023-12-03 14:09:42 +0000 |
|---|---|---|
| committer | Heikki Linnakangas | 2023-12-03 14:09:42 +0000 |
| commit | 69d903367cdea188bf865f4edd72a186cda9e689 (patch) | |
| tree | ed031d820dfca9253a6624cfd5c9eb2bc88267a6 /src/include | |
| parent | b19890d49d122257ddcdb7ab2c5038f5075906c1 (diff) | |
Refactor CreateSharedMemoryAndSemaphores
For clarity, have separate functions for *creating* the shared memory
and semaphores at postmaster or single-user backend startup, and
for *attaching* to existing shared memory structures in EXEC_BACKEND
case. CreateSharedMemoryAndSemaphores() is now called only at
postmaster startup, and a new AttachSharedMemoryStructs() function is
called at backend startup in EXEC_BACKEND mode.
Reviewed-by: Tristan Partin, Andres Freund
Discussion: https://www.postgresql.org/message-id/7a59b073-5b5b-151e-7ed3-8b01ff7ce9ef@iki.fi
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/storage/ipc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/storage/ipc.h b/src/include/storage/ipc.h index 888c08b3067..e282dcad962 100644 --- a/src/include/storage/ipc.h +++ b/src/include/storage/ipc.h @@ -79,6 +79,9 @@ extern PGDLLIMPORT shmem_startup_hook_type shmem_startup_hook; extern Size CalculateShmemSize(int *num_semaphores); extern void CreateSharedMemoryAndSemaphores(void); +#ifdef EXEC_BACKEND +extern void AttachSharedMemoryStructs(void); +#endif extern void InitializeShmemGUCs(void); #endif /* IPC_H */ |
