Refactor CreateSharedMemoryAndSemaphores
Heikki Linnakangas <heikki.linnakangas@iki.fi>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/postmaster/postmaster.c | modified | +10 −10 |
| src/backend/replication/walreceiver.c | modified | +2 −1 |
| src/backend/storage/ipc/ipci.c | modified | +101 −77 |
| src/backend/storage/lmgr/proc.c | modified | +1 −1 |
| src/include/storage/ipc.h | modified | +3 −0 |
Discussion
- Refactoring backend fork+exec code 63 messages · 2023-06-18 → 2024-07-03