PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
miscadmin.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * miscadmin.h
4  * This file contains general postgres administration and initialization
5  * stuff that used to be spread out between the following files:
6  * globals.h global variables
7  * pdir.h directory path crud
8  * pinit.h postgres initialization
9  * pmod.h processing modes
10  * Over time, this has also become the preferred place for widely known
11  * resource-limitation stuff, such as work_mem and check_stack_depth().
12  *
13  * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
14  * Portions Copyright (c) 1994, Regents of the University of California
15  *
16  * src/include/miscadmin.h
17  *
18  * NOTES
19  * some of the information in this file should be moved to other files.
20  *
21  *-------------------------------------------------------------------------
22  */
23 #ifndef MISCADMIN_H
24 #define MISCADMIN_H
25 
26 #include "pgtime.h" /* for pg_time_t */
27 
28 
29 #define PG_BACKEND_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n"
30 
31 #define InvalidPid (-1)
32 
33 
34 /*****************************************************************************
35  * System interrupt and critical section handling
36  *
37  * There are two types of interrupts that a running backend needs to accept
38  * without messing up its state: QueryCancel (SIGINT) and ProcDie (SIGTERM).
39  * In both cases, we need to be able to clean up the current transaction
40  * gracefully, so we can't respond to the interrupt instantaneously ---
41  * there's no guarantee that internal data structures would be self-consistent
42  * if the code is interrupted at an arbitrary instant. Instead, the signal
43  * handlers set flags that are checked periodically during execution.
44  *
45  * The CHECK_FOR_INTERRUPTS() macro is called at strategically located spots
46  * where it is normally safe to accept a cancel or die interrupt. In some
47  * cases, we invoke CHECK_FOR_INTERRUPTS() inside low-level subroutines that
48  * might sometimes be called in contexts that do *not* want to allow a cancel
49  * or die interrupt. The HOLD_INTERRUPTS() and RESUME_INTERRUPTS() macros
50  * allow code to ensure that no cancel or die interrupt will be accepted,
51  * even if CHECK_FOR_INTERRUPTS() gets called in a subroutine. The interrupt
52  * will be held off until CHECK_FOR_INTERRUPTS() is done outside any
53  * HOLD_INTERRUPTS() ... RESUME_INTERRUPTS() section.
54  *
55  * There is also a mechanism to prevent query cancel interrupts, while still
56  * allowing die interrupts: HOLD_CANCEL_INTERRUPTS() and
57  * RESUME_CANCEL_INTERRUPTS().
58  *
59  * Special mechanisms are used to let an interrupt be accepted when we are
60  * waiting for a lock or when we are waiting for command input (but, of
61  * course, only if the interrupt holdoff counter is zero). See the
62  * related code for details.
63  *
64  * A lost connection is handled similarly, although the loss of connection
65  * does not raise a signal, but is detected when we fail to write to the
66  * socket. If there was a signal for a broken connection, we could make use of
67  * it by setting ClientConnectionLost in the signal handler.
68  *
69  * A related, but conceptually distinct, mechanism is the "critical section"
70  * mechanism. A critical section not only holds off cancel/die interrupts,
71  * but causes any ereport(ERROR) or ereport(FATAL) to become ereport(PANIC)
72  * --- that is, a system-wide reset is forced. Needless to say, only really
73  * *critical* code should be marked as a critical section! Currently, this
74  * mechanism is only used for XLOG-related code.
75  *
76  *****************************************************************************/
77 
78 /* in globals.c */
79 /* these are marked volatile because they are set by signal handlers: */
80 extern PGDLLIMPORT volatile bool InterruptPending;
81 extern PGDLLIMPORT volatile bool QueryCancelPending;
82 extern PGDLLIMPORT volatile bool ProcDiePending;
83 
84 extern volatile bool ClientConnectionLost;
85 
86 /* these are marked volatile because they are examined by signal handlers: */
89 extern PGDLLIMPORT volatile uint32 CritSectionCount;
90 
91 /* in tcop/postgres.c */
92 extern void ProcessInterrupts(void);
93 
94 #ifndef WIN32
95 
96 #define CHECK_FOR_INTERRUPTS() \
97 do { \
98  if (InterruptPending) \
99  ProcessInterrupts(); \
100 } while(0)
101 #else /* WIN32 */
102 
103 #define CHECK_FOR_INTERRUPTS() \
104 do { \
105  if (UNBLOCKED_SIGNAL_QUEUE()) \
106  pgwin32_dispatch_queued_signals(); \
107  if (InterruptPending) \
108  ProcessInterrupts(); \
109 } while(0)
110 #endif /* WIN32 */
111 
112 
113 #define HOLD_INTERRUPTS() (InterruptHoldoffCount++)
114 
115 #define RESUME_INTERRUPTS() \
116 do { \
117  Assert(InterruptHoldoffCount > 0); \
118  InterruptHoldoffCount--; \
119 } while(0)
120 
121 #define HOLD_CANCEL_INTERRUPTS() (QueryCancelHoldoffCount++)
122 
123 #define RESUME_CANCEL_INTERRUPTS() \
124 do { \
125  Assert(QueryCancelHoldoffCount > 0); \
126  QueryCancelHoldoffCount--; \
127 } while(0)
128 
129 #define START_CRIT_SECTION() (CritSectionCount++)
130 
131 #define END_CRIT_SECTION() \
132 do { \
133  Assert(CritSectionCount > 0); \
134  CritSectionCount--; \
135 } while(0)
136 
137 
138 /*****************************************************************************
139  * globals.h -- *
140  *****************************************************************************/
141 
142 /*
143  * from utils/init/globals.c
144  */
145 extern pid_t PostmasterPid;
146 extern bool IsPostmasterEnvironment;
147 extern PGDLLIMPORT bool IsUnderPostmaster;
148 extern bool IsBackgroundWorker;
149 extern PGDLLIMPORT bool IsBinaryUpgrade;
150 
151 extern bool ExitOnAnyError;
152 
153 extern PGDLLIMPORT char *DataDir;
154 
155 extern PGDLLIMPORT int NBuffers;
156 extern int MaxBackends;
157 extern int MaxConnections;
158 extern int max_worker_processes;
159 
160 extern PGDLLIMPORT int MyProcPid;
162 extern PGDLLIMPORT struct Port *MyProcPort;
163 extern PGDLLIMPORT struct Latch *MyLatch;
164 extern long MyCancelKey;
165 extern int MyPMChildSlot;
166 
167 extern char OutputFileName[];
168 extern PGDLLIMPORT char my_exec_path[];
169 extern char pkglib_path[];
170 
171 #ifdef EXEC_BACKEND
172 extern char postgres_exec_path[];
173 #endif
174 
175 /*
176  * done in storage/backendid.h for now.
177  *
178  * extern BackendId MyBackendId;
179  */
181 
183 
184 /*
185  * Date/Time Configuration
186  *
187  * DateStyle defines the output formatting choice for date/time types:
188  * USE_POSTGRES_DATES specifies traditional Postgres format
189  * USE_ISO_DATES specifies ISO-compliant format
190  * USE_SQL_DATES specifies Oracle/Ingres-compliant format
191  * USE_GERMAN_DATES specifies German-style dd.mm/yyyy
192  *
193  * DateOrder defines the field order to be assumed when reading an
194  * ambiguous date (anything not in YYYY-MM-DD format, with a four-digit
195  * year field first, is taken to be ambiguous):
196  * DATEORDER_YMD specifies field order yy-mm-dd
197  * DATEORDER_DMY specifies field order dd-mm-yy ("European" convention)
198  * DATEORDER_MDY specifies field order mm-dd-yy ("US" convention)
199  *
200  * In the Postgres and SQL DateStyles, DateOrder also selects output field
201  * order: day comes before month in DMY style, else month comes before day.
202  *
203  * The user-visible "DateStyle" run-time parameter subsumes both of these.
204  */
205 
206 /* valid DateStyle values */
207 #define USE_POSTGRES_DATES 0
208 #define USE_ISO_DATES 1
209 #define USE_SQL_DATES 2
210 #define USE_GERMAN_DATES 3
211 #define USE_XSD_DATES 4
212 
213 /* valid DateOrder values */
214 #define DATEORDER_YMD 0
215 #define DATEORDER_DMY 1
216 #define DATEORDER_MDY 2
217 
218 extern PGDLLIMPORT int DateStyle;
219 extern PGDLLIMPORT int DateOrder;
220 
221 /*
222  * IntervalStyles
223  * INTSTYLE_POSTGRES Like Postgres < 8.4 when DateStyle = 'iso'
224  * INTSTYLE_POSTGRES_VERBOSE Like Postgres < 8.4 when DateStyle != 'iso'
225  * INTSTYLE_SQL_STANDARD SQL standard interval literals
226  * INTSTYLE_ISO_8601 ISO-8601-basic formatted intervals
227  */
228 #define INTSTYLE_POSTGRES 0
229 #define INTSTYLE_POSTGRES_VERBOSE 1
230 #define INTSTYLE_SQL_STANDARD 2
231 #define INTSTYLE_ISO_8601 3
232 
233 extern PGDLLIMPORT int IntervalStyle;
234 
235 #define MAXTZLEN 10 /* max TZ name len, not counting tr. null */
236 
237 extern bool enableFsync;
238 extern bool allowSystemTableMods;
239 extern PGDLLIMPORT int work_mem;
241 
242 extern int VacuumCostPageHit;
243 extern int VacuumCostPageMiss;
244 extern int VacuumCostPageDirty;
245 extern int VacuumCostLimit;
246 extern int VacuumCostDelay;
247 
248 extern int VacuumPageHit;
249 extern int VacuumPageMiss;
250 extern int VacuumPageDirty;
251 
252 extern int VacuumCostBalance;
253 extern bool VacuumCostActive;
254 
255 
256 /* in tcop/postgres.c */
257 
258 #if defined(__ia64__) || defined(__ia64)
259 typedef struct
260 {
261  char *stack_base_ptr;
262  char *register_stack_base_ptr;
264 #else
265 typedef char *pg_stack_base_t;
266 #endif
267 
268 extern pg_stack_base_t set_stack_base(void);
269 extern void restore_stack_base(pg_stack_base_t base);
270 extern void check_stack_depth(void);
271 extern bool stack_is_too_deep(void);
272 
273 /* in tcop/utility.c */
274 extern void PreventCommandIfReadOnly(const char *cmdname);
275 extern void PreventCommandIfParallelMode(const char *cmdname);
276 extern void PreventCommandDuringRecovery(const char *cmdname);
277 
278 /* in utils/misc/guc.c */
279 extern int trace_recovery_messages;
280 extern int trace_recovery(int trace_level);
281 
282 /*****************************************************************************
283  * pdir.h -- *
284  * POSTGRES directory path definitions. *
285  *****************************************************************************/
286 
287 /* flags to be OR'd to form sec_context */
288 #define SECURITY_LOCAL_USERID_CHANGE 0x0001
289 #define SECURITY_RESTRICTED_OPERATION 0x0002
290 #define SECURITY_NOFORCE_RLS 0x0004
291 
292 extern char *DatabasePath;
293 
294 /* now in utils/init/miscinit.c */
295 extern void InitPostmasterChild(void);
296 extern void InitStandaloneProcess(const char *argv0);
297 
298 extern void SetDatabasePath(const char *path);
299 
300 extern char *GetUserNameFromId(Oid roleid, bool noerr);
301 extern Oid GetUserId(void);
302 extern Oid GetOuterUserId(void);
303 extern Oid GetSessionUserId(void);
304 extern Oid GetAuthenticatedUserId(void);
305 extern void GetUserIdAndSecContext(Oid *userid, int *sec_context);
306 extern void SetUserIdAndSecContext(Oid userid, int sec_context);
307 extern bool InLocalUserIdChange(void);
308 extern bool InSecurityRestrictedOperation(void);
309 extern bool InNoForceRLSOperation(void);
310 extern void GetUserIdAndContext(Oid *userid, bool *sec_def_context);
311 extern void SetUserIdAndContext(Oid userid, bool sec_def_context);
312 extern void InitializeSessionUserId(const char *rolename, Oid useroid);
313 extern void InitializeSessionUserIdStandalone(void);
314 extern void SetSessionAuthorization(Oid userid, bool is_superuser);
315 extern Oid GetCurrentRoleId(void);
316 extern void SetCurrentRoleId(Oid roleid, bool is_superuser);
317 
318 extern void SetDataDir(const char *dir);
319 extern void ChangeToDataDir(void);
320 
321 extern void SwitchToSharedLatch(void);
322 extern void SwitchBackToLocalLatch(void);
323 
324 /* in utils/misc/superuser.c */
325 extern bool superuser(void); /* current user is superuser */
326 extern bool superuser_arg(Oid roleid); /* given user is superuser */
327 
328 
329 /*****************************************************************************
330  * pmod.h -- *
331  * POSTGRES processing mode definitions. *
332  *****************************************************************************/
333 
334 /*
335  * Description:
336  * There are three processing modes in POSTGRES. They are
337  * BootstrapProcessing or "bootstrap," InitProcessing or
338  * "initialization," and NormalProcessing or "normal."
339  *
340  * The first two processing modes are used during special times. When the
341  * system state indicates bootstrap processing, transactions are all given
342  * transaction id "one" and are consequently guaranteed to commit. This mode
343  * is used during the initial generation of template databases.
344  *
345  * Initialization mode: used while starting a backend, until all normal
346  * initialization is complete. Some code behaves differently when executed
347  * in this mode to enable system bootstrapping.
348  *
349  * If a POSTGRES backend process is in normal mode, then all code may be
350  * executed normally.
351  */
352 
353 typedef enum ProcessingMode
354 {
355  BootstrapProcessing, /* bootstrap creation of template database */
356  InitProcessing, /* initializing system */
357  NormalProcessing /* normal processing */
359 
360 extern ProcessingMode Mode;
361 
362 #define IsBootstrapProcessingMode() (Mode == BootstrapProcessing)
363 #define IsInitProcessingMode() (Mode == InitProcessing)
364 #define IsNormalProcessingMode() (Mode == NormalProcessing)
365 
366 #define GetProcessingMode() Mode
367 
368 #define SetProcessingMode(mode) \
369  do { \
370  AssertArg((mode) == BootstrapProcessing || \
371  (mode) == InitProcessing || \
372  (mode) == NormalProcessing); \
373  Mode = (mode); \
374  } while(0)
375 
376 
377 /*
378  * Auxiliary-process type identifiers. These used to be in bootstrap.h
379  * but it seems saner to have them here, with the ProcessingMode stuff.
380  * The MyAuxProcType global is defined and set in bootstrap.c.
381  */
382 
383 typedef enum
384 {
393 
394  NUM_AUXPROCTYPES /* Must be last! */
395 } AuxProcType;
396 
398 
399 #define AmBootstrapProcess() (MyAuxProcType == BootstrapProcess)
400 #define AmStartupProcess() (MyAuxProcType == StartupProcess)
401 #define AmBackgroundWriterProcess() (MyAuxProcType == BgWriterProcess)
402 #define AmCheckpointerProcess() (MyAuxProcType == CheckpointerProcess)
403 #define AmWalWriterProcess() (MyAuxProcType == WalWriterProcess)
404 #define AmWalReceiverProcess() (MyAuxProcType == WalReceiverProcess)
405 
406 
407 /*****************************************************************************
408  * pinit.h -- *
409  * POSTGRES initialization and cleanup definitions. *
410  *****************************************************************************/
411 
412 /* in utils/init/postinit.c */
413 extern void pg_split_opts(char **argv, int *argcp, const char *optstr);
414 extern void InitializeMaxBackends(void);
415 extern void InitPostgres(const char *in_dbname, Oid dboid, const char *username,
416  Oid useroid, char *out_dbname);
417 extern void BaseInit(void);
418 
419 /* in utils/init/miscinit.c */
420 extern bool IgnoreSystemIndexes;
424 extern char *local_preload_libraries_string;
425 
426 /*
427  * As of 9.1, the contents of the data-directory lock file are:
428  *
429  * line #
430  * 1 postmaster PID (or negative of a standalone backend's PID)
431  * 2 data directory path
432  * 3 postmaster start timestamp (time_t representation)
433  * 4 port number
434  * 5 first Unix socket directory path (empty if none)
435  * 6 first listen_address (IP address or "*"; empty if no TCP port)
436  * 7 shared memory key (not present on Windows)
437  *
438  * Lines 6 and up are added via AddToDataDirLockFile() after initial file
439  * creation.
440  *
441  * The socket lock file, if used, has the same contents as lines 1-5.
442  */
443 #define LOCK_FILE_LINE_PID 1
444 #define LOCK_FILE_LINE_DATA_DIR 2
445 #define LOCK_FILE_LINE_START_TIME 3
446 #define LOCK_FILE_LINE_PORT 4
447 #define LOCK_FILE_LINE_SOCKET_DIR 5
448 #define LOCK_FILE_LINE_LISTEN_ADDR 6
449 #define LOCK_FILE_LINE_SHMEM_KEY 7
450 
451 extern void CreateDataDirLockFile(bool amPostmaster);
452 extern void CreateSocketLockFile(const char *socketfile, bool amPostmaster,
453  const char *socketDir);
454 extern void TouchSocketLockFiles(void);
455 extern void AddToDataDirLockFile(int target_line, const char *str);
456 extern bool RecheckDataDirLockFile(void);
457 extern void ValidatePgVersion(const char *path);
458 extern void process_shared_preload_libraries(void);
459 extern void process_session_preload_libraries(void);
460 extern void pg_bindtextdomain(const char *domain);
461 extern bool has_rolreplication(Oid roleid);
462 
463 /* in access/transam/xlog.c */
464 extern bool BackupInProgress(void);
465 extern void CancelBackup(void);
466 
467 #endif /* MISCADMIN_H */
AuxProcType
Definition: miscadmin.h:383
PGDLLIMPORT int IntervalStyle
Definition: globals.c:105
void SetUserIdAndSecContext(Oid userid, int sec_context)
Definition: miscinit.c:386
int MaxBackends
Definition: globals.c:121
static char * argv0
Definition: pg_ctl.c:91
int VacuumCostPageDirty
Definition: globals.c:125
int64 pg_time_t
Definition: pgtime.h:23
int VacuumPageHit
Definition: globals.c:129
char OutputFileName[]
Definition: globals.c:60
bool stack_is_too_deep(void)
Definition: postgres.c:3097
void PreventCommandIfParallelMode(const char *cmdname)
Definition: utility.c:246
void InitializeSessionUserIdStandalone(void)
Definition: miscinit.c:569
char * DatabasePath
Definition: globals.c:81
bool BackupInProgress(void)
Definition: xlog.c:10849
void SetUserIdAndContext(Oid userid, bool sec_def_context)
Definition: miscinit.c:435
bool has_rolreplication(Oid roleid)
Definition: miscinit.c:455
bool VacuumCostActive
Definition: globals.c:134
Oid GetUserId(void)
Definition: miscinit.c:274
bool InSecurityRestrictedOperation(void)
Definition: miscinit.c:406
ProcessingMode Mode
Definition: miscinit.c:54
void AddToDataDirLockFile(int target_line, const char *str)
Definition: miscinit.c:1140
Definition: libpq-be.h:118
bool superuser_arg(Oid roleid)
Definition: superuser.c:57
PGDLLIMPORT Oid MyDatabaseTableSpace
Definition: globals.c:75
void process_session_preload_libraries(void)
Definition: miscinit.c:1469
PGDLLIMPORT int maintenance_work_mem
Definition: globals.c:110
PGDLLIMPORT volatile bool ProcDiePending
Definition: globals.c:31
unsigned int Oid
Definition: postgres_ext.h:31
PGDLLIMPORT char * DataDir
Definition: globals.c:58
void InitializeMaxBackends(void)
Definition: postinit.c:495
PGDLLIMPORT struct Latch * MyLatch
Definition: globals.c:50
void PreventCommandIfReadOnly(const char *cmdname)
Definition: utility.c:228
void SetDatabasePath(const char *path)
Definition: miscinit.c:80
bool InLocalUserIdChange(void)
Definition: miscinit.c:397
int VacuumPageDirty
Definition: globals.c:131
#define PGDLLIMPORT
Definition: c.h:1032
char * shared_preload_libraries_string
Definition: miscinit.c:1388
Oid GetOuterUserId(void)
Definition: miscinit.c:285
PGDLLIMPORT int MyProcPid
Definition: globals.c:37
int VacuumCostDelay
Definition: globals.c:127
AuxProcType MyAuxProcType
Definition: bootstrap.c:65
bool InNoForceRLSOperation(void)
Definition: miscinit.c:415
bool allowSystemTableMods
Definition: globals.c:108
Oid GetAuthenticatedUserId(void)
Definition: miscinit.c:333
void process_shared_preload_libraries(void)
Definition: miscinit.c:1456
int VacuumCostPageHit
Definition: globals.c:123
void CreateSocketLockFile(const char *socketfile, bool amPostmaster, const char *socketDir)
Definition: miscinit.c:1073
PGDLLIMPORT volatile bool QueryCancelPending
Definition: globals.c:30
int trace_recovery_messages
Definition: guc.c:432
bool IsPostmasterEnvironment
Definition: globals.c:96
char * local_preload_libraries_string
Definition: miscinit.c:1389
int VacuumCostLimit
Definition: globals.c:126
void InitPostgres(const char *in_dbname, Oid dboid, const char *username, Oid useroid, char *out_dbname)
Definition: postinit.c:558
char pkglib_path[]
Definition: globals.c:63
Definition: latch.h:88
bool enableFsync
Definition: globals.c:107
PGDLLIMPORT struct Port * MyProcPort
Definition: globals.c:39
PGDLLIMPORT int NBuffers
Definition: globals.c:118
PGDLLIMPORT pg_time_t MyStartTime
Definition: globals.c:38
void check_stack_depth(void)
Definition: postgres.c:3083
char * session_preload_libraries_string
Definition: miscinit.c:1387
void InitStandaloneProcess(const char *argv0)
Definition: miscinit.c:217
unsigned int uint32
Definition: c.h:254
void SwitchBackToLocalLatch(void)
Definition: miscinit.c:259
bool superuser(void)
Definition: superuser.c:47
void ValidatePgVersion(const char *path)
Definition: miscinit.c:1324
PGDLLIMPORT volatile uint32 QueryCancelHoldoffCount
Definition: globals.c:34
PGDLLIMPORT volatile uint32 InterruptHoldoffCount
Definition: globals.c:33
void GetUserIdAndContext(Oid *userid, bool *sec_def_context)
Definition: miscinit.c:428
Oid GetSessionUserId(void)
Definition: miscinit.c:308
long MyCancelKey
Definition: globals.c:40
void pg_bindtextdomain(const char *domain)
Definition: miscinit.c:1480
void SwitchToSharedLatch(void)
Definition: miscinit.c:243
void TouchSocketLockFiles(void)
Definition: miscinit.c:1091
void SetDataDir(const char *dir)
Definition: miscinit.c:92
void SetCurrentRoleId(Oid roleid, bool is_superuser)
Definition: miscinit.c:647
void CancelBackup(void)
Definition: xlog.c:10869
pg_stack_base_t set_stack_base(void)
Definition: postgres.c:3030
PGDLLIMPORT volatile bool InterruptPending
Definition: globals.c:29
void pg_split_opts(char **argv, int *argcp, const char *optstr)
Definition: postinit.c:436
void SetSessionAuthorization(Oid userid, bool is_superuser)
Definition: miscinit.c:601
int trace_recovery(int trace_level)
Definition: elog.c:3727
void restore_stack_base(pg_stack_base_t base)
Definition: postgres.c:3061
PGDLLIMPORT bool IsBinaryUpgrade
Definition: globals.c:98
void CreateDataDirLockFile(bool amPostmaster)
Definition: miscinit.c:1064
static char * username
Definition: initdb.c:128
int VacuumCostBalance
Definition: globals.c:133
bool ExitOnAnyError
Definition: globals.c:101
bool is_superuser(void)
Definition: common.c:1745
char * GetUserNameFromId(Oid roleid, bool noerr)
Definition: miscinit.c:682
PGDLLIMPORT bool IsUnderPostmaster
Definition: globals.c:97
void InitializeSessionUserId(const char *rolename, Oid useroid)
Definition: miscinit.c:473
PGDLLIMPORT int DateStyle
Definition: globals.c:103
void ChangeToDataDir(void)
Definition: miscinit.c:113
void GetUserIdAndSecContext(Oid *userid, int *sec_context)
Definition: miscinit.c:379
PGDLLIMPORT int work_mem
Definition: globals.c:109
ProcessingMode
Definition: miscadmin.h:353
PGDLLIMPORT volatile uint32 CritSectionCount
Definition: globals.c:35
pid_t PostmasterPid
Definition: globals.c:83
bool RecheckDataDirLockFile(void)
Definition: miscinit.c:1254
volatile bool ClientConnectionLost
Definition: globals.c:32
char * stack_base_ptr
Definition: postgres.c:115
void ProcessInterrupts(void)
Definition: postgres.c:2833
int VacuumCostPageMiss
Definition: globals.c:124
PGDLLIMPORT char my_exec_path[]
Definition: globals.c:62
void BaseInit(void)
Definition: postinit.c:517
PGDLLIMPORT Oid MyDatabaseId
Definition: globals.c:73
int MaxConnections
Definition: globals.c:119
PGDLLIMPORT bool process_shared_preload_libraries_in_progress
Definition: miscinit.c:1392
int VacuumPageMiss
Definition: globals.c:130
int MyPMChildSlot
Definition: globals.c:41
void PreventCommandDuringRecovery(const char *cmdname)
Definition: utility.c:265
int max_worker_processes
Definition: globals.c:120
bool IgnoreSystemIndexes
Definition: miscinit.c:71
Oid GetCurrentRoleId(void)
Definition: miscinit.c:626
char * pg_stack_base_t
Definition: miscadmin.h:265
void InitPostmasterChild(void)
Definition: miscinit.c:173
bool IsBackgroundWorker
Definition: globals.c:99
PGDLLIMPORT int DateOrder
Definition: globals.c:104