Refactor how InitProcess is called
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Refactor how InitProcess is called The order of process initialization steps is now more consistent between !EXEC_BACKEND and EXEC_BACKEND modes. InitProcess() is called at the same place in either mode. We can now also move the AttachSharedMemoryStructs() call into InitProcess() itself. This reduces the number of "#ifdef EXEC_BACKEND" blocks. Reviewed-by: Tristan Partin, Andres Freund, Alexander Lakhin Discussion: https://www.postgresql.org/message-id/7a59b073-5b5b-151e-7ed3-8b01ff7ce9ef@iki.fi
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/postmaster/autovacuum.c | modified | +4 −12 |
| src/backend/postmaster/auxprocess.c | modified | +1 −4 |
| src/backend/postmaster/bgworker.c | modified | +2 −6 |
| src/backend/postmaster/postmaster.c | modified | +6 −39 |
| src/backend/storage/lmgr/proc.c | modified | +22 −2 |
Discussion
- Refactoring backend fork+exec code 63 messages · 2023-06-18 → 2024-07-03