PostgreSQL Source Code  git master
guc.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------
2  * guc.h
3  *
4  * External declarations pertaining to Grand Unified Configuration.
5  *
6  * Copyright (c) 2000-2024, PostgreSQL Global Development Group
7  * Written by Peter Eisentraut <peter_e@gmx.net>.
8  *
9  * src/include/utils/guc.h
10  *--------------------------------------------------------------------
11  */
12 #ifndef GUC_H
13 #define GUC_H
14 
15 #include "nodes/parsenodes.h"
16 #include "tcop/dest.h"
17 #include "utils/array.h"
18 
19 
20 /* upper limit for GUC variables measured in kilobytes of memory */
21 /* note that various places assume the byte size fits in a "long" variable */
22 #if SIZEOF_SIZE_T > 4 && SIZEOF_LONG > 4
23 #define MAX_KILOBYTES INT_MAX
24 #else
25 #define MAX_KILOBYTES (INT_MAX / 1024)
26 #endif
27 
28 /*
29  * Automatic configuration file name for ALTER SYSTEM.
30  * This file will be used to store values of configuration parameters
31  * set by ALTER SYSTEM command.
32  */
33 #define PG_AUTOCONF_FILENAME "postgresql.auto.conf"
34 
35 /*
36  * Certain options can only be set at certain times. The rules are
37  * like this:
38  *
39  * INTERNAL options cannot be set by the user at all, but only through
40  * internal processes ("server_version" is an example). These are GUC
41  * variables only so they can be shown by SHOW, etc.
42  *
43  * POSTMASTER options can only be set when the postmaster starts,
44  * either from the configuration file or the command line.
45  *
46  * SIGHUP options can only be set at postmaster startup or by changing
47  * the configuration file and sending the HUP signal to the postmaster
48  * or a backend process. (Notice that the signal receipt will not be
49  * evaluated immediately. The postmaster and the backend check it at a
50  * certain point in their main loop. It's safer to wait than to read a
51  * file asynchronously.)
52  *
53  * BACKEND and SU_BACKEND options can only be set at postmaster startup,
54  * from the configuration file, or by client request in the connection
55  * startup packet (e.g., from libpq's PGOPTIONS variable). SU_BACKEND
56  * options can be set from the startup packet only when the user is a
57  * superuser. Furthermore, an already-started backend will ignore changes
58  * to such an option in the configuration file. The idea is that these
59  * options are fixed for a given backend once it's started, but they can
60  * vary across backends.
61  *
62  * SUSET options can be set at postmaster startup, with the SIGHUP
63  * mechanism, or from the startup packet or SQL if you're a superuser.
64  *
65  * USERSET options can be set by anyone any time.
66  */
67 typedef enum
68 {
76 } GucContext;
77 
78 /*
79  * The following type records the source of the current setting. A
80  * new setting can only take effect if the previous setting had the
81  * same or lower level. (E.g, changing the config file doesn't
82  * override the postmaster command line.) Tracking the source allows us
83  * to process sources in any convenient order without affecting results.
84  * Sources <= PGC_S_OVERRIDE will set the default used by RESET, as well
85  * as the current value.
86  *
87  * PGC_S_INTERACTIVE isn't actually a source value, but is the
88  * dividing line between "interactive" and "non-interactive" sources for
89  * error reporting purposes.
90  *
91  * PGC_S_TEST is used when testing values to be used later. For example,
92  * ALTER DATABASE/ROLE tests proposed per-database or per-user defaults this
93  * way, and CREATE FUNCTION tests proposed function SET clauses this way.
94  * This is an interactive case, but it needs its own source value because
95  * some assign hooks need to make different validity checks in this case.
96  * In particular, references to nonexistent database objects generally
97  * shouldn't throw hard errors in this case, at most NOTICEs, since the
98  * objects might exist by the time the setting is used for real.
99  *
100  * When setting the value of a non-compile-time-constant PGC_INTERNAL option,
101  * source == PGC_S_DYNAMIC_DEFAULT should typically be used so that the value
102  * will show as "default" in pg_settings. If there is a specific reason not
103  * to want that, use source == PGC_S_OVERRIDE.
104  *
105  * NB: see GucSource_Names in guc.c if you change this.
106  */
107 typedef enum
108 {
109  PGC_S_DEFAULT, /* hard-wired default ("boot_val") */
110  PGC_S_DYNAMIC_DEFAULT, /* default computed during initialization */
111  PGC_S_ENV_VAR, /* postmaster environment variable */
112  PGC_S_FILE, /* postgresql.conf */
113  PGC_S_ARGV, /* postmaster command line */
114  PGC_S_GLOBAL, /* global in-database setting */
115  PGC_S_DATABASE, /* per-database setting */
116  PGC_S_USER, /* per-user setting */
117  PGC_S_DATABASE_USER, /* per-user-and-database setting */
118  PGC_S_CLIENT, /* from client connection request */
119  PGC_S_OVERRIDE, /* special case to forcibly set default */
120  PGC_S_INTERACTIVE, /* dividing line for error reporting */
121  PGC_S_TEST, /* test per-database or per-user setting */
122  PGC_S_SESSION, /* SET command */
123 } GucSource;
124 
125 /*
126  * Parsing the configuration file(s) will return a list of name-value pairs
127  * with source location info. We also abuse this data structure to carry
128  * error reports about the config files. An entry reporting an error will
129  * have errmsg != NULL, and might have NULLs for name, value, and/or filename.
130  *
131  * If "ignore" is true, don't attempt to apply the item (it might be an error
132  * report, or an item we determined to be duplicate). "applied" is set true
133  * if we successfully applied, or could have applied, the setting.
134  */
135 typedef struct ConfigVariable
136 {
137  char *name;
138  char *value;
139  char *errmsg;
140  char *filename;
142  bool ignore;
143  bool applied;
146 
147 typedef struct config_generic config_handle;
148 
149 extern bool ParseConfigFile(const char *config_file, bool strict,
150  const char *calling_file, int calling_lineno,
151  int depth, int elevel,
152  ConfigVariable **head_p, ConfigVariable **tail_p);
153 extern bool ParseConfigFp(FILE *fp, const char *config_file,
154  int depth, int elevel,
155  ConfigVariable **head_p, ConfigVariable **tail_p);
156 extern bool ParseConfigDirectory(const char *includedir,
157  const char *calling_file, int calling_lineno,
158  int depth, int elevel,
159  ConfigVariable **head_p,
160  ConfigVariable **tail_p);
162 extern char *DeescapeQuotedString(const char *s);
163 
164 /*
165  * The possible values of an enum variable are specified by an array of
166  * name-value pairs. The "hidden" flag means the value is accepted but
167  * won't be displayed when guc.c is asked for a list of acceptable values.
168  */
170 {
171  const char *name;
172  int val;
173  bool hidden;
174 };
175 
176 /*
177  * Signatures for per-variable check/assign/show hook functions
178  */
179 typedef bool (*GucBoolCheckHook) (bool *newval, void **extra, GucSource source);
180 typedef bool (*GucIntCheckHook) (int *newval, void **extra, GucSource source);
181 typedef bool (*GucRealCheckHook) (double *newval, void **extra, GucSource source);
182 typedef bool (*GucStringCheckHook) (char **newval, void **extra, GucSource source);
183 typedef bool (*GucEnumCheckHook) (int *newval, void **extra, GucSource source);
184 
185 typedef void (*GucBoolAssignHook) (bool newval, void *extra);
186 typedef void (*GucIntAssignHook) (int newval, void *extra);
187 typedef void (*GucRealAssignHook) (double newval, void *extra);
188 typedef void (*GucStringAssignHook) (const char *newval, void *extra);
189 typedef void (*GucEnumAssignHook) (int newval, void *extra);
190 
191 typedef const char *(*GucShowHook) (void);
192 
193 /*
194  * Miscellaneous
195  */
196 typedef enum
197 {
198  /* Types of set_config_option actions */
199  GUC_ACTION_SET, /* regular SET command */
200  GUC_ACTION_LOCAL, /* SET LOCAL command */
201  GUC_ACTION_SAVE, /* function SET option, or temp assignment */
202 } GucAction;
203 
204 #define GUC_QUALIFIER_SEPARATOR '.'
205 
206 /*
207  * Bit values in "flags" of a GUC variable. Note that these don't appear
208  * on disk, so we can reassign their values freely.
209  */
210 #define GUC_LIST_INPUT 0x000001 /* input can be list format */
211 #define GUC_LIST_QUOTE 0x000002 /* double-quote list elements */
212 #define GUC_NO_SHOW_ALL 0x000004 /* exclude from SHOW ALL */
213 #define GUC_NO_RESET 0x000008 /* disallow RESET and SAVE */
214 #define GUC_NO_RESET_ALL 0x000010 /* exclude from RESET ALL */
215 #define GUC_EXPLAIN 0x000020 /* include in EXPLAIN */
216 #define GUC_REPORT 0x000040 /* auto-report changes to client */
217 #define GUC_NOT_IN_SAMPLE 0x000080 /* not in postgresql.conf.sample */
218 #define GUC_DISALLOW_IN_FILE 0x000100 /* can't set in postgresql.conf */
219 #define GUC_CUSTOM_PLACEHOLDER 0x000200 /* placeholder for custom variable */
220 #define GUC_SUPERUSER_ONLY 0x000400 /* show only to superusers */
221 #define GUC_IS_NAME 0x000800 /* limit string to NAMEDATALEN-1 */
222 #define GUC_NOT_WHILE_SEC_REST 0x001000 /* can't set if security restricted */
223 #define GUC_DISALLOW_IN_AUTO_FILE \
224  0x002000 /* can't set in PG_AUTOCONF_FILENAME */
225 #define GUC_RUNTIME_COMPUTED 0x004000 /* delay processing in 'postgres -C' */
226 
227 #define GUC_UNIT_KB 0x01000000 /* value is in kilobytes */
228 #define GUC_UNIT_BLOCKS 0x02000000 /* value is in blocks */
229 #define GUC_UNIT_XBLOCKS 0x03000000 /* value is in xlog blocks */
230 #define GUC_UNIT_MB 0x04000000 /* value is in megabytes */
231 #define GUC_UNIT_BYTE 0x05000000 /* value is in bytes */
232 #define GUC_UNIT_MEMORY 0x0F000000 /* mask for size-related units */
233 
234 #define GUC_UNIT_MS 0x10000000 /* value is in milliseconds */
235 #define GUC_UNIT_S 0x20000000 /* value is in seconds */
236 #define GUC_UNIT_MIN 0x30000000 /* value is in minutes */
237 #define GUC_UNIT_TIME 0x70000000 /* mask for time-related units */
238 
239 #define GUC_UNIT (GUC_UNIT_MEMORY | GUC_UNIT_TIME)
240 
241 
242 /* GUC vars that are actually defined in guc_tables.c, rather than elsewhere */
243 extern PGDLLIMPORT bool Debug_print_plan;
244 extern PGDLLIMPORT bool Debug_print_parse;
246 extern PGDLLIMPORT bool Debug_pretty_print;
247 
248 extern PGDLLIMPORT bool log_parser_stats;
249 extern PGDLLIMPORT bool log_planner_stats;
250 extern PGDLLIMPORT bool log_executor_stats;
251 extern PGDLLIMPORT bool log_statement_stats;
253 extern PGDLLIMPORT char *event_source;
254 
257 
258 extern PGDLLIMPORT bool AllowAlterSystem;
259 extern PGDLLIMPORT bool log_duration;
263 extern PGDLLIMPORT int log_min_messages;
267 extern PGDLLIMPORT int log_temp_files;
269 extern PGDLLIMPORT double log_xact_sample_rate;
270 extern PGDLLIMPORT char *backtrace_functions;
271 
272 extern PGDLLIMPORT int temp_file_limit;
273 
274 extern PGDLLIMPORT int num_temp_buffers;
275 
276 extern PGDLLIMPORT char *cluster_name;
277 extern PGDLLIMPORT char *ConfigFileName;
278 extern PGDLLIMPORT char *HbaFileName;
279 extern PGDLLIMPORT char *IdentFileName;
280 extern PGDLLIMPORT char *external_pid_file;
281 
282 extern PGDLLIMPORT char *application_name;
283 
287 extern PGDLLIMPORT int tcp_user_timeout;
288 
289 extern PGDLLIMPORT char *role_string;
290 extern PGDLLIMPORT bool in_hot_standby_guc;
291 
292 #ifdef TRACE_SORT
293 extern PGDLLIMPORT bool trace_sort;
294 #endif
295 
296 #ifdef DEBUG_BOUNDED_SORT
297 extern PGDLLIMPORT bool optimize_bounded_sort;
298 #endif
299 
300 /*
301  * Declarations for options for enum values
302  *
303  * For most parameters, these are defined statically inside guc_tables.c. But
304  * for some parameters, the definitions require symbols that are not easily
305  * available inside guc_tables.c, so they are instead defined in their home
306  * modules. For those, we keep the extern declarations here. (An alternative
307  * would be to put the extern declarations in the modules' header files, but
308  * that would then require including the definition of struct
309  * config_enum_entry into those header files.)
310  */
311 extern const struct config_enum_entry archive_mode_options[];
314 extern const struct config_enum_entry wal_level_options[];
315 extern const struct config_enum_entry wal_sync_method_options[];
316 
317 /*
318  * Functions exported by guc.c
319  */
320 extern void SetConfigOption(const char *name, const char *value,
322 
323 extern void DefineCustomBoolVariable(const char *name,
324  const char *short_desc,
325  const char *long_desc,
326  bool *valueAddr,
327  bool bootValue,
329  int flags,
330  GucBoolCheckHook check_hook,
331  GucBoolAssignHook assign_hook,
332  GucShowHook show_hook) pg_attribute_nonnull(1, 4);
333 
334 extern void DefineCustomIntVariable(const char *name,
335  const char *short_desc,
336  const char *long_desc,
337  int *valueAddr,
338  int bootValue,
339  int minValue,
340  int maxValue,
342  int flags,
343  GucIntCheckHook check_hook,
344  GucIntAssignHook assign_hook,
345  GucShowHook show_hook) pg_attribute_nonnull(1, 4);
346 
347 extern void DefineCustomRealVariable(const char *name,
348  const char *short_desc,
349  const char *long_desc,
350  double *valueAddr,
351  double bootValue,
352  double minValue,
353  double maxValue,
355  int flags,
356  GucRealCheckHook check_hook,
357  GucRealAssignHook assign_hook,
358  GucShowHook show_hook) pg_attribute_nonnull(1, 4);
359 
360 extern void DefineCustomStringVariable(const char *name,
361  const char *short_desc,
362  const char *long_desc,
363  char **valueAddr,
364  const char *bootValue,
366  int flags,
367  GucStringCheckHook check_hook,
368  GucStringAssignHook assign_hook,
369  GucShowHook show_hook) pg_attribute_nonnull(1, 4);
370 
371 extern void DefineCustomEnumVariable(const char *name,
372  const char *short_desc,
373  const char *long_desc,
374  int *valueAddr,
375  int bootValue,
376  const struct config_enum_entry *options,
378  int flags,
379  GucEnumCheckHook check_hook,
380  GucEnumAssignHook assign_hook,
381  GucShowHook show_hook) pg_attribute_nonnull(1, 4);
382 
383 extern void MarkGUCPrefixReserved(const char *className);
384 
385 /* old name for MarkGUCPrefixReserved, for backwards compatibility: */
386 #define EmitWarningsOnPlaceholders(className) MarkGUCPrefixReserved(className)
387 
388 extern const char *GetConfigOption(const char *name, bool missing_ok,
389  bool restrict_privileged);
390 extern const char *GetConfigOptionResetString(const char *name);
391 extern int GetConfigOptionFlags(const char *name, bool missing_ok);
393 extern char *convert_GUC_name_for_parameter_acl(const char *name);
394 extern void check_GUC_name_for_parameter_acl(const char *name);
395 extern void InitializeGUCOptions(void);
396 extern bool SelectConfigFiles(const char *userDoption, const char *progname);
397 extern void ResetAllOptions(void);
398 extern void AtStart_GUC(void);
399 extern int NewGUCNestLevel(void);
400 extern void RestrictSearchPath(void);
401 extern void AtEOXact_GUC(bool isCommit, int nestLevel);
402 extern void BeginReportingGUCOptions(void);
403 extern void ReportChangedGUCOptions(void);
404 extern void ParseLongOption(const char *string, char **name, char **value);
405 extern const char *get_config_unit_name(int flags);
406 extern bool parse_int(const char *value, int *result, int flags,
407  const char **hintmsg);
408 extern bool parse_real(const char *value, double *result, int flags,
409  const char **hintmsg);
410 extern int set_config_option(const char *name, const char *value,
412  GucAction action, bool changeVal, int elevel,
413  bool is_reload);
414 extern int set_config_option_ext(const char *name, const char *value,
416  Oid srole,
417  GucAction action, bool changeVal, int elevel,
418  bool is_reload);
419 extern int set_config_with_handle(const char *name, config_handle *handle,
420  const char *value,
422  Oid srole,
423  GucAction action, bool changeVal,
424  int elevel, bool is_reload);
425 extern config_handle *get_config_handle(const char *name);
426 extern void AlterSystemSetConfigFile(AlterSystemStmt *altersysstmt);
427 extern char *GetConfigOptionByName(const char *name, const char **varname,
428  bool missing_ok);
429 
430 extern void TransformGUCArray(ArrayType *array, List **names,
431  List **values);
432 extern void ProcessGUCArray(ArrayType *array,
434 extern ArrayType *GUCArrayAdd(ArrayType *array, const char *name, const char *value);
435 extern ArrayType *GUCArrayDelete(ArrayType *array, const char *name);
436 extern ArrayType *GUCArrayReset(ArrayType *array);
437 
438 extern void *guc_malloc(int elevel, size_t size);
439 extern pg_nodiscard void *guc_realloc(int elevel, void *old, size_t size);
440 extern char *guc_strdup(int elevel, const char *src);
441 extern void guc_free(void *ptr);
442 
443 #ifdef EXEC_BACKEND
444 extern void write_nondefault_variables(GucContext context);
445 extern void read_nondefault_variables(void);
446 #endif
447 
448 /* GUC serialization */
449 extern Size EstimateGUCStateSpace(void);
450 extern void SerializeGUCState(Size maxsize, char *start_address);
451 extern void RestoreGUCState(void *gucstate);
452 
453 /* Functions exported by guc_funcs.c */
454 extern void ExecSetVariableStmt(VariableSetStmt *stmt, bool isTopLevel);
456 extern void SetPGVariable(const char *name, List *args, bool is_local);
457 extern void GetPGVariable(const char *name, DestReceiver *dest);
458 extern TupleDesc GetPGVariableResultDesc(const char *name);
459 
460 /* Support for messages reported from GUC check hooks */
461 
465 
466 extern void GUC_check_errcode(int sqlerrcode);
467 
468 #define GUC_check_errmsg \
469  pre_format_elog_string(errno, TEXTDOMAIN), \
470  GUC_check_errmsg_string = format_elog_string
471 
472 #define GUC_check_errdetail \
473  pre_format_elog_string(errno, TEXTDOMAIN), \
474  GUC_check_errdetail_string = format_elog_string
475 
476 #define GUC_check_errhint \
477  pre_format_elog_string(errno, TEXTDOMAIN), \
478  GUC_check_errhint_string = format_elog_string
479 
480 #endif /* GUC_H */
static Datum values[MAXATTR]
Definition: bootstrap.c:150
#define PGDLLIMPORT
Definition: c.h:1316
#define pg_nodiscard
Definition: c.h:135
unsigned char bool
Definition: c.h:456
#define pg_attribute_nonnull(...)
Definition: c.h:171
size_t Size
Definition: c.h:605
#define newval
void BeginReportingGUCOptions(void)
Definition: guc.c:2545
void GUC_check_errcode(int sqlerrcode)
Definition: guc.c:6741
void RestoreGUCState(void *gucstate)
Definition: guc.c:6149
void * guc_malloc(int elevel, size_t size)
Definition: guc.c:637
bool(* GucBoolCheckHook)(bool *newval, void **extra, GucSource source)
Definition: guc.h:179
int set_config_option_ext(const char *name, const char *value, GucContext context, GucSource source, Oid srole, GucAction action, bool changeVal, int elevel, bool is_reload)
Definition: guc.c:3380
PGDLLIMPORT bool AllowAlterSystem
Definition: guc_tables.c:489
GucAction
Definition: guc.h:197
@ GUC_ACTION_SAVE
Definition: guc.h:201
@ GUC_ACTION_SET
Definition: guc.h:199
@ GUC_ACTION_LOCAL
Definition: guc.h:200
PGDLLIMPORT int client_min_messages
Definition: guc_tables.c:517
bool parse_int(const char *value, int *result, int flags, const char **hintmsg)
Definition: guc.c:2870
void GetPGVariable(const char *name, DestReceiver *dest)
Definition: guc_funcs.c:382
void FreeConfigVariables(ConfigVariable *list)
void guc_free(void *ptr)
Definition: guc.c:688
const struct config_enum_entry recovery_target_action_options[]
Definition: xlogrecovery.c:74
bool ParseConfigFp(FILE *fp, const char *config_file, int depth, int elevel, ConfigVariable **head_p, ConfigVariable **tail_p)
bool(* GucRealCheckHook)(double *newval, void **extra, GucSource source)
Definition: guc.h:181
int NewGUCNestLevel(void)
Definition: guc.c:2234
PGDLLIMPORT int temp_file_limit
Definition: guc_tables.c:527
ArrayType * GUCArrayReset(ArrayType *array)
Definition: guc.c:6592
PGDLLIMPORT char * GUC_check_errhint_string
Definition: guc.c:83
void ProcessGUCArray(ArrayType *array, GucContext context, GucSource source, GucAction action)
Definition: guc.c:6412
PGDLLIMPORT char * application_name
Definition: guc_tables.c:537
void SetConfigOption(const char *name, const char *value, GucContext context, GucSource source)
Definition: guc.c:4282
void(* GucStringAssignHook)(const char *newval, void *extra)
Definition: guc.h:188
void void void void DefineCustomStringVariable(const char *name, const char *short_desc, const char *long_desc, char **valueAddr, const char *bootValue, GucContext context, int flags, GucStringCheckHook check_hook, GucStringAssignHook assign_hook, GucShowHook show_hook) pg_attribute_nonnull(1
PGDLLIMPORT int tcp_keepalives_idle
Definition: guc_tables.c:539
bool(* GucEnumCheckHook)(int *newval, void **extra, GucSource source)
Definition: guc.h:183
PGDLLIMPORT bool Debug_print_parse
Definition: guc_tables.c:492
pg_nodiscard void * guc_realloc(int elevel, void *old, size_t size)
Definition: guc.c:651
void void void DefineCustomRealVariable(const char *name, const char *short_desc, const char *long_desc, double *valueAddr, double bootValue, double minValue, double maxValue, GucContext context, int flags, GucRealCheckHook check_hook, GucRealAssignHook assign_hook, GucShowHook show_hook) pg_attribute_nonnull(1
void(* GucBoolAssignHook)(bool newval, void *extra)
Definition: guc.h:185
PGDLLIMPORT char * GUC_check_errdetail_string
Definition: guc.c:82
PGDLLIMPORT char * backtrace_functions
Definition: guc_tables.c:525
PGDLLIMPORT bool Debug_print_rewritten
Definition: guc_tables.c:493
bool parse_real(const char *value, double *result, int flags, const char **hintmsg)
Definition: guc.c:2960
void(* GucEnumAssignHook)(int newval, void *extra)
Definition: guc.h:189
config_handle * get_config_handle(const char *name)
Definition: guc.c:4234
PGDLLIMPORT int tcp_user_timeout
Definition: guc_tables.c:542
PGDLLIMPORT bool log_duration
Definition: guc_tables.c:490
const char * GetConfigOptionResetString(const char *name)
Definition: guc.c:4355
void SerializeGUCState(Size maxsize, char *start_address)
Definition: guc.c:6057
PGDLLIMPORT bool log_planner_stats
Definition: guc_tables.c:497
bool SelectConfigFiles(const char *userDoption, const char *progname)
Definition: guc.c:1783
PGDLLIMPORT char * HbaFileName
Definition: guc_tables.c:533
char * DeescapeQuotedString(const char *s)
PGDLLIMPORT int log_parameter_max_length
Definition: guc_tables.c:520
PGDLLIMPORT char * external_pid_file
Definition: guc_tables.c:535
void AlterSystemSetConfigFile(AlterSystemStmt *altersysstmt)
Definition: guc.c:4557
struct ConfigVariable ConfigVariable
PGDLLIMPORT int log_min_error_statement
Definition: guc_tables.c:515
const char *(* GucShowHook)(void)
Definition: guc.h:191
Size EstimateGUCStateSpace(void)
Definition: guc.c:5904
void void DefineCustomIntVariable(const char *name, const char *short_desc, const char *long_desc, int *valueAddr, int bootValue, int minValue, int maxValue, GucContext context, int flags, GucIntCheckHook check_hook, GucIntAssignHook assign_hook, GucShowHook show_hook) pg_attribute_nonnull(1
PGDLLIMPORT bool log_btree_build_stats
Definition: guc_tables.c:501
TupleDesc GetPGVariableResultDesc(const char *name)
Definition: guc_funcs.c:394
PGDLLIMPORT bool in_hot_standby_guc
Definition: guc_tables.c:615
PGDLLIMPORT char * ConfigFileName
Definition: guc_tables.c:532
PGDLLIMPORT int log_min_duration_statement
Definition: guc_tables.c:519
void AtStart_GUC(void)
Definition: guc.c:2214
const char * get_config_unit_name(int flags)
Definition: guc.c:2813
void ParseLongOption(const char *string, char **name, char **value)
Definition: guc.c:6318
void ResetAllOptions(void)
Definition: guc.c:2002
GucSource
Definition: guc.h:108
@ PGC_S_DEFAULT
Definition: guc.h:109
@ PGC_S_DYNAMIC_DEFAULT
Definition: guc.h:110
@ PGC_S_FILE
Definition: guc.h:112
@ PGC_S_GLOBAL
Definition: guc.h:114
@ PGC_S_DATABASE
Definition: guc.h:115
@ PGC_S_OVERRIDE
Definition: guc.h:119
@ PGC_S_ARGV
Definition: guc.h:113
@ PGC_S_SESSION
Definition: guc.h:122
@ PGC_S_CLIENT
Definition: guc.h:118
@ PGC_S_DATABASE_USER
Definition: guc.h:117
@ PGC_S_ENV_VAR
Definition: guc.h:111
@ PGC_S_USER
Definition: guc.h:116
@ PGC_S_TEST
Definition: guc.h:121
@ PGC_S_INTERACTIVE
Definition: guc.h:120
void SetPGVariable(const char *name, List *args, bool is_local)
Definition: guc_funcs.c:315
PGDLLIMPORT bool current_role_is_superuser
Definition: guc_tables.c:513
char * ExtractSetVariableArgs(VariableSetStmt *stmt)
Definition: guc_funcs.c:167
PGDLLIMPORT char * IdentFileName
Definition: guc_tables.c:534
bool(* GucStringCheckHook)(char **newval, void **extra, GucSource source)
Definition: guc.h:182
PGDLLIMPORT bool log_executor_stats
Definition: guc_tables.c:498
PGDLLIMPORT bool Debug_print_plan
Definition: guc_tables.c:491
void void void void void void MarkGUCPrefixReserved(const char *className)
Definition: guc.c:5229
void InitializeGUCOptions(void)
Definition: guc.c:1529
bool ParseConfigFile(const char *config_file, bool strict, const char *calling_file, int calling_lineno, int depth, int elevel, ConfigVariable **head_p, ConfigVariable **tail_p)
const struct config_enum_entry dynamic_shared_memory_options[]
Definition: dsm_impl.c:95
bool ParseConfigDirectory(const char *includedir, const char *calling_file, int calling_lineno, int depth, int elevel, ConfigVariable **head_p, ConfigVariable **tail_p)
void(* GucIntAssignHook)(int newval, void *extra)
Definition: guc.h:186
const char * GetConfigOption(const char *name, bool missing_ok, bool restrict_privileged)
Definition: guc.c:4305
void(* GucRealAssignHook)(double newval, void *extra)
Definition: guc.h:187
PGDLLIMPORT int log_min_duration_sample
Definition: guc_tables.c:518
GucContext
Definition: guc.h:68
@ PGC_SUSET
Definition: guc.h:74
@ PGC_INTERNAL
Definition: guc.h:69
@ PGC_USERSET
Definition: guc.h:75
@ PGC_SU_BACKEND
Definition: guc.h:72
@ PGC_POSTMASTER
Definition: guc.h:70
@ PGC_SIGHUP
Definition: guc.h:71
@ PGC_BACKEND
Definition: guc.h:73
PGDLLIMPORT char * role_string
Definition: guc_tables.c:612
void DefineCustomBoolVariable(const char *name, const char *short_desc, const char *long_desc, bool *valueAddr, bool bootValue, GucContext context, int flags, GucBoolCheckHook check_hook, GucBoolAssignHook assign_hook, GucShowHook show_hook) pg_attribute_nonnull(1
char * GetConfigOptionByName(const char *name, const char **varname, bool missing_ok)
Definition: guc.c:5382
PGDLLIMPORT bool Debug_pretty_print
Definition: guc_tables.c:494
ArrayType * GUCArrayAdd(ArrayType *array, const char *name, const char *value)
Definition: guc.c:6444
const struct config_enum_entry archive_mode_options[]
Definition: xlog.c:189
PGDLLIMPORT int tcp_keepalives_interval
Definition: guc_tables.c:540
PGDLLIMPORT int log_temp_files
Definition: guc_tables.c:522
void ExecSetVariableStmt(VariableSetStmt *stmt, bool isTopLevel)
Definition: guc_funcs.c:43
PGDLLIMPORT int tcp_keepalives_count
Definition: guc_tables.c:541
bool(* GucIntCheckHook)(int *newval, void **extra, GucSource source)
Definition: guc.h:180
void RestrictSearchPath(void)
Definition: guc.c:2245
PGDLLIMPORT bool check_function_bodies
Definition: guc_tables.c:505
int GetConfigOptionFlags(const char *name, bool missing_ok)
Definition: guc.c:4402
PGDLLIMPORT int num_temp_buffers
Definition: guc_tables.c:529
PGDLLIMPORT double log_xact_sample_rate
Definition: guc_tables.c:524
void check_GUC_name_for_parameter_acl(const char *name)
Definition: guc.c:1409
const struct config_enum_entry wal_sync_method_options[]
Definition: xlog.c:169
int set_config_with_handle(const char *name, config_handle *handle, const char *value, GucContext context, GucSource source, Oid srole, GucAction action, bool changeVal, int elevel, bool is_reload)
Definition: guc.c:3400
char * convert_GUC_name_for_parameter_acl(const char *name)
Definition: guc.c:1373
ArrayType * GUCArrayDelete(ArrayType *array, const char *name)
Definition: guc.c:6522
char * guc_strdup(int elevel, const char *src)
Definition: guc.c:676
PGDLLIMPORT bool log_statement_stats
Definition: guc_tables.c:499
void ProcessConfigFile(GucContext context)
const struct config_enum_entry wal_level_options[]
Definition: xlogdesc.c:27
void void void void void DefineCustomEnumVariable(const char *name, const char *short_desc, const char *long_desc, int *valueAddr, int bootValue, const struct config_enum_entry *options, GucContext context, int flags, GucEnumCheckHook check_hook, GucEnumAssignHook assign_hook, GucShowHook show_hook) pg_attribute_nonnull(1
PGDLLIMPORT bool log_parser_stats
Definition: guc_tables.c:496
void TransformGUCArray(ArrayType *array, List **names, List **values)
Definition: guc.c:6355
void ReportChangedGUCOptions(void)
Definition: guc.c:2595
PGDLLIMPORT int log_min_messages
Definition: guc_tables.c:516
void AtEOXact_GUC(bool isCommit, int nestLevel)
Definition: guc.c:2261
PGDLLIMPORT int log_parameter_max_length_on_error
Definition: guc_tables.c:521
PGDLLIMPORT char * event_source
Definition: guc_tables.c:502
int set_config_option(const char *name, const char *value, GucContext context, GucSource source, GucAction action, bool changeVal, int elevel, bool is_reload)
Definition: guc.c:3340
PGDLLIMPORT char * GUC_check_errmsg_string
Definition: guc.c:81
PGDLLIMPORT double log_statement_sample_rate
Definition: guc_tables.c:523
PGDLLIMPORT char * cluster_name
Definition: guc_tables.c:531
#define stmt
Definition: indent_codes.h:59
static struct @155 value
const char * progname
Definition: main.c:44
static rewind_source * source
Definition: pg_rewind.c:89
static char * config_file
Definition: pg_rewind.c:71
static const char * userDoption
Definition: postgres.c:161
unsigned int Oid
Definition: postgres_ext.h:31
tree context
Definition: radixtree.h:1835
static pg_noinline void Size size
Definition: slab.c:607
char * name
Definition: guc.h:137
bool ignore
Definition: guc.h:142
struct ConfigVariable * next
Definition: guc.h:144
bool applied
Definition: guc.h:143
char * filename
Definition: guc.h:140
int sourceline
Definition: guc.h:141
char * value
Definition: guc.h:138
char * errmsg
Definition: guc.h:139
Definition: pg_list.h:54
Definition: guc.h:170
const char * name
Definition: guc.h:171
int val
Definition: guc.h:172
bool hidden
Definition: guc.h:173
bool trace_sort
Definition: tuplesort.c:125
const char * name