mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
process startup: Do InitProcess() at the same time regardless of EXEC_BACKEND.
An upcoming patch splits single user mode into its own function. This makes that easier. Split out for easier review / testing. Reviewed-By: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Author: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/20210802164124.ufo5buo4apl6yuvs@alap3.anarazel.de
This commit is contained in:
@@ -4275,6 +4275,15 @@ BackendStartup(Port *port)
|
||||
/* Perform additional initialization and collect startup packet */
|
||||
BackendInitialize(port);
|
||||
|
||||
/*
|
||||
* Create a per-backend PGPROC struct in shared memory. We must do
|
||||
* this before we can use LWLocks. In the !EXEC_BACKEND case (here)
|
||||
* this could be delayed a bit further, but EXEC_BACKEND needs to do
|
||||
* stuff with LWLocks before PostgresMain(), so we do it here as well
|
||||
* for symmetry.
|
||||
*/
|
||||
InitProcess();
|
||||
|
||||
/* And run the backend */
|
||||
BackendRun(port);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user