1/*-------------------------------------------------------------------------
4 * global variable declarations
6 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
11 * src/backend/utils/init/globals.c
14 * Globals used all over the place should be declared here and not
17 *-------------------------------------------------------------------------
57 * MyLatch points to the latch that should be used for signal handling by the
58 * current process. It will either point to a process local latch if the
59 * current process does not have a PGPROC entry in that moment, or to
60 * PGPROC->procLatch if it has. Thus it can always be used in signal handlers,
61 * without checking for its existence.
66 * DataDir is the absolute path to the top level of the PGDATA directory tree.
67 * Except during early startup, this is also the server's working directory;
68 * most code therefore can simply use relative paths and not reference DataDir
74 * Mode of the data directory. The default is 0700 but it may be changed in
75 * checkDataDir() to 0750 if the data directory actually has that mode.
85char postgres_exec_path[
MAXPGPATH];
/* full path to backend */
87/* note: currently this is not valid in backend processes */
101 * DatabasePath is the path (relative to DataDir) of my database's
102 * primary directory, ie, its directory in the default tablespace.
109 * IsPostmasterEnvironment is true in a postmaster process and any postmaster
110 * child process; it is false in a standalone process (bootstrap or
111 * standalone backend). IsUnderPostmaster is true in postmaster child
112 * processes. Note that "child process" includes all children, not only
113 * regular backends. These should be set correctly as early as possible
114 * in the execution of a process, so that error handling will do the right
115 * things if an error should occur during process initialization.
117 * These are initialized for the bootstrap/standalone case.
137 * Primary determinants of sizes of shared-memory structures.
139 * MaxBackends is computed by PostmasterMain after modules have had a chance to
140 * register background workers.
148/* GUC parameters for vacuum */
160/* configurable SLRU buffer sizes */
#define PG_DIR_MODE_OWNER
int multixact_offset_buffers
volatile sig_atomic_t IdleStatsUpdateTimeoutPending
bool MyDatabaseHasLoginEventTriggers
volatile sig_atomic_t LogMemoryContextPending
volatile sig_atomic_t ProcSignalBarrierPending
ProcNumber ParallelLeaderProcNumber
double hash_mem_multiplier
struct ClientSocket * MyClientSocket
volatile sig_atomic_t InterruptPending
volatile sig_atomic_t IdleSessionTimeoutPending
volatile uint32 QueryCancelHoldoffCount
int max_parallel_maintenance_workers
ProtocolVersion FrontendProtocol
volatile sig_atomic_t IdleInTransactionSessionTimeoutPending
volatile uint32 InterruptHoldoffCount
volatile sig_atomic_t TransactionTimeoutPending
char pkglib_path[MAXPGPATH]
int multixact_member_buffers
volatile sig_atomic_t ClientConnectionLost
bool allowSystemTableMods
volatile uint32 CritSectionCount
volatile sig_atomic_t QueryCancelPending
uint8 MyCancelKey[MAX_CANCEL_KEY_LENGTH]
TimestampTz MyStartTimestamp
bool IsPostmasterEnvironment
int VacuumBufferUsageLimit
char OutputFileName[MAXPGPATH]
int commit_timestamp_buffers
int subtransaction_buffers
volatile sig_atomic_t ProcDiePending
volatile sig_atomic_t CheckClientConnectionPending
char my_exec_path[MAXPGPATH]
#define INTSTYLE_POSTGRES
#define INVALID_PROC_NUMBER
#define MAX_CANCEL_KEY_LENGTH