]> granicus.if.org Git - postgresql/blob - src/backend/utils/init/globals.c
51a729c49c6920e7cd513802fa0b7b14f5bbcea7
[postgresql] / src / backend / utils / init / globals.c
1 /*-------------------------------------------------------------------------
2  *
3  * globals.c
4  *        global variable declarations
5  *
6  * Portions Copyright (c) 1996-2002, 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.66 2002/08/12 00:36:11 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   * The PGDATA directory user says to use, or defaults to via environment
44   * variable.  NULL if no option given and no environment variable set
45   */
46
47 char            OutputFileName[MAXPGPATH];
48
49 char            pg_pathname[MAXPGPATH];         /* full path to postgres
50                                                                                  * executable */
51
52 BackendId       MyBackendId;
53
54 char       *DatabaseName = NULL;
55 char       *DatabasePath = NULL;
56
57 Oid                     MyDatabaseId = InvalidOid;
58
59 bool            IsUnderPostmaster = false;
60
61 int                     DateStyle = USE_ISO_DATES;
62 bool            EuroDates = false;
63 bool            HasCTZSet = false;
64 bool            CDayLight = false;
65 int                     CTimeZone = 0;
66 char            CTZName[MAXTZLEN + 1] = "";
67
68 char            DateFormat[20] = "%d-%m-%Y";            /* mjl: sizes! or better
69                                                                                                  * malloc? XXX */
70 char            FloatFormat[20] = "%f";
71
72 bool            enableFsync = true;
73 bool            allowSystemTableMods = false;
74 int                     SortMem = 1024;
75 int                     VacuumMem = 8192;
76 int                     NBuffers = DEF_NBUFFERS;