mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +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:
@ -236,48 +236,46 @@ AuxiliaryProcessMain(AuxProcType auxtype)
|
|||||||
* pushups, but there are a couple of things that need to get lit up even
|
* pushups, but there are a couple of things that need to get lit up even
|
||||||
* in an auxiliary process.
|
* in an auxiliary process.
|
||||||
*/
|
*/
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
* Create a PGPROC so we can use LWLocks. In the EXEC_BACKEND case,
|
* Create a PGPROC so we can use LWLocks. In the EXEC_BACKEND case, this
|
||||||
* this was already done by SubPostmasterMain().
|
* was already done by SubPostmasterMain().
|
||||||
*/
|
*/
|
||||||
#ifndef EXEC_BACKEND
|
#ifndef EXEC_BACKEND
|
||||||
InitAuxiliaryProcess();
|
InitAuxiliaryProcess();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Assign the ProcSignalSlot for an auxiliary process. Since it
|
* Assign the ProcSignalSlot for an auxiliary process. Since it doesn't
|
||||||
* doesn't have a BackendId, the slot is statically allocated based on
|
* have a BackendId, the slot is statically allocated based on the
|
||||||
* the auxiliary process type (MyAuxProcType). Backends use slots
|
* auxiliary process type (MyAuxProcType). Backends use slots indexed in
|
||||||
* indexed in the range from 1 to MaxBackends (inclusive), so we use
|
* the range from 1 to MaxBackends (inclusive), so we use MaxBackends +
|
||||||
* MaxBackends + AuxProcType + 1 as the index of the slot for an
|
* AuxProcType + 1 as the index of the slot for an auxiliary process.
|
||||||
* auxiliary process.
|
*
|
||||||
*
|
* This will need rethinking if we ever want more than one of a particular
|
||||||
* This will need rethinking if we ever want more than one of a
|
* auxiliary process type.
|
||||||
* particular auxiliary process type.
|
*/
|
||||||
*/
|
ProcSignalInit(MaxBackends + MyAuxProcType + 1);
|
||||||
ProcSignalInit(MaxBackends + MyAuxProcType + 1);
|
|
||||||
|
|
||||||
/* finish setting up bufmgr.c */
|
/* finish setting up bufmgr.c */
|
||||||
InitBufferPoolBackend();
|
InitBufferPoolBackend();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Auxiliary processes don't run transactions, but they may need a
|
* Auxiliary processes don't run transactions, but they may need a
|
||||||
* resource owner anyway to manage buffer pins acquired outside
|
* resource owner anyway to manage buffer pins acquired outside
|
||||||
* transactions (and, perhaps, other things in future).
|
* transactions (and, perhaps, other things in future).
|
||||||
*/
|
*/
|
||||||
CreateAuxProcessResourceOwner();
|
CreateAuxProcessResourceOwner();
|
||||||
|
|
||||||
/* Initialize statistics reporting */
|
/* Initialize statistics reporting */
|
||||||
pgstat_initialize();
|
pgstat_initialize();
|
||||||
|
|
||||||
/* Initialize backend status information */
|
/* Initialize backend status information */
|
||||||
pgstat_beinit();
|
pgstat_beinit();
|
||||||
pgstat_bestart();
|
pgstat_bestart();
|
||||||
|
|
||||||
/* register a before-shutdown callback for LWLock cleanup */
|
/* register a before-shutdown callback for LWLock cleanup */
|
||||||
before_shmem_exit(ShutdownAuxiliaryProcess, 0);
|
before_shmem_exit(ShutdownAuxiliaryProcess, 0);
|
||||||
}
|
|
||||||
|
|
||||||
SetProcessingMode(NormalProcessing);
|
SetProcessingMode(NormalProcessing);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user