PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <ctype.h>
#include <float.h>
#include <math.h>
#include <limits.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include "access/commit_ts.h"
#include "access/gin.h"
#include "access/rmgr.h"
#include "access/tableam.h"
#include "access/toast_compression.h"
#include "access/transam.h"
#include "access/twophase.h"
#include "access/xact.h"
#include "access/xlog_internal.h"
#include "access/xlogprefetch.h"
#include "catalog/namespace.h"
#include "catalog/pg_authid.h"
#include "catalog/storage.h"
#include "commands/async.h"
#include "commands/prepare.h"
#include "commands/trigger.h"
#include "commands/user.h"
#include "commands/vacuum.h"
#include "commands/variable.h"
#include "common/string.h"
#include "funcapi.h"
#include "jit/jit.h"
#include "libpq/auth.h"
#include "libpq/libpq.h"
#include "libpq/pqformat.h"
#include "miscadmin.h"
#include "optimizer/cost.h"
#include "optimizer/geqo.h"
#include "optimizer/optimizer.h"
#include "optimizer/paths.h"
#include "optimizer/planmain.h"
#include "parser/parse_expr.h"
#include "parser/parse_type.h"
#include "parser/parser.h"
#include "parser/scansup.h"
#include "pgstat.h"
#include "postmaster/autovacuum.h"
#include "postmaster/bgworker_internals.h"
#include "postmaster/bgwriter.h"
#include "postmaster/postmaster.h"
#include "postmaster/syslogger.h"
#include "postmaster/walwriter.h"
#include "replication/logicallauncher.h"
#include "replication/reorderbuffer.h"
#include "replication/slot.h"
#include "replication/syncrep.h"
#include "replication/walreceiver.h"
#include "replication/walsender.h"
#include "storage/bufmgr.h"
#include "storage/dsm_impl.h"
#include "storage/fd.h"
#include "storage/large_object.h"
#include "storage/pg_shmem.h"
#include "storage/predicate.h"
#include "storage/proc.h"
#include "storage/standby.h"
#include "tcop/tcopprot.h"
#include "tsearch/ts_cache.h"
#include "utils/acl.h"
#include "utils/backend_status.h"
#include "utils/builtins.h"
#include "utils/bytea.h"
#include "utils/guc_tables.h"
#include "utils/memutils.h"
#include "utils/pg_locale.h"
#include "utils/pg_lsn.h"
#include "utils/plancache.h"
#include "utils/portal.h"
#include "utils/ps_status.h"
#include "utils/rls.h"
#include "utils/snapmgr.h"
#include "utils/tzparser.h"
#include "utils/inval.h"
#include "utils/varlena.h"
#include "utils/xml.h"
#include "guc-file.c"
Go to the source code of this file.
Data Structures | |
struct | unit_conversion |
Macros | |
#define | PG_KRB_SRVTAB "" |
#define | CONFIG_FILENAME "postgresql.conf" |
#define | HBA_FILENAME "pg_hba.conf" |
#define | IDENT_FILENAME "pg_ident.conf" |
#define | REALTYPE_PRECISION 17 |
#define | MAX_UNIT_LEN 3 /* length of longest recognized unit string */ |
#define | newval (newval_union.boolval) |
#define | newval (newval_union.intval) |
#define | newval (newval_union.realval) |
#define | newval (newval_union.stringval) |
#define | newval (newval_union.enumval) |
#define | NUM_PG_SETTINGS_ATTS 17 |
#define | NUM_PG_FILE_SETTINGS_ATTS 7 |
Functions | |
static void | do_serialize (char **destptr, Size *maxbytes, const char *fmt,...) pg_attribute_printf(3 |
static void static void | set_config_sourcefile (const char *name, char *sourcefile, int sourceline) |
static bool | call_bool_check_hook (struct config_bool *conf, bool *newval, void **extra, GucSource source, int elevel) |
static bool | call_int_check_hook (struct config_int *conf, int *newval, void **extra, GucSource source, int elevel) |
static bool | call_real_check_hook (struct config_real *conf, double *newval, void **extra, GucSource source, int elevel) |
static bool | call_string_check_hook (struct config_string *conf, char **newval, void **extra, GucSource source, int elevel) |
static bool | call_enum_check_hook (struct config_enum *conf, int *newval, void **extra, GucSource source, int elevel) |
static bool | check_log_destination (char **newval, void **extra, GucSource source) |
static void | assign_log_destination (const char *newval, void *extra) |
static bool | check_wal_consistency_checking (char **newval, void **extra, GucSource source) |
static void | assign_wal_consistency_checking (const char *newval, void *extra) |
static void | assign_syslog_facility (int newval, void *extra) |
static void | assign_syslog_ident (const char *newval, void *extra) |
static void | assign_session_replication_role (int newval, void *extra) |
static bool | check_temp_buffers (int *newval, void **extra, GucSource source) |
static bool | check_bonjour (bool *newval, void **extra, GucSource source) |
static bool | check_ssl (bool *newval, void **extra, GucSource source) |
static bool | check_stage_log_stats (bool *newval, void **extra, GucSource source) |
static bool | check_log_stats (bool *newval, void **extra, GucSource source) |
static bool | check_canonical_path (char **newval, void **extra, GucSource source) |
static bool | check_timezone_abbreviations (char **newval, void **extra, GucSource source) |
static void | assign_timezone_abbreviations (const char *newval, void *extra) |
static void | pg_timezone_abbrev_initialize (void) |
static const char * | show_archive_command (void) |
static void | assign_tcp_keepalives_idle (int newval, void *extra) |
static void | assign_tcp_keepalives_interval (int newval, void *extra) |
static void | assign_tcp_keepalives_count (int newval, void *extra) |
static void | assign_tcp_user_timeout (int newval, void *extra) |
static const char * | show_tcp_keepalives_idle (void) |
static const char * | show_tcp_keepalives_interval (void) |
static const char * | show_tcp_keepalives_count (void) |
static const char * | show_tcp_user_timeout (void) |
static bool | check_maxconnections (int *newval, void **extra, GucSource source) |
static bool | check_max_worker_processes (int *newval, void **extra, GucSource source) |
static bool | check_autovacuum_max_workers (int *newval, void **extra, GucSource source) |
static bool | check_max_wal_senders (int *newval, void **extra, GucSource source) |
static bool | check_autovacuum_work_mem (int *newval, void **extra, GucSource source) |
static bool | check_effective_io_concurrency (int *newval, void **extra, GucSource source) |
static bool | check_maintenance_io_concurrency (int *newval, void **extra, GucSource source) |
static bool | check_huge_page_size (int *newval, void **extra, GucSource source) |
static bool | check_client_connection_check_interval (int *newval, void **extra, GucSource source) |
static void | assign_maintenance_io_concurrency (int newval, void *extra) |
static void | assign_pgstat_temp_directory (const char *newval, void *extra) |
static bool | check_application_name (char **newval, void **extra, GucSource source) |
static void | assign_application_name (const char *newval, void *extra) |
static bool | check_cluster_name (char **newval, void **extra, GucSource source) |
static const char * | show_unix_socket_permissions (void) |
static const char * | show_log_file_mode (void) |
static const char * | show_data_directory_mode (void) |
static const char * | show_in_hot_standby (void) |
static bool | check_backtrace_functions (char **newval, void **extra, GucSource source) |
static void | assign_backtrace_functions (const char *newval, void *extra) |
static bool | check_recovery_target_timeline (char **newval, void **extra, GucSource source) |
static void | assign_recovery_target_timeline (const char *newval, void *extra) |
static bool | check_recovery_target (char **newval, void **extra, GucSource source) |
static void | assign_recovery_target (const char *newval, void *extra) |
static bool | check_recovery_target_xid (char **newval, void **extra, GucSource source) |
static void | assign_recovery_target_xid (const char *newval, void *extra) |
static bool | check_recovery_target_time (char **newval, void **extra, GucSource source) |
static void | assign_recovery_target_time (const char *newval, void *extra) |
static bool | check_recovery_target_name (char **newval, void **extra, GucSource source) |
static void | assign_recovery_target_name (const char *newval, void *extra) |
static bool | check_recovery_target_lsn (char **newval, void **extra, GucSource source) |
static void | assign_recovery_target_lsn (const char *newval, void *extra) |
static bool | check_primary_slot_name (char **newval, void **extra, GucSource source) |
static bool | check_default_with_oids (bool *newval, void **extra, GucSource source) |
static ConfigVariable * | ProcessConfigFileInternal (GucContext context, bool applySettings, int elevel) |
StaticAssertDecl (lengthof(bytea_output_options)==(BYTEA_OUTPUT_HEX+2), "array length mismatch") | |
StaticAssertDecl (lengthof(intervalstyle_options)==(INTSTYLE_ISO_8601+2), "array length mismatch") | |
StaticAssertDecl (lengthof(log_error_verbosity_options)==(PGERROR_VERBOSE+2), "array length mismatch") | |
StaticAssertDecl (lengthof(log_statement_options)==(LOGSTMT_ALL+2), "array length mismatch") | |
StaticAssertDecl (lengthof(session_replication_role_options)==(SESSION_REPLICATION_ROLE_LOCAL+2), "array length mismatch") | |
StaticAssertDecl (lengthof(track_function_options)==(TRACK_FUNC_ALL+2), "array length mismatch") | |
StaticAssertDecl (lengthof(xmlbinary_options)==(XMLBINARY_HEX+2), "array length mismatch") | |
StaticAssertDecl (lengthof(xmloption_options)==(XMLOPTION_CONTENT+2), "array length mismatch") | |
StaticAssertDecl (lengthof(ssl_protocol_versions_info)==(PG_TLS1_3_VERSION+2), "array length mismatch") | |
StaticAssertDecl (lengthof(GucContext_Names)==(PGC_USERSET+1), "array length mismatch") | |
StaticAssertDecl (lengthof(GucSource_Names)==(PGC_S_SESSION+1), "array length mismatch") | |
StaticAssertDecl (lengthof(config_group_names)==(DEVELOPER_OPTIONS+2), "array length mismatch") | |
StaticAssertDecl (lengthof(config_type_names)==(PGC_ENUM+1), "array length mismatch") | |
static int | guc_var_compare (const void *a, const void *b) |
static int | guc_name_compare (const char *namea, const char *nameb) |
static void | InitializeGUCOptionsFromEnvironment (void) |
static void | InitializeOneGUCOption (struct config_generic *gconf) |
static void | push_old_value (struct config_generic *gconf, GucAction action) |
static void | ReportGUCOption (struct config_generic *record) |
static void | reapply_stacked_values (struct config_generic *variable, struct config_string *pHolder, GucStack *stack, const char *curvalue, GucContext curscontext, GucSource cursource) |
static void | ShowGUCConfigOption (const char *name, DestReceiver *dest) |
static void | ShowAllGUCConfig (DestReceiver *dest) |
static char * | _ShowOption (struct config_generic *record, bool use_units) |
static bool | validate_option_array_item (const char *name, const char *value, bool skipIfNoPermissions) |
static void | write_auto_conf_file (int fd, const char *filename, ConfigVariable *head_p) |
static void | replace_auto_config_value (ConfigVariable **head_p, ConfigVariable **tail_p, const char *name, const char *value) |
static void * | guc_malloc (int elevel, size_t size) |
static void * | guc_realloc (int elevel, void *old, size_t size) |
static char * | guc_strdup (int elevel, const char *src) |
static bool | string_field_used (struct config_string *conf, char *strval) |
static void | set_string_field (struct config_string *conf, char **field, char *newval) |
static bool | extra_field_used (struct config_generic *gconf, void *extra) |
static void | set_extra_field (struct config_generic *gconf, void **field, void *newval) |
static void | set_stack_value (struct config_generic *gconf, config_var_value *val) |
static void | discard_stack_value (struct config_generic *gconf, config_var_value *val) |
struct config_generic ** | get_guc_variables (void) |
void | build_guc_variables (void) |
static bool | add_guc_variable (struct config_generic *var, int elevel) |
static bool | valid_custom_variable_name (const char *name) |
static struct config_generic * | add_placeholder_variable (const char *name, int elevel) |
static struct config_generic * | find_option (const char *name, bool create_placeholders, bool skip_errors, int elevel) |
void | InitializeGUCOptions (void) |
bool | SelectConfigFiles (const char *userDoption, const char *progname) |
void | ResetAllOptions (void) |
void | AtStart_GUC (void) |
int | NewGUCNestLevel (void) |
void | AtEOXact_GUC (bool isCommit, int nestLevel) |
void | BeginReportingGUCOptions (void) |
void | ReportChangedGUCOptions (void) |
static bool | convert_to_base_unit (double value, const char *unit, int base_unit, double *base_value) |
static void | convert_int_from_base_unit (int64 base_value, int base_unit, int64 *value, const char **unit) |
static void | convert_real_from_base_unit (double base_value, int base_unit, double *value, const char **unit) |
static const char * | get_config_unit_name (int flags) |
bool | parse_int (const char *value, int *result, int flags, const char **hintmsg) |
bool | parse_real (const char *value, double *result, int flags, const char **hintmsg) |
const char * | config_enum_lookup_by_value (struct config_enum *record, int val) |
bool | config_enum_lookup_by_name (struct config_enum *record, const char *value, int *retval) |
static char * | config_enum_get_options (struct config_enum *record, const char *prefix, const char *suffix, const char *separator) |
static bool | parse_and_validate_value (struct config_generic *record, const char *name, const char *value, GucSource source, int elevel, union config_var_val *newval, void **newextra) |
int | set_config_option (const char *name, const char *value, GucContext context, GucSource source, GucAction action, bool changeVal, int elevel, bool is_reload) |
void | SetConfigOption (const char *name, const char *value, GucContext context, GucSource source) |
const char * | GetConfigOption (const char *name, bool missing_ok, bool restrict_privileged) |
const char * | GetConfigOptionResetString (const char *name) |
int | GetConfigOptionFlags (const char *name, bool missing_ok) |
static char * | flatten_set_variable_args (const char *name, List *args) |
void | AlterSystemSetConfigFile (AlterSystemStmt *altersysstmt) |
void | ExecSetVariableStmt (VariableSetStmt *stmt, bool isTopLevel) |
char * | ExtractSetVariableArgs (VariableSetStmt *stmt) |
void | SetPGVariable (const char *name, List *args, bool is_local) |
Datum | set_config_by_name (PG_FUNCTION_ARGS) |
static struct config_generic * | init_custom_variable (const char *name, const char *short_desc, const char *long_desc, GucContext context, int flags, enum config_type type, size_t sz) |
static void | define_custom_variable (struct config_generic *variable) |
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) |
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) |
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) |
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) |
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) |
void | EmitWarningsOnPlaceholders (const char *className) |
void | GetPGVariable (const char *name, DestReceiver *dest) |
TupleDesc | GetPGVariableResultDesc (const char *name) |
struct config_generic ** | get_explain_guc_options (int *num) |
char * | GetConfigOptionByName (const char *name, const char **varname, bool missing_ok) |
void | GetConfigOptionByNum (int varnum, const char **values, bool *noshow) |
int | GetNumConfigOptions (void) |
Datum | show_config_by_name (PG_FUNCTION_ARGS) |
Datum | show_config_by_name_missing_ok (PG_FUNCTION_ARGS) |
Datum | show_all_settings (PG_FUNCTION_ARGS) |
Datum | show_all_file_settings (PG_FUNCTION_ARGS) |
static bool | can_skip_gucvar (struct config_generic *gconf) |
static Size | estimate_variable_size (struct config_generic *gconf) |
Size | EstimateGUCStateSpace (void) |
static void | do_serialize_binary (char **destptr, Size *maxbytes, void *val, Size valsize) |
static void | serialize_variable (char **destptr, Size *maxbytes, struct config_generic *gconf) |
void | SerializeGUCState (Size maxsize, char *start_address) |
static char * | read_gucstate (char **srcptr, char *srcend) |
static void | read_gucstate_binary (char **srcptr, char *srcend, void *dest, Size size) |
static void | guc_restore_error_context_callback (void *arg) |
void | RestoreGUCState (void *gucstate) |
void | ParseLongOption (const char *string, char **name, char **value) |
void | ProcessGUCArray (ArrayType *array, GucContext context, GucSource source, GucAction action) |
ArrayType * | GUCArrayAdd (ArrayType *array, const char *name, const char *value) |
ArrayType * | GUCArrayDelete (ArrayType *array, const char *name) |
ArrayType * | GUCArrayReset (ArrayType *array) |
void | GUC_check_errcode (int sqlerrcode) |
static void | pg_attribute_noreturn () |
#define CONFIG_FILENAME "postgresql.conf" |
Definition at line 116 of file guc.c.
Referenced by SelectConfigFiles().
#define HBA_FILENAME "pg_hba.conf" |
Definition at line 117 of file guc.c.
Referenced by SelectConfigFiles().
#define IDENT_FILENAME "pg_ident.conf" |
Definition at line 118 of file guc.c.
Referenced by SelectConfigFiles().
Definition at line 843 of file guc.c.
Referenced by convert_to_base_unit().
#define newval (newval_union.boolval) |
Referenced by _ltree_penalty(), assign_checkpoint_completion_target(), assign_maintenance_io_concurrency(), assign_max_wal_size(), assign_recovery_target_name(), AtEOXact_GUC(), ATExecAddColumn(), ATPrepAlterColumnType(), bool_substitute_hook(), brin_bloom_add_value(), brin_inclusion_add_value(), brin_minmax_add_value(), brin_minmax_multi_add_value(), check_foreign_key(), check_recovery_target_time(), check_timezone(), check_XactIsoLevel(), comp_keyword_case_substitute_hook(), echo_substitute_hook(), exec_command_set(), ExecEvalNextValueExpr(), fetch_count_substitute_hook(), float4_accum(), float8_accum(), g_intbig_penalty(), ghstore_penalty(), gtrgm_penalty(), gtsquery_penalty(), gtsvector_penalty(), GUCArrayAdd(), histcontrol_substitute_hook(), histsize_substitute_hook(), ignoreeof_substitute_hook(), InitializeOneGUCOption(), insert_username(), int2_avg_accum(), int2_avg_accum_inv(), int2_sum(), int4_avg_accum(), int4_avg_accum_inv(), int4_sum(), interval_accum(), interval_accum_inv(), jsonb_insert(), jsonb_set(), jsonb_set_lax(), ltree_penalty(), numeric_accum_inv(), pg_atomic_compare_exchange_u32_impl(), pg_atomic_compare_exchange_u64_impl(), pg_atomic_fetch_add_u32_impl(), prompt1_hook(), prompt2_hook(), prompt3_hook(), range_add_value(), set_config_option(), set_extra_field(), set_string_field(), show_context_substitute_hook(), table_scan_sample_next_tuple(), and verbosity_substitute_hook().
#define newval (newval_union.intval) |
#define newval (newval_union.realval) |
#define newval (newval_union.stringval) |
#define newval (newval_union.enumval) |
#define NUM_PG_FILE_SETTINGS_ATTS 7 |
Referenced by show_all_file_settings().
#define NUM_PG_SETTINGS_ATTS 17 |
Definition at line 9875 of file guc.c.
Referenced by show_all_settings().
#define REALTYPE_PRECISION 17 |
Definition at line 129 of file guc.c.
Referenced by estimate_variable_size(), and serialize_variable().
|
static |
Definition at line 10121 of file guc.c.
References AllocateFile(), Assert, config_enum_lookup_by_value(), convert_int_from_base_unit(), convert_real_from_base_unit(), elevel, elog, ereport, errcode_for_file_access(), errmsg(), ERROR, FATAL, find_option(), config_generic::flags, fprintf, free, FreeFile(), GUC_ACTION_SET, guc_malloc(), guc_realloc(), GUC_UNIT, i, INT64_FORMAT, LOG, config_generic::name, num_guc_variables, PGC_BOOL, PGC_ENUM, PGC_INT, PGC_POSTMASTER, PGC_REAL, PGC_S_DEFAULT, PGC_SIGHUP, PGC_STRING, pstrdup(), config_generic::scontext, set_config_option(), set_config_sourcefile(), config_bool::show_hook, config_int::show_hook, config_real::show_hook, config_string::show_hook, config_enum::show_hook, snprintf, config_generic::source, config_generic::sourcefile, config_generic::sourceline, generate_unaccent_rules::str, val, config_bool::variable, config_int::variable, config_real::variable, config_string::variable, config_enum::variable, and config_generic::vartype.
Referenced by GetConfigOptionByName(), GetConfigOptionByNum(), ReportGUCOption(), and ShowAllGUCConfig().
|
static |
Definition at line 5369 of file guc.c.
References guc_malloc(), guc_realloc(), guc_var_compare(), and qsort.
Referenced by add_placeholder_variable(), and define_custom_variable().
|
static |
Definition at line 5446 of file guc.c.
References add_guc_variable(), config_generic::context, CUSTOM_OPTIONS, config_generic::flags, free, config_string::gen, config_generic::group, GUC_CUSTOM_PLACEHOLDER, guc_malloc(), GUC_NO_SHOW_ALL, GUC_NOT_IN_SAMPLE, guc_strdup(), config_generic::name, PGC_STRING, PGC_USERSET, config_generic::short_desc, unconstify, config_string::variable, and config_generic::vartype.
Referenced by find_option().
void AlterSystemSetConfigFile | ( | AlterSystemStmt * | altersysstmt | ) |
Definition at line 8505 of file guc.c.
References AllocateFile(), Assert, BasicOpenFile(), close, config_generic::context, durable_rename(), elog, ereport, errcode(), errcode_for_file_access(), errmsg(), ERROR, ExtractSetVariableArgs(), find_option(), config_generic::flags, free, FreeConfigVariables(), FreeFile(), GUC_DISALLOW_IN_AUTO_FILE, GUC_DISALLOW_IN_FILE, infile(), VariableSetStmt::kind, LOG, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MAXPGPATH, name, VariableSetStmt::name, parse_and_validate_value(), ParseConfigFp(), PG_AUTOCONF_FILENAME, PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, PGC_INTERNAL, PGC_S_FILE, PGC_STRING, replace_auto_config_value(), AlterSystemStmt::setstmt, snprintf, stat, config_var_val::stringval, superuser(), value, VAR_RESET, VAR_RESET_ALL, VAR_SET_DEFAULT, VAR_SET_VALUE, config_generic::vartype, and write_auto_conf_file().
Referenced by standard_ProcessUtility().
|
static |
Definition at line 12164 of file guc.c.
References pgstat_report_appname().
|
static |
|
static |
|
static |
Definition at line 12112 of file guc.c.
References AmStartupProcess, maintenance_io_concurrency, newval, and XLogPrefetchReconfigure().
|
static |
Definition at line 12126 of file guc.c.
References ERROR, free, guc_malloc(), pgstat_stat_directory, pgstat_stat_filename, pgstat_stat_tmpname, and sprintf.
|
static |
Definition at line 12362 of file guc.c.
References RECOVERY_TARGET_IMMEDIATE, RECOVERY_TARGET_UNSET, and recoveryTarget.
|
static |
Definition at line 12530 of file guc.c.
References RECOVERY_TARGET_LSN, RECOVERY_TARGET_UNSET, recoveryTarget, and recoveryTargetLSN.
|
static |
Definition at line 12494 of file guc.c.
References newval, RECOVERY_TARGET_NAME, RECOVERY_TARGET_UNSET, recoveryTarget, and recoveryTargetName.
|
static |
Definition at line 12468 of file guc.c.
References RECOVERY_TARGET_TIME, RECOVERY_TARGET_UNSET, and recoveryTarget.
|
static |
Definition at line 12319 of file guc.c.
References RECOVERY_TARGET_TIMELINE_NUMERIC, recoveryTargetTimeLineGoal, and recoveryTargetTLIRequested.
|
static |
Definition at line 12395 of file guc.c.
References RECOVERY_TARGET_UNSET, RECOVERY_TARGET_XID, recoveryTarget, and recoveryTargetXid.
|
static |
Definition at line 11765 of file guc.c.
References ResetPlanCache(), and SessionReplicationRole.
|
static |
|
static |
|
static |
Definition at line 11965 of file guc.c.
References MyProcPort, and pq_setkeepalivescount().
|
static |
Definition at line 11921 of file guc.c.
References MyProcPort, and pq_setkeepalivesidle().
|
static |
Definition at line 11948 of file guc.c.
References MyProcPort, and pq_setkeepalivesinterval().
|
static |
Definition at line 11982 of file guc.c.
References MyProcPort, and pq_settcpusertimeout().
|
static |
Definition at line 11885 of file guc.c.
References InstallTimeZoneAbbrevs().
|
static |
void AtEOXact_GUC | ( | bool | isCommit, |
int | nestLevel | ||
) |
Definition at line 6235 of file guc.c.
References Assert, config_bool::assign_hook, config_int::assign_hook, config_real::assign_hook, config_string::assign_hook, config_enum::assign_hook, config_var_val::boolval, discard_stack_value(), config_var_val::enumval, config_var_value::extra, config_generic::extra, config_generic::flags, config_bool::gen, config_int::gen, config_real::gen, config_string::gen, config_enum::gen, GUC_LOCAL, GUC_NEEDS_REPORT, GUC_REPORT, GUC_SAVE, GUC_SET, GUC_SET_LOCAL, i, config_var_val::intval, guc_stack::masked, guc_stack::masked_scontext, guc_stack::nest_level, newval, num_guc_variables, pfree(), PGC_BOOL, PGC_ENUM, PGC_INT, PGC_REAL, PGC_S_SESSION, PGC_STRING, guc_stack::prev, guc_stack::prior, config_var_val::realval, guc_stack::scontext, config_generic::scontext, set_extra_field(), set_string_field(), guc_stack::source, config_generic::source, config_generic::stack, guc_stack::state, config_generic::status, config_var_val::stringval, config_var_value::val, config_bool::variable, config_int::variable, config_real::variable, config_string::variable, config_enum::variable, and config_generic::vartype.
Referenced by AbortSubTransaction(), AbortTransaction(), CommitSubTransaction(), CommitTransaction(), DefineIndex(), do_analyze_rel(), ExecCreateTableAs(), ExecRefreshMatView(), execute_extension_script(), fmgr_security_definer(), index_build(), PrepareTransaction(), ProcedureCreate(), reset_transmission_modes(), restoreLocalGucs(), RI_Initial_Check(), RI_PartitionRemove_Check(), vacuum_rel(), and validate_index().
void AtStart_GUC | ( | void | ) |
void BeginReportingGUCOptions | ( | void | ) |
Definition at line 6520 of file guc.c.
References DestRemote, config_generic::flags, GUC_REPORT, i, num_guc_variables, RecoveryInProgress(), ReportGUCOption(), and whereToSendOutput.
Referenced by PostgresMain().
void build_guc_variables | ( | void | ) |
Definition at line 5282 of file guc.c.
References FATAL, free, config_bool::gen, config_int::gen, config_real::gen, config_string::gen, config_enum::gen, guc_malloc(), guc_var_compare(), i, config_generic::name, PGC_BOOL, PGC_ENUM, PGC_INT, PGC_REAL, PGC_STRING, qsort, and config_generic::vartype.
Referenced by GucInfoMain(), and InitializeGUCOptions().
|
static |
Definition at line 11410 of file guc.c.
References config_bool::check_hook, ereport, errcode(), errdetail_internal(), errhint(), errmsg(), errmsg_internal(), FlushErrorState(), config_bool::gen, GUC_check_errcode_value, GUC_check_errdetail_string, GUC_check_errhint_string, GUC_check_errmsg_string, and config_generic::name.
Referenced by InitializeOneGUCOption(), parse_and_validate_value(), and set_config_option().
|
static |
Definition at line 11562 of file guc.c.
References config_enum::check_hook, config_enum_lookup_by_value(), ereport, errcode(), errdetail_internal(), errhint(), errmsg(), errmsg_internal(), FlushErrorState(), config_enum::gen, GUC_check_errcode_value, GUC_check_errdetail_string, GUC_check_errhint_string, GUC_check_errmsg_string, and config_generic::name.
Referenced by InitializeOneGUCOption(), parse_and_validate_value(), and set_config_option().
|
static |
Definition at line 11444 of file guc.c.
References config_int::check_hook, ereport, errcode(), errdetail_internal(), errhint(), errmsg(), errmsg_internal(), FlushErrorState(), config_int::gen, GUC_check_errcode_value, GUC_check_errdetail_string, GUC_check_errhint_string, GUC_check_errmsg_string, and config_generic::name.
Referenced by InitializeOneGUCOption(), parse_and_validate_value(), and set_config_option().
|
static |
Definition at line 11478 of file guc.c.
References config_real::check_hook, ereport, errcode(), errdetail_internal(), errhint(), errmsg(), errmsg_internal(), FlushErrorState(), config_real::gen, GUC_check_errcode_value, GUC_check_errdetail_string, GUC_check_errhint_string, GUC_check_errmsg_string, and config_generic::name.
Referenced by InitializeOneGUCOption(), parse_and_validate_value(), and set_config_option().
|
static |
Definition at line 11512 of file guc.c.
References config_string::check_hook, ereport, errcode(), errdetail_internal(), errhint(), errmsg(), errmsg_internal(), FlushErrorState(), free, config_string::gen, GUC_check_errcode_value, GUC_check_errdetail_string, GUC_check_errhint_string, GUC_check_errmsg_string, config_generic::name, PG_CATCH, PG_END_TRY, PG_RE_THROW, and PG_TRY.
Referenced by InitializeOneGUCOption(), parse_and_validate_value(), and set_config_option().
|
static |
Definition at line 10463 of file guc.c.
References config_generic::context, config_generic::name, PGC_INTERNAL, PGC_POSTMASTER, PGC_S_DEFAULT, and config_generic::source.
Referenced by estimate_variable_size(), RestoreGUCState(), and serialize_variable().
Definition at line 12008 of file guc.c.
References MAX_BACKENDS, max_wal_senders, max_worker_processes, and MaxConnections.
Definition at line 12227 of file guc.c.
References ERROR, GUC_check_errdetail, guc_malloc(), and i.
|
static |
Definition at line 12098 of file guc.c.
References GUC_check_errdetail.
Definition at line 12556 of file guc.c.
References GUC_check_errcode(), and GUC_check_errmsg.
Definition at line 12058 of file guc.c.
References GUC_check_errdetail.
Definition at line 11682 of file guc.c.
References ERROR, GUC_check_errdetail, guc_malloc(), lfirst, list_free(), LOG_DESTINATION_CSVLOG, LOG_DESTINATION_EVENTLOG, LOG_DESTINATION_STDERR, LOG_DESTINATION_SYSLOG, pfree(), pg_strcasecmp(), pstrdup(), and SplitIdentifierString().
|
static |
Definition at line 12071 of file guc.c.
References GUC_check_errdetail.
Definition at line 12017 of file guc.c.
References autovacuum_max_workers, MAX_BACKENDS, max_worker_processes, and MaxConnections.
Definition at line 12049 of file guc.c.
References autovacuum_max_workers, MAX_BACKENDS, max_wal_senders, and MaxConnections.
Definition at line 11999 of file guc.c.
References autovacuum_max_workers, MAX_BACKENDS, max_wal_senders, and max_worker_processes.
Definition at line 12546 of file guc.c.
References ReplicationSlotValidateName(), and WARNING.
Definition at line 12510 of file guc.c.
References ERROR, guc_malloc(), and pg_lsn_in_internal().
Definition at line 12481 of file guc.c.
References GUC_check_errdetail, and MAXFNAMELEN.
Definition at line 12418 of file guc.c.
References DecodeDateTime(), DTK_DATE, GUC_check_errdetail, MAXDATEFIELDS, MAXDATELEN, newval, ParseDateTime(), generate_unaccent_rules::str, tm, and tm2timestamp().
|
static |
Definition at line 12289 of file guc.c.
References ERROR, GUC_check_errdetail, guc_malloc(), RECOVERY_TARGET_TIMELINE_CONTROLFILE, RECOVERY_TARGET_TIMELINE_LATEST, and RECOVERY_TARGET_TIMELINE_NUMERIC.
Definition at line 12375 of file guc.c.
References ERROR, guc_malloc(), and pg_strtouint64().
Definition at line 11776 of file guc.c.
References GUC_check_errdetail, NLocBuffer, and PGC_S_TEST.
Definition at line 11855 of file guc.c.
References Assert, load_tzoffsets(), and PGC_S_DEFAULT.
|
static |
Definition at line 11602 of file guc.c.
References ERROR, GUC_check_errdetail, guc_malloc(), lfirst, list_free(), MemSet, pfree(), pg_strcasecmp(), pstrdup(), RmgrData::rm_mask, RM_MAX_ID, RmgrTable, and SplitIdentifierString().
|
static |
Definition at line 7053 of file guc.c.
References appendBinaryStringInfo(), appendStringInfoString(), StringInfoData::data, config_enum_entry::hidden, initStringInfo(), StringInfoData::len, config_enum_entry::name, and config_enum::options.
Referenced by GetConfigOptionByNum(), and parse_and_validate_value().
bool config_enum_lookup_by_name | ( | struct config_enum * | record, |
const char * | value, | ||
int * | retval | ||
) |
Definition at line 7027 of file guc.c.
References config_enum_entry::name, config_enum::options, pg_strcasecmp(), and config_enum_entry::val.
Referenced by parse_and_validate_value().
const char* config_enum_lookup_by_value | ( | struct config_enum * | record, |
int | val | ||
) |
Definition at line 7004 of file guc.c.
References elog, ERROR, config_enum::gen, config_generic::name, config_enum_entry::name, config_enum::options, and config_enum_entry::val.
Referenced by _ShowOption(), call_enum_check_hook(), estimate_variable_size(), GetConfigOption(), GetConfigOptionByNum(), GetConfigOptionResetString(), printMixedStruct(), and serialize_variable().
|
static |
Definition at line 6710 of file guc.c.
References Assert, GUC_UNIT_MEMORY, i, memory_unit_conversion_table, time_unit_conversion_table, and unit_conversion::unit.
Referenced by _ShowOption().
|
static |
Definition at line 6752 of file guc.c.
References Assert, GUC_UNIT_MEMORY, i, memory_unit_conversion_table, unit_conversion::multiplier, time_unit_conversion_table, and unit_conversion::unit.
Referenced by _ShowOption().
|
static |
Definition at line 6652 of file guc.c.
References GUC_UNIT_MEMORY, i, MAX_UNIT_LEN, memory_unit_conversion_table, unit_conversion::multiplier, time_unit_conversion_table, and unit_conversion::unit.
Referenced by parse_int(), and parse_real().
|
static |
Definition at line 8987 of file guc.c.
References add_guc_variable(), Assert, ereport, errcode(), errmsg(), ERROR, free, config_string::gen, GUC_ACTION_SET, GUC_CUSTOM_PLACEHOLDER, guc_var_compare(), InitializeOneGUCOption(), config_generic::name, name, PGC_STRING, reapply_stacked_values(), config_generic::reset_scontext, config_generic::reset_source, config_string::reset_val, config_generic::scontext, set_config_option(), set_config_sourcefile(), set_string_field(), config_generic::source, config_generic::sourcefile, config_generic::sourceline, config_generic::stack, config_string::variable, and WARNING.
Referenced by DefineCustomBoolVariable(), DefineCustomEnumVariable(), DefineCustomIntVariable(), DefineCustomRealVariable(), and DefineCustomStringVariable().
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 | ||
) |
Definition at line 9168 of file guc.c.
References config_bool::assign_hook, config_bool::boot_val, config_bool::check_hook, define_custom_variable(), config_bool::gen, init_custom_variable(), PGC_BOOL, config_bool::reset_val, config_bool::show_hook, and config_bool::variable.
Referenced by _PG_init().
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 | ||
) |
Definition at line 9279 of file guc.c.
References config_enum::assign_hook, config_enum::boot_val, config_enum::check_hook, define_custom_variable(), config_enum::gen, init_custom_variable(), options, config_enum::options, PGC_ENUM, config_enum::reset_val, config_enum::show_hook, and config_enum::variable.
Referenced by _PG_init().
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 | ||
) |
Definition at line 9194 of file guc.c.
References config_int::assign_hook, config_int::boot_val, config_int::check_hook, define_custom_variable(), config_int::gen, init_custom_variable(), config_int::max, config_int::min, PGC_INT, config_int::reset_val, config_int::show_hook, and config_int::variable.
Referenced by _PG_init().
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 | ||
) |
Definition at line 9224 of file guc.c.
References config_real::assign_hook, config_real::boot_val, config_real::check_hook, define_custom_variable(), config_real::gen, init_custom_variable(), config_real::max, config_real::min, PGC_REAL, config_real::reset_val, config_real::show_hook, and config_real::variable.
Referenced by _PG_init().
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 | ||
) |
Definition at line 9254 of file guc.c.
References config_string::assign_hook, config_string::boot_val, config_string::check_hook, define_custom_variable(), config_string::gen, init_custom_variable(), PGC_STRING, config_string::show_hook, and config_string::variable.
Referenced by _PG_init().
|
static |
Definition at line 5246 of file guc.c.
References config_var_value::extra, PGC_BOOL, PGC_ENUM, PGC_INT, PGC_REAL, PGC_STRING, set_extra_field(), set_string_field(), config_var_val::stringval, config_var_value::val, and config_generic::vartype.
Referenced by AtEOXact_GUC(), and push_old_value().
|
static |
|
static |
void EmitWarningsOnPlaceholders | ( | const char * | className | ) |
Definition at line 9307 of file guc.c.
References ereport, errcode(), errmsg(), config_generic::flags, GUC_CUSTOM_PLACEHOLDER, GUC_QUALIFIER_SEPARATOR, i, config_generic::name, num_guc_variables, and WARNING.
Referenced by _PG_init().
|
static |
Definition at line 10503 of file guc.c.
References Abs, add_size(), can_skip_gucvar(), config_enum_lookup_by_value(), config_generic::name, PGC_BOOL, PGC_ENUM, PGC_INT, PGC_REAL, PGC_STRING, REALTYPE_PRECISION, config_generic::scontext, config_generic::source, config_generic::sourcefile, config_generic::sourceline, config_int::variable, config_string::variable, config_enum::variable, and config_generic::vartype.
Referenced by EstimateGUCStateSpace().
Size EstimateGUCStateSpace | ( | void | ) |
Definition at line 10602 of file guc.c.
References add_size(), estimate_variable_size(), i, and num_guc_variables.
Referenced by InitializeParallelDSM().
void ExecSetVariableStmt | ( | VariableSetStmt * | stmt, |
bool | isTopLevel | ||
) |
Definition at line 8715 of file guc.c.
References generate_unaccent_rules::action, DefElem::arg, VariableSetStmt::args, Assert, DefElem::defname, elog, ereport, errcode(), errmsg(), ERROR, ExtractSetVariableArgs(), GUC_ACTION_LOCAL, GUC_ACTION_SET, ImportSnapshot(), VariableSetStmt::is_local, IsInParallelMode(), VariableSetStmt::kind, lfirst, linitial_node, list_make1, VariableSetStmt::name, nodeTag, PGC_S_SESSION, PGC_SUSET, PGC_USERSET, ResetAllOptions(), set_config_option(), SetPGVariable(), strVal, superuser(), T_String, A_Const::val, VAR_RESET, VAR_RESET_ALL, VAR_SET_CURRENT, VAR_SET_DEFAULT, VAR_SET_MULTI, VAR_SET_VALUE, and WarnNoTransactionBlock().
Referenced by standard_ProcessUtility().