Skip to content

Commit 27f7903

Browse files
committed
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
1 parent 5aa4a9d commit 27f7903

File tree

1 file changed

+32
-34
lines changed

1 file changed

+32
-34
lines changed

src/backend/bootstrap/bootstrap.c

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -236,48 +236,46 @@ AuxiliaryProcessMain(AuxProcType auxtype)
236236
* pushups, but there are a couple of things that need to get lit up even
237237
* in an auxiliary process.
238238
*/
239-
{
240-
/*
241-
* Create a PGPROC so we can use LWLocks. In the EXEC_BACKEND case,
242-
* this was already done by SubPostmasterMain().
243-
*/
239+
240+
/*
241+
* Create a PGPROC so we can use LWLocks. In the EXEC_BACKEND case, this
242+
* was already done by SubPostmasterMain().
243+
*/
244244
#ifndef EXEC_BACKEND
245-
InitAuxiliaryProcess();
245+
InitAuxiliaryProcess();
246246
#endif
247247

248-
/*
249-
* Assign the ProcSignalSlot for an auxiliary process. Since it
250-
* doesn't have a BackendId, the slot is statically allocated based on
251-
* the auxiliary process type (MyAuxProcType). Backends use slots
252-
* indexed in the range from 1 to MaxBackends (inclusive), so we use
253-
* MaxBackends + AuxProcType + 1 as the index of the slot for an
254-
* auxiliary process.
255-
*
256-
* This will need rethinking if we ever want more than one of a
257-
* particular auxiliary process type.
258-
*/
259-
ProcSignalInit(MaxBackends + MyAuxProcType + 1);
248+
/*
249+
* Assign the ProcSignalSlot for an auxiliary process. Since it doesn't
250+
* have a BackendId, the slot is statically allocated based on the
251+
* auxiliary process type (MyAuxProcType). Backends use slots indexed in
252+
* the range from 1 to MaxBackends (inclusive), so we use MaxBackends +
253+
* AuxProcType + 1 as the index of the slot for an auxiliary process.
254+
*
255+
* This will need rethinking if we ever want more than one of a particular
256+
* auxiliary process type.
257+
*/
258+
ProcSignalInit(MaxBackends + MyAuxProcType + 1);
260259

261-
/* finish setting up bufmgr.c */
262-
InitBufferPoolBackend();
260+
/* finish setting up bufmgr.c */
261+
InitBufferPoolBackend();
263262

264-
/*
265-
* Auxiliary processes don't run transactions, but they may need a
266-
* resource owner anyway to manage buffer pins acquired outside
267-
* transactions (and, perhaps, other things in future).
268-
*/
269-
CreateAuxProcessResourceOwner();
263+
/*
264+
* Auxiliary processes don't run transactions, but they may need a
265+
* resource owner anyway to manage buffer pins acquired outside
266+
* transactions (and, perhaps, other things in future).
267+
*/
268+
CreateAuxProcessResourceOwner();
270269

271-
/* Initialize statistics reporting */
272-
pgstat_initialize();
270+
/* Initialize statistics reporting */
271+
pgstat_initialize();
273272

274-
/* Initialize backend status information */
275-
pgstat_beinit();
276-
pgstat_bestart();
273+
/* Initialize backend status information */
274+
pgstat_beinit();
275+
pgstat_bestart();
277276

278-
/* register a before-shutdown callback for LWLock cleanup */
279-
before_shmem_exit(ShutdownAuxiliaryProcess, 0);
280-
}
277+
/* register a before-shutdown callback for LWLock cleanup */
278+
before_shmem_exit(ShutdownAuxiliaryProcess, 0);
281279

282280
SetProcessingMode(NormalProcessing);
283281

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy