1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00

process startup: auxprocess: reindent block

Kept separate for ease of review, particularly because pgindent insists on
reflowing a few comments.

Author: Andres Freund <andres@anarazel.de>
Reviewed-By: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reviewed-By: Robert Haas <robertmhaas@gmail.com>
Discussion: https://postgr.es/m/20210802164124.ufo5buo4apl6yuvs@alap3.anarazel.de
This commit is contained in:
Andres Freund
2021-08-04 19:30:12 -07:00
parent 5aa4a9d207
commit 27f7903466

View File

@ -236,25 +236,24 @@ AuxiliaryProcessMain(AuxProcType auxtype)
* pushups, but there are a couple of things that need to get lit up even
* in an auxiliary process.
*/
{
/*
* 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. In the EXEC_BACKEND case, this
* was already done by SubPostmasterMain().
*/
#ifndef EXEC_BACKEND
InitAuxiliaryProcess();
#endif
/*
* Assign the ProcSignalSlot for an auxiliary process. Since it
* doesn't have a BackendId, the slot is statically allocated based on
* the auxiliary process type (MyAuxProcType). Backends use slots
* indexed in the range from 1 to MaxBackends (inclusive), so we use
* MaxBackends + AuxProcType + 1 as the index of the slot for an
* auxiliary process.
* Assign the ProcSignalSlot for an auxiliary process. Since it doesn't
* have a BackendId, the slot is statically allocated based on the
* auxiliary process type (MyAuxProcType). Backends use slots indexed in
* the range from 1 to MaxBackends (inclusive), so we use MaxBackends +
* AuxProcType + 1 as the index of the slot for an auxiliary process.
*
* This will need rethinking if we ever want more than one of a
* particular auxiliary process type.
* This will need rethinking if we ever want more than one of a particular
* auxiliary process type.
*/
ProcSignalInit(MaxBackends + MyAuxProcType + 1);
@ -277,7 +276,6 @@ AuxiliaryProcessMain(AuxProcType auxtype)
/* register a before-shutdown callback for LWLock cleanup */
before_shmem_exit(ShutdownAuxiliaryProcess, 0);
}
SetProcessingMode(NormalProcessing);