diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2023-12-03 16:39:18 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2023-12-03 16:39:18 +0200 |
commit | fd5e8b440dfd633be74e3dd3382d4a9038dba24f (patch) | |
tree | 18777d875424975c85d7e0e416f527e220a1d127 /src/backend/postmaster/auxprocess.c | |
parent | 388491f1e5e63fe97c7cca26d18b64321973d423 (diff) | |
download | postgresql-fd5e8b440dfd633be74e3dd3382d4a9038dba24f.tar.gz postgresql-fd5e8b440dfd633be74e3dd3382d4a9038dba24f.zip |
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
Diffstat (limited to 'src/backend/postmaster/auxprocess.c')
-rw-r--r-- | src/backend/postmaster/auxprocess.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/backend/postmaster/auxprocess.c b/src/backend/postmaster/auxprocess.c index cae6feb3562..bae6f68c402 100644 --- a/src/backend/postmaster/auxprocess.c +++ b/src/backend/postmaster/auxprocess.c @@ -97,12 +97,9 @@ AuxiliaryProcessMain(AuxProcType auxtype) */ /* - * Create a PGPROC so we can use LWLocks. In the EXEC_BACKEND case, this - * was already done by SubPostmasterMain(). + * Create a PGPROC so we can use LWLocks and access shared memory. */ -#ifndef EXEC_BACKEND InitAuxiliaryProcess(); -#endif BaseInit(); |