1/*-------------------------------------------------------------------------
3 * functions related to auxiliary processes.
6 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/backend/postmaster/auxprocess.c
11 *-------------------------------------------------------------------------
33 * AuxiliaryProcessMainCommon
35 * Common initialization code for auxiliary processes, such as the bgwriter,
36 * walwriter, walreceiver, and the startup process.
43 /* Release postmaster's working memory context */
57 * As an auxiliary process, we aren't going to do the full InitPostgres
58 * pushups, but there are a couple of things that need to get lit up even
59 * in an auxiliary process.
63 * Create a PGPROC so we can use LWLocks and access shared memory.
72 * Auxiliary processes don't run transactions, but they may need a
73 * resource owner anyway to manage buffer pins acquired outside
74 * transactions (and, perhaps, other things in future).
79 /* Initialize backend status information */
84 /* register a before-shutdown callback for LWLock cleanup */
91 * Begin shutdown of an auxiliary process. This is approximately the equivalent
92 * of ShutdownPostgres() in postinit.c. We can't run transactions in an
93 * auxiliary process, so most of the work of AbortTransaction() is not needed,
94 * but we do need to make sure we've released any LWLocks we are holding.
95 * (This is only critical during an error exit.)
void AuxiliaryProcessMainCommon(void)
static void ShutdownAuxiliaryProcess(int code, Datum arg)
void pgstat_bestart_initial(void)
void pgstat_bestart_final(void)
bool ConditionVariableCancelSleep(void)
Assert(PointerIsAligned(start, uint64))
void before_shmem_exit(pg_on_exit_callback function, Datum arg)
void LWLockReleaseAll(void)
MemoryContext PostmasterContext
void MemoryContextDelete(MemoryContext context)
#define GetProcessingMode()
#define SetProcessingMode(mode)
void ProcSignalInit(const uint8 *cancel_key, int cancel_key_len)
void init_ps_display(const char *fixed_part)
void CreateAuxProcessResourceOwner(void)
void InitAuxiliaryProcess(void)
static void pgstat_report_wait_end(void)