1 /*-------------------------------------------------------------------------
4 * global variable declarations
6 * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
11 * $PostgreSQL: pgsql/src/backend/utils/init/globals.c,v 1.81 2004/01/28 21:02:40 tgl Exp $
14 * Globals used all over the place should be declared here and not
17 *-------------------------------------------------------------------------
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;
36 struct Port *MyProcPort;
42 * The PGDATA directory user says to use, or defaults to via environment
43 * variable. NULL if no option given and no environment variable set
46 char OutputFileName[MAXPGPATH];
48 char pg_pathname[MAXPGPATH]; /* full path to postgres
51 BackendId MyBackendId;
53 char *DatabasePath = NULL;
54 Oid MyDatabaseId = InvalidOid;
56 pid_t PostmasterPid = 0;
59 * IsPostmasterEnvironment is true in a postmaster process and any postmaster
60 * child process; it is false in a standalone process (bootstrap or
61 * standalone backend). IsUnderPostmaster is true in postmaster child
62 * processes. Note that "child process" includes all children, not only
63 * regular backends. These should be set correctly as early as possible
64 * in the execution of a process, so that error handling will do the right
65 * things if an error should occur during process initialization.
67 * These are initialized for the bootstrap/standalone case.
69 bool IsPostmasterEnvironment = false;
70 bool IsUnderPostmaster = false;
72 bool ExitOnAnyError = false;
74 int DateStyle = USE_ISO_DATES;
75 int DateOrder = DATEORDER_MDY;
76 bool HasCTZSet = false;
79 bool enableFsync = true;
80 bool allowSystemTableMods = false;