PostgreSQL Source Code  git master
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-2019, 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 <signal.h>
27 
28 #include "datatype/timestamp.h" /* for TimestampTZ */
29 #include "pgtime.h" /* for pg_time_t */
30 
31 
32 #define InvalidPid (-1)
33 
34 
35 /*****************************************************************************
36  * System interrupt and critical section handling
37  *
38  * There are two types of interrupts that a running backend needs to accept
39  * without messing up its state: QueryCancel (SIGINT) and ProcDie (SIGTERM).
40  * In both cases, we need to be able to clean up the current transaction
41  * gracefully, so we can't respond to the interrupt instantaneously ---
42  * there's no guarantee that internal data structures would be self-consistent
43  * if the code is interrupted at an arbitrary instant. Instead, the signal
44  * handlers set flags that are checked periodically during execution.
45  *
46  * The CHECK_FOR_INTERRUPTS() macro is called at strategically located spots
47  * where it is normally safe to accept a cancel or die interrupt. In some
48  * cases, we invoke CHECK_FOR_INTERRUPTS() inside low-level subroutines that
49  * might sometimes be called in contexts that do *not* want to allow a cancel
50  * or die interrupt. The HOLD_INTERRUPTS() and RESUME_INTERRUPTS() macros
51  * allow code to ensure that no cancel or die interrupt will be accepted,
52  * even if CHECK_FOR_INTERRUPTS() gets called in a subroutine. The interrupt
53  * will be held off until CHECK_FOR_INTERRUPTS() is done outside any
54  * HOLD_INTERRUPTS() ... RESUME_INTERRUPTS() section.
55  *
56  * There is also a mechanism to prevent query cancel interrupts, while still
57  * allowing die interrupts: HOLD_CANCEL_INTERRUPTS() and
58  * RESUME_CANCEL_INTERRUPTS().
59  *
60  * Special mechanisms are used to let an interrupt be accepted when we are
61  * waiting for a lock or when we are waiting for command input (but, of
62  * course, only if the interrupt holdoff counter is zero). See the
63  * related code for details.
64  *
65  * A lost connection is handled similarly, although the loss of connection
66  * does not raise a signal, but is detected when we fail to write to the
67  * socket. If there was a signal for a broken connection, we could make use of
68  * it by setting ClientConnectionLost in the signal handler.
69  *
70  * A related, but conceptually distinct, mechanism is the "critical section"
71  * mechanism. A critical section not only holds off cancel/die interrupts,
72  * but causes any ereport(ERROR) or ereport(FATAL) to become ereport(PANIC)
73  * --- that is, a system-wide reset is forced. Needless to say, only really
74  * *critical* code should be marked as a critical section! Currently, this
75  * mechanism is only used for XLOG-related code.
76  *
77  *****************************************************************************/
78 
79 /* in globals.c */
80 /* these are marked volatile because they are set by signal handlers: */
81 extern PGDLLIMPORT volatile sig_atomic_t InterruptPending;
82 extern PGDLLIMPORT volatile sig_atomic_t QueryCancelPending;
83 extern PGDLLIMPORT volatile sig_atomic_t ProcDiePending;
84 extern PGDLLIMPORT volatile sig_atomic_t IdleInTransactionSessionTimeoutPending;
85 extern PGDLLIMPORT volatile sig_atomic_t ConfigReloadPending;
86 
87 extern PGDLLIMPORT volatile sig_atomic_t ClientConnectionLost;
88 
89 /* these are marked volatile because they are examined by signal handlers: */
92 extern PGDLLIMPORT volatile uint32 CritSectionCount;
93 
94 /* in tcop/postgres.c */
95 extern void ProcessInterrupts(void);
96 
97 #ifndef WIN32
98 
99 #define CHECK_FOR_INTERRUPTS() \
100 do { \
101  if (InterruptPending) \
102  ProcessInterrupts(); \
103 } while(0)
104 #else /* WIN32 */
105 
106 #define CHECK_FOR_INTERRUPTS() \
107 do { \
108  if (UNBLOCKED_SIGNAL_QUEUE()) \
109  pgwin32_dispatch_queued_signals(); \
110  if (InterruptPending) \
111  ProcessInterrupts(); \
112 } while(0)
113 #endif /* WIN32 */
114 
115 
116 #define HOLD_INTERRUPTS() (InterruptHoldoffCount++)
117 
118 #define RESUME_INTERRUPTS() \
119 do { \
120  Assert(InterruptHoldoffCount > 0); \
121  InterruptHoldoffCount--; \
122 } while(0)
123 
124 #define HOLD_CANCEL_INTERRUPTS() (QueryCancelHoldoffCount++)
125 
126 #define RESUME_CANCEL_INTERRUPTS() \
127 do { \
128  Assert(QueryCancelHoldoffCount > 0); \
129  QueryCancelHoldoffCount--; \
130 } while(0)
131 
132 #define START_CRIT_SECTION() (CritSectionCount++)
133 
134 #define END_CRIT_SECTION() \
135 do { \
136  Assert(CritSectionCount > 0); \
137  CritSectionCount--; \
138 } while(0)
139 
140 
141 /*****************************************************************************
142  * globals.h -- *
143  *****************************************************************************/
144 
145 /*
146  * from utils/init/globals.c
147  */
148 extern PGDLLIMPORT pid_t PostmasterPid;
150 extern PGDLLIMPORT bool IsUnderPostmaster;
151 extern PGDLLIMPORT bool IsBackgroundWorker;
152 extern PGDLLIMPORT bool IsBinaryUpgrade;
153 
154 extern PGDLLIMPORT bool ExitOnAnyError;
155 
156 extern PGDLLIMPORT char *DataDir;
158 
159 extern PGDLLIMPORT int NBuffers;
160 extern PGDLLIMPORT int MaxBackends;
161 extern PGDLLIMPORT int MaxConnections;
164 
165 extern PGDLLIMPORT int MyProcPid;
168 extern PGDLLIMPORT struct Port *MyProcPort;
169 extern PGDLLIMPORT struct Latch *MyLatch;
170 extern int32 MyCancelKey;
171 extern int MyPMChildSlot;
172 
173 extern char OutputFileName[];
174 extern PGDLLIMPORT char my_exec_path[];
175 extern char pkglib_path[];
176 
177 #ifdef EXEC_BACKEND
178 extern char postgres_exec_path[];
179 #endif
180 
181 /*
182  * done in storage/backendid.h for now.
183  *
184  * extern BackendId MyBackendId;
185  */
187 
189 
190 /*
191  * Date/Time Configuration
192  *
193  * DateStyle defines the output formatting choice for date/time types:
194  * USE_POSTGRES_DATES specifies traditional Postgres format
195  * USE_ISO_DATES specifies ISO-compliant format
196  * USE_SQL_DATES specifies Oracle/Ingres-compliant format
197  * USE_GERMAN_DATES specifies German-style dd.mm/yyyy
198  *
199  * DateOrder defines the field order to be assumed when reading an
200  * ambiguous date (anything not in YYYY-MM-DD format, with a four-digit
201  * year field first, is taken to be ambiguous):
202  * DATEORDER_YMD specifies field order yy-mm-dd
203  * DATEORDER_DMY specifies field order dd-mm-yy ("European" convention)
204  * DATEORDER_MDY specifies field order mm-dd-yy ("US" convention)
205  *
206  * In the Postgres and SQL DateStyles, DateOrder also selects output field
207  * order: day comes before month in DMY style, else month comes before day.
208  *
209  * The user-visible "DateStyle" run-time parameter subsumes both of these.
210  */
211 
212 /* valid DateStyle values */
213 #define USE_POSTGRES_DATES 0
214 #define USE_ISO_DATES 1
215 #define USE_SQL_DATES 2
216 #define USE_GERMAN_DATES 3
217 #define USE_XSD_DATES 4
218 
219 /* valid DateOrder values */
220 #define DATEORDER_YMD 0
221 #define DATEORDER_DMY 1
222 #define DATEORDER_MDY 2
223 
224 extern PGDLLIMPORT int DateStyle;
225 extern PGDLLIMPORT int DateOrder;
226 
227 /*
228  * IntervalStyles
229  * INTSTYLE_POSTGRES Like Postgres < 8.4 when DateStyle = 'iso'
230  * INTSTYLE_POSTGRES_VERBOSE Like Postgres < 8.4 when DateStyle != 'iso'
231  * INTSTYLE_SQL_STANDARD SQL standard interval literals
232  * INTSTYLE_ISO_8601 ISO-8601-basic formatted intervals
233  */
234 #define INTSTYLE_POSTGRES 0
235 #define INTSTYLE_POSTGRES_VERBOSE 1
236 #define INTSTYLE_SQL_STANDARD 2
237 #define INTSTYLE_ISO_8601 3
238 
239 extern PGDLLIMPORT int IntervalStyle;
240 
241 #define MAXTZLEN 10 /* max TZ name len, not counting tr. null */
242 
243 extern bool enableFsync;
245 extern PGDLLIMPORT int work_mem;
248 
249 extern int VacuumCostPageHit;
250 extern int VacuumCostPageMiss;
251 extern int VacuumCostPageDirty;
252 extern int VacuumCostLimit;
253 extern double VacuumCostDelay;
254 
255 extern int VacuumPageHit;
256 extern int VacuumPageMiss;
257 extern int VacuumPageDirty;
258 
259 extern int VacuumCostBalance;
260 extern bool VacuumCostActive;
261 
263 
264 
265 /* in tcop/postgres.c */
266 
267 #if defined(__ia64__) || defined(__ia64)
268 typedef struct
269 {
270  char *stack_base_ptr;
271  char *register_stack_base_ptr;
273 #else
274 typedef char *pg_stack_base_t;
275 #endif
276 
277 extern pg_stack_base_t set_stack_base(void);
278 extern void restore_stack_base(pg_stack_base_t base);
279 extern void check_stack_depth(void);
280 extern bool stack_is_too_deep(void);
281 
283 
284 /* in tcop/utility.c */
285 extern void PreventCommandIfReadOnly(const char *cmdname);
286 extern void PreventCommandIfParallelMode(const char *cmdname);
287 extern void PreventCommandDuringRecovery(const char *cmdname);
288 
289 /* in utils/misc/guc.c */
290 extern int trace_recovery_messages;
291 extern int trace_recovery(int trace_level);
292 
293 /*****************************************************************************
294  * pdir.h -- *
295  * POSTGRES directory path definitions. *
296  *****************************************************************************/
297 
298 /* flags to be OR'd to form sec_context */
299 #define SECURITY_LOCAL_USERID_CHANGE 0x0001
300 #define SECURITY_RESTRICTED_OPERATION 0x0002
301 #define SECURITY_NOFORCE_RLS 0x0004
302 
303 extern char *DatabasePath;
304 
305 /* now in utils/init/miscinit.c */
306 extern void InitPostmasterChild(void);
307 extern void InitStandaloneProcess(const char *argv0);
308 
309 extern void SetDatabasePath(const char *path);
310 
311 extern char *GetUserNameFromId(Oid roleid, bool noerr);
312 extern Oid GetUserId(void);
313 extern Oid GetOuterUserId(void);
314 extern Oid GetSessionUserId(void);
315 extern Oid GetAuthenticatedUserId(void);
316 extern void GetUserIdAndSecContext(Oid *userid, int *sec_context);
317 extern void SetUserIdAndSecContext(Oid userid, int sec_context);
318 extern bool InLocalUserIdChange(void);
319 extern bool InSecurityRestrictedOperation(void);
320 extern bool InNoForceRLSOperation(void);
321 extern void GetUserIdAndContext(Oid *userid, bool *sec_def_context);
322 extern void SetUserIdAndContext(Oid userid, bool sec_def_context);
323 extern void InitializeSessionUserId(const char *rolename, Oid useroid);
324 extern void InitializeSessionUserIdStandalone(void);
325 extern void SetSessionAuthorization(Oid userid, bool is_superuser);
326 extern Oid GetCurrentRoleId(void);
327 extern void SetCurrentRoleId(Oid roleid, bool is_superuser);
328 
329 extern void checkDataDir(void);
330 extern void SetDataDir(const char *dir);
331 extern void ChangeToDataDir(void);
332 
333 extern void SwitchToSharedLatch(void);
334 extern void SwitchBackToLocalLatch(void);
335 
336 /* in utils/misc/superuser.c */
337 extern bool superuser(void); /* current user is superuser */
338 extern bool superuser_arg(Oid roleid); /* given user is superuser */
339 
340 
341 /*****************************************************************************
342  * pmod.h -- *
343  * POSTGRES processing mode definitions. *
344  *****************************************************************************/
345 
346 /*
347  * Description:
348  * There are three processing modes in POSTGRES. They are
349  * BootstrapProcessing or "bootstrap," InitProcessing or
350  * "initialization," and NormalProcessing or "normal."
351  *
352  * The first two processing modes are used during special times. When the
353  * system state indicates bootstrap processing, transactions are all given
354  * transaction id "one" and are consequently guaranteed to commit. This mode
355  * is used during the initial generation of template databases.
356  *
357  * Initialization mode: used while starting a backend, until all normal
358  * initialization is complete. Some code behaves differently when executed
359  * in this mode to enable system bootstrapping.
360  *
361  * If a POSTGRES backend process is in normal mode, then all code may be
362  * executed normally.
363  */
364 
365 typedef enum ProcessingMode
366 {
367  BootstrapProcessing, /* bootstrap creation of template database */
368  InitProcessing, /* initializing system */
369  NormalProcessing /* normal processing */
371 
372 extern ProcessingMode Mode;
373 
374 #define IsBootstrapProcessingMode() (Mode == BootstrapProcessing)
375 #define IsInitProcessingMode() (Mode == InitProcessing)
376 #define IsNormalProcessingMode() (Mode == NormalProcessing)
377 
378 #define GetProcessingMode() Mode
379 
380 #define SetProcessingMode(mode) \
381  do { \
382  AssertArg((mode) == BootstrapProcessing || \
383  (mode) == InitProcessing || \
384  (mode) == NormalProcessing); \
385  Mode = (mode); \
386  } while(0)
387 
388 
389 /*
390  * Auxiliary-process type identifiers. These used to be in bootstrap.h
391  * but it seems saner to have them here, with the ProcessingMode stuff.
392  * The MyAuxProcType global is defined and set in bootstrap.c.
393  */
394 
395 typedef enum
396 {
405 
406  NUM_AUXPROCTYPES /* Must be last! */
407 } AuxProcType;
408 
410 
411 #define AmBootstrapProcess() (MyAuxProcType == BootstrapProcess)
412 #define AmStartupProcess() (MyAuxProcType == StartupProcess)
413 #define AmBackgroundWriterProcess() (MyAuxProcType == BgWriterProcess)
414 #define AmCheckpointerProcess() (MyAuxProcType == CheckpointerProcess)
415 #define AmWalWriterProcess() (MyAuxProcType == WalWriterProcess)
416 #define AmWalReceiverProcess() (MyAuxProcType == WalReceiverProcess)
417 
418 
419 /*****************************************************************************
420  * pinit.h -- *
421  * POSTGRES initialization and cleanup definitions. *
422  *****************************************************************************/
423 
424 /* in utils/init/postinit.c */
425 extern void pg_split_opts(char **argv, int *argcp, const char *optstr);
426 extern void InitializeMaxBackends(void);
427 extern void InitPostgres(const char *in_dbname, Oid dboid, const char *username,
428  Oid useroid, char *out_dbname, bool override_allow_connections);
429 extern void BaseInit(void);
430 
431 /* in utils/init/miscinit.c */
432 extern bool IgnoreSystemIndexes;
436 extern char *local_preload_libraries_string;
437 
438 extern void CreateDataDirLockFile(bool amPostmaster);
439 extern void CreateSocketLockFile(const char *socketfile, bool amPostmaster,
440  const char *socketDir);
441 extern void TouchSocketLockFiles(void);
442 extern void AddToDataDirLockFile(int target_line, const char *str);
443 extern bool RecheckDataDirLockFile(void);
444 extern void ValidatePgVersion(const char *path);
445 extern void process_shared_preload_libraries(void);
446 extern void process_session_preload_libraries(void);
447 extern void pg_bindtextdomain(const char *domain);
448 extern bool has_rolreplication(Oid roleid);
449 
450 /* in access/transam/xlog.c */
451 extern bool BackupInProgress(void);
452 extern void CancelBackup(void);
453 
454 #endif /* MISCADMIN_H */
PGDLLIMPORT int max_worker_processes
Definition: globals.c:133
AuxProcType
Definition: miscadmin.h:395
PGDLLIMPORT bool IsPostmasterEnvironment
Definition: globals.c:108
PGDLLIMPORT int IntervalStyle
Definition: globals.c:117
PGDLLIMPORT volatile sig_atomic_t InterruptPending
Definition: globals.c:30
void SetUserIdAndSecContext(Oid userid, int sec_context)
Definition: miscinit.c:492
static char * argv0
Definition: pg_ctl.c:96
PGDLLIMPORT volatile sig_atomic_t QueryCancelPending
Definition: globals.c:31
int VacuumCostPageDirty
Definition: globals.c:139
int64 pg_time_t
Definition: pgtime.h:23
int VacuumPageHit
Definition: globals.c:143
char OutputFileName[]
Definition: globals.c:70
bool stack_is_too_deep(void)
Definition: postgres.c:3289
PGDLLIMPORT volatile sig_atomic_t ConfigReloadPending
Definition: globals.c:35
void PreventCommandIfParallelMode(const char *cmdname)
Definition: utility.c:257
void InitializeSessionUserIdStandalone(void)
Definition: miscinit.c:682
char * DatabasePath
Definition: globals.c:93
int64 TimestampTz
Definition: timestamp.h:39
bool BackupInProgress(void)
Definition: xlog.c:11423
void SetUserIdAndContext(Oid userid, bool sec_def_context)
Definition: miscinit.c:541
void checkDataDir(void)
Definition: miscinit.c:99
bool has_rolreplication(Oid roleid)
Definition: miscinit.c:561
bool VacuumCostActive
Definition: globals.c:148
Oid GetUserId(void)
Definition: miscinit.c:380
bool InSecurityRestrictedOperation(void)
Definition: miscinit.c:512
ProcessingMode Mode
Definition: miscinit.c:60
void AddToDataDirLockFile(int target_line, const char *str)
Definition: miscinit.c:1254
Definition: libpq-be.h:120
bool superuser_arg(Oid roleid)
Definition: superuser.c:57
PGDLLIMPORT Oid MyDatabaseTableSpace
Definition: globals.c:87
void process_session_preload_libraries(void)
Definition: miscinit.c:1596
PGDLLIMPORT int maintenance_work_mem
Definition: globals.c:122
PGDLLIMPORT volatile sig_atomic_t ClientConnectionLost
Definition: globals.c:33
unsigned int Oid
Definition: postgres_ext.h:31
PGDLLIMPORT char * DataDir
Definition: globals.c:62
void InitializeMaxBackends(void)
Definition: postinit.c:528
PGDLLIMPORT struct Latch * MyLatch
Definition: globals.c:54
void PreventCommandIfReadOnly(const char *cmdname)
Definition: utility.c:239
void SetDatabasePath(const char *path)
Definition: miscinit.c:86
bool InLocalUserIdChange(void)
Definition: miscinit.c:503
int VacuumPageDirty
Definition: globals.c:145
#define PGDLLIMPORT
Definition: c.h:1229
char * shared_preload_libraries_string
Definition: miscinit.c:1518
signed int int32
Definition: c.h:346
Oid GetOuterUserId(void)
Definition: miscinit.c:391
PGDLLIMPORT int MyProcPid
Definition: globals.c:40
AuxProcType MyAuxProcType
Definition: bootstrap.c:72
bool InNoForceRLSOperation(void)
Definition: miscinit.c:521
Oid GetAuthenticatedUserId(void)
Definition: miscinit.c:439
PGDLLIMPORT bool ExitOnAnyError
Definition: globals.c:113
void process_shared_preload_libraries(void)
Definition: miscinit.c:1583
int VacuumCostPageHit
Definition: globals.c:137
PGDLLIMPORT bool IsBackgroundWorker
Definition: globals.c:111
void CreateSocketLockFile(const char *socketfile, bool amPostmaster, const char *socketDir)
Definition: miscinit.c:1186
int trace_recovery_messages
Definition: guc.c:516
char * local_preload_libraries_string
Definition: miscinit.c:1519
int VacuumCostLimit
Definition: globals.c:140
char pkglib_path[]
Definition: globals.c:73
double vacuum_cleanup_index_scale_factor
Definition: globals.c:150
Definition: latch.h:110
bool enableFsync
Definition: globals.c:119
PGDLLIMPORT struct Port * MyProcPort
Definition: globals.c:43
PGDLLIMPORT int NBuffers
Definition: globals.c:131
PGDLLIMPORT pg_time_t MyStartTime
Definition: globals.c:41
PGDLLIMPORT TimestampTz MyStartTimestamp
Definition: globals.c:42
void check_stack_depth(void)
Definition: postgres.c:3275
char * session_preload_libraries_string
Definition: miscinit.c:1517
void InitStandaloneProcess(const char *argv0)
Definition: miscinit.c:318
unsigned int uint32
Definition: c.h:358
void SwitchBackToLocalLatch(void)
Definition: miscinit.c:361
bool superuser(void)
Definition: superuser.c:47
void ValidatePgVersion(const char *path)
Definition: miscinit.c:1454
PGDLLIMPORT volatile uint32 QueryCancelHoldoffCount
Definition: globals.c:37
PGDLLIMPORT volatile uint32 InterruptHoldoffCount
Definition: globals.c:36
void GetUserIdAndContext(Oid *userid, bool *sec_def_context)
Definition: miscinit.c:534
Oid GetSessionUserId(void)
Definition: miscinit.c:414
PGDLLIMPORT int data_directory_mode
Definition: globals.c:68
void pg_bindtextdomain(const char *domain)
Definition: miscinit.c:1607
void SwitchToSharedLatch(void)
Definition: miscinit.c:342
void TouchSocketLockFiles(void)
Definition: miscinit.c:1204
void SetDataDir(const char *dir)
Definition: miscinit.c:192
void SetCurrentRoleId(Oid roleid, bool is_superuser)
Definition: miscinit.c:760
void CancelBackup(void)
Definition: xlog.c:11443
pg_stack_base_t set_stack_base(void)
Definition: postgres.c:3222
void pg_split_opts(char **argv, int *argcp, const char *optstr)
Definition: postinit.c:469
void SetSessionAuthorization(Oid userid, bool is_superuser)
Definition: miscinit.c:714
int trace_recovery(int trace_level)
Definition: elog.c:3474
void restore_stack_base(pg_stack_base_t base)
Definition: postgres.c:3253
PGDLLIMPORT bool IsBinaryUpgrade
Definition: globals.c:110
void CreateDataDirLockFile(bool amPostmaster)
Definition: miscinit.c:1177
static char * username
Definition: initdb.c:133
int VacuumCostBalance
Definition: globals.c:147
PGDLLIMPORT bool allowSystemTableMods
Definition: globals.c:120
PGDLLIMPORT pid_t PostmasterPid
Definition: globals.c:95
int32 MyCancelKey
Definition: globals.c:44
char * GetUserNameFromId(Oid roleid, bool noerr)
Definition: miscinit.c:795
PGDLLIMPORT volatile sig_atomic_t IdleInTransactionSessionTimeoutPending
Definition: globals.c:34
#define SIGNAL_ARGS
Definition: c.h:1245
PGDLLIMPORT bool IsUnderPostmaster
Definition: globals.c:109
void InitializeSessionUserId(const char *rolename, Oid useroid)
Definition: miscinit.c:579
PGDLLIMPORT int DateStyle
Definition: globals.c:115
void ChangeToDataDir(void)
Definition: miscinit.c:213
void PostgresSigHupHandler(SIGNAL_ARGS)
Definition: postgres.c:2845
void GetUserIdAndSecContext(Oid *userid, int *sec_context)
Definition: miscinit.c:485
PGDLLIMPORT int work_mem
Definition: globals.c:121
ProcessingMode
Definition: miscadmin.h:365
PGDLLIMPORT volatile uint32 CritSectionCount
Definition: globals.c:38
static bool is_superuser(Archive *fout)
Definition: pg_dump.c:4072
bool RecheckDataDirLockFile(void)
Definition: miscinit.c:1382
char * stack_base_ptr
Definition: postgres.c:119
void ProcessInterrupts(void)
Definition: postgres.c:2985
int VacuumCostPageMiss
Definition: globals.c:138
PGDLLIMPORT char my_exec_path[]
Definition: globals.c:72
void BaseInit(void)
Definition: postinit.c:550
PGDLLIMPORT Oid MyDatabaseId
Definition: globals.c:85
PGDLLIMPORT int MaxConnections
Definition: globals.c:132
PGDLLIMPORT int max_parallel_workers
Definition: globals.c:134
PGDLLIMPORT bool process_shared_preload_libraries_in_progress
Definition: miscinit.c:1522
int VacuumPageMiss
Definition: globals.c:144
int MyPMChildSlot
Definition: globals.c:45
double VacuumCostDelay
Definition: globals.c:141
PGDLLIMPORT int MaxBackends
Definition: globals.c:135
void InitPostgres(const char *in_dbname, Oid dboid, const char *username, Oid useroid, char *out_dbname, bool override_allow_connections)
Definition: postinit.c:592
void PreventCommandDuringRecovery(const char *cmdname)
Definition: utility.c:276
bool IgnoreSystemIndexes
Definition: miscinit.c:77
PGDLLIMPORT int max_parallel_maintenance_workers
Definition: globals.c:123
PGDLLIMPORT volatile sig_atomic_t ProcDiePending
Definition: globals.c:32
Oid GetCurrentRoleId(void)
Definition: miscinit.c:739
char * pg_stack_base_t
Definition: miscadmin.h:274
void InitPostmasterChild(void)
Definition: miscinit.c:273
PGDLLIMPORT int DateOrder
Definition: globals.c:116