Refactor how InitProcess is called
commitfd5e8b440dfd633be74e3dd3382d4a9038dba24f
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Sun, 3 Dec 2023 14:39:18 +0000 (3 16:39 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Sun, 3 Dec 2023 14:39:18 +0000 (3 16:39 +0200)
tree18777d875424975c85d7e0e416f527e220a1d127
parent388491f1e5e63fe97c7cca26d18b64321973d423
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
src/backend/postmaster/autovacuum.c
src/backend/postmaster/auxprocess.c
src/backend/postmaster/bgworker.c
src/backend/postmaster/postmaster.c
src/backend/storage/lmgr/proc.c