]> granicus.if.org Git - postgresql/blob - src/backend/utils/init/globals.c
Mop-up for previous change to determine default shared_buffers and
[postgresql] / src / backend / utils / init / globals.c
1 /*-------------------------------------------------------------------------
2  *
3  * globals.c
4  *        global variable declarations
5  *
6  * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
7  * Portions Copyright (c) 1994, Regents of the University of California
8  *
9  *
10  * IDENTIFICATION
11  *        $Header: /cvsroot/pgsql/src/backend/utils/init/globals.c,v 1.75 2003/08/26 15:38:25 tgl Exp $
12  *
13  * NOTES
14  *        Globals used all over the place should be declared here and not
15  *        in other modules.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #include "postgres.h"
20
21 #include "libpq/pqcomm.h"
22 #include "miscadmin.h"
23 #include "storage/backendid.h"
24
25
26 ProtocolVersion FrontendProtocol = PG_PROTOCOL_LATEST;
27
28 bool            Noversion = false;
29
30 volatile bool InterruptPending = false;
31 volatile bool QueryCancelPending = false;
32 volatile bool ProcDiePending = false;
33 volatile bool ImmediateInterruptOK = false;
34 volatile uint32 InterruptHoldoffCount = 0;
35 volatile uint32 CritSectionCount = 0;
36
37 int                     MyProcPid;
38 struct Port *MyProcPort;
39 long            MyCancelKey;
40
41 char       *DataDir = NULL;
42
43  /*
44   * The PGDATA directory user says to use, or defaults to via environment
45   * variable.  NULL if no option given and no environment variable set
46   */
47
48 char            OutputFileName[MAXPGPATH];
49
50 char            pg_pathname[MAXPGPATH];         /* full path to postgres
51                                                                                  * executable */
52
53 BackendId       MyBackendId;
54
55 char       *DatabasePath = NULL;
56 Oid                     MyDatabaseId = InvalidOid;
57
58 /* these are initialized for the bootstrap/standalone case: */
59 bool            IsPostmasterEnvironment = false;
60 bool            IsUnderPostmaster = false;
61
62 bool            ExitOnAnyError = false;
63
64 int                     DateStyle = USE_ISO_DATES;
65 int                     DateOrder = DATEORDER_MDY;
66 bool            HasCTZSet = false;
67 int                     CTimeZone = 0;
68
69 bool            enableFsync = true;
70 bool            allowSystemTableMods = false;
71 int                     SortMem = 1024;
72 int                     VacuumMem = 8192;
73 int                     NBuffers = 1000;