Revert dubious message wording change.
[PostgreSQL.git] / src / backend / utils / init / globals.c
blob962f4ba517b161e6aa6f7cf4266f8cb1d235f56f
1 /*-------------------------------------------------------------------------
3 * globals.c
4 * global variable declarations
6 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
10 * IDENTIFICATION
11 * $PostgreSQL$
13 * NOTES
14 * Globals used all over the place should be declared here and not
15 * in other modules.
17 *-------------------------------------------------------------------------
19 #include "postgres.h"
21 #include "libpq/pqcomm.h"
22 #include "miscadmin.h"
23 #include "storage/backendid.h"
26 ProtocolVersion FrontendProtocol = PG_PROTOCOL_LATEST;
28 volatile bool InterruptPending = false;
29 volatile bool QueryCancelPending = false;
30 volatile bool ProcDiePending = false;
31 volatile bool ImmediateInterruptOK = false;
32 volatile uint32 InterruptHoldoffCount = 0;
33 volatile uint32 CritSectionCount = 0;
35 int MyProcPid;
36 pg_time_t MyStartTime;
37 struct Port *MyProcPort;
38 long MyCancelKey;
39 int MyPMChildSlot;
42 * DataDir is the absolute path to the top level of the PGDATA directory tree.
43 * Except during early startup, this is also the server's working directory;
44 * most code therefore can simply use relative paths and not reference DataDir
45 * explicitly.
47 char *DataDir = NULL;
49 char OutputFileName[MAXPGPATH]; /* debugging output file */
51 char my_exec_path[MAXPGPATH]; /* full path to my executable */
52 char pkglib_path[MAXPGPATH]; /* full path to lib directory */
54 #ifdef EXEC_BACKEND
55 char postgres_exec_path[MAXPGPATH]; /* full path to backend */
57 /* note: currently this is not valid in backend processes */
58 #endif
60 BackendId MyBackendId = InvalidBackendId;
62 Oid MyDatabaseId = InvalidOid;
64 Oid MyDatabaseTableSpace = InvalidOid;
67 * DatabasePath is the path (relative to DataDir) of my database's
68 * primary directory, ie, its directory in the default tablespace.
70 char *DatabasePath = NULL;
72 pid_t PostmasterPid = 0;
75 * IsPostmasterEnvironment is true in a postmaster process and any postmaster
76 * child process; it is false in a standalone process (bootstrap or
77 * standalone backend). IsUnderPostmaster is true in postmaster child
78 * processes. Note that "child process" includes all children, not only
79 * regular backends. These should be set correctly as early as possible
80 * in the execution of a process, so that error handling will do the right
81 * things if an error should occur during process initialization.
83 * These are initialized for the bootstrap/standalone case.
85 bool IsPostmasterEnvironment = false;
86 bool IsUnderPostmaster = false;
88 bool ExitOnAnyError = false;
90 int DateStyle = USE_ISO_DATES;
91 int DateOrder = DATEORDER_MDY;
92 int IntervalStyle = INTSTYLE_POSTGRES;
93 bool HasCTZSet = false;
94 int CTimeZone = 0;
96 bool enableFsync = true;
97 bool allowSystemTableMods = false;
98 int work_mem = 1024;
99 int maintenance_work_mem = 16384;
102 * Primary determinants of sizes of shared-memory structures. MaxBackends is
103 * MaxConnections + autovacuum_max_workers (it is computed by the GUC assign
104 * hook):
106 int NBuffers = 1000;
107 int MaxBackends = 100;
108 int MaxConnections = 90;
110 int VacuumCostPageHit = 1; /* GUC parameters for vacuum */
111 int VacuumCostPageMiss = 10;
112 int VacuumCostPageDirty = 20;
113 int VacuumCostLimit = 200;
114 int VacuumCostDelay = 0;
116 int VacuumCostBalance = 0; /* working state for vacuum */
117 bool VacuumCostActive = false;
119 int GinFuzzySearchLimit = 0;