PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <ctype.h>
#include <float.h>
#include <math.h>
#include <limits.h>
#include <unistd.h>
#include <sys/stat.h>
#include "access/commit_ts.h"
#include "access/gin.h"
#include "access/rmgr.h"
#include "access/transam.h"
#include "access/twophase.h"
#include "access/xact.h"
#include "access/xlog_internal.h"
#include "catalog/namespace.h"
#include "catalog/pg_authid.h"
#include "commands/async.h"
#include "commands/prepare.h"
#include "commands/user.h"
#include "commands/vacuum.h"
#include "commands/variable.h"
#include "commands/trigger.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/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/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/standby.h"
#include "storage/fd.h"
#include "storage/large_object.h"
#include "storage/pg_shmem.h"
#include "storage/proc.h"
#include "storage/predicate.h"
#include "tcop/tcopprot.h"
#include "tsearch/ts_cache.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/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/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 const char * | show_tcp_keepalives_idle (void) |
static const char * | show_tcp_keepalives_interval (void) |
static const char * | show_tcp_keepalives_count (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_autovacuum_work_mem (int *newval, void **extra, GucSource source) |
static bool | check_effective_io_concurrency (int *newval, void **extra, GucSource source) |
static void | assign_effective_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 ConfigVariable * | ProcessConfigFileInternal (GucContext context, bool applySettings, int elevel) |
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 struct config_generic * | add_placeholder_variable (const char *name, int elevel) |
static struct config_generic * | find_option (const char *name, bool create_placeholders, 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) |
static bool | convert_to_base_unit (int64 value, const char *unit, int base_unit, int64 *base_value) |
static void | convert_from_base_unit (int64 base_value, int base_unit, int64 *value, const char **unit) |
bool | parse_int (const char *value, int *result, int flags, const char **hintmsg) |
bool | parse_real (const char *value, double *result) |
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_superuser) |
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) |
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) |
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) |
#define CONFIG_FILENAME "postgresql.conf" |
Definition at line 98 of file guc.c.
Referenced by SelectConfigFiles().
#define HBA_FILENAME "pg_hba.conf" |
Definition at line 99 of file guc.c.
Referenced by SelectConfigFiles().
#define IDENT_FILENAME "pg_ident.conf" |
Definition at line 100 of file guc.c.
Referenced by SelectConfigFiles().
Definition at line 701 of file guc.c.
Referenced by parse_int().
#define newval (newval_union.boolval) |
Referenced by _ltree_penalty(), assign_checkpoint_completion_target(), assign_max_wal_size(), AtEOXact_GUC(), ATExecAddColumn(), ATPrepAlterColumnType(), bool_substitute_hook(), brin_inclusion_add_value(), brin_minmax_add_value(), check_foreign_key(), check_timezone(), comp_keyword_case_substitute_hook(), echo_substitute_hook(), exec_command_set(), exec_command_setenv(), 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_accum(), int2_accum_inv(), int2_avg_accum(), int2_avg_accum_inv(), int2_sum(), int4_accum(), int4_accum_inv(), int4_avg_accum(), int4_avg_accum_inv(), int4_sum(), int8_accum(), int8_accum_inv(), int8_avg_accum(), int8_avg_accum_inv(), int8_sum(), interval_accum(), interval_accum_inv(), jsonb_insert(), jsonb_set(), ltree_penalty(), numeric_accum_inv(), pg_atomic_compare_exchange_u32_impl(), pg_atomic_compare_exchange_u64_impl(), prompt1_hook(), prompt2_hook(), prompt3_hook(), set_config_option(), set_extra_field(), set_string_field(), show_context_substitute_hook(), update_relispartition(), 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 8641 of file guc.c.
Referenced by show_all_settings().
#define REALTYPE_PRECISION 17 |
Definition at line 111 of file guc.c.
Referenced by estimate_variable_size(), and serialize_variable().
|
static |
Definition at line 8888 of file guc.c.
References AllocateFile(), Assert, buffer, config_enum_lookup_by_value(), convert_from_base_unit(), elevel, elog, ereport, errcode_for_file_access(), errmsg(), ERROR, FATAL, find_option(), config_generic::flags, free, FreeFile(), GUC_ACTION_SET, guc_malloc(), guc_realloc(), GUC_UNIT, i, INT64_FORMAT, IsInitProcessingMode, 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 4506 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 4544 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, config_string::variable, and config_generic::vartype.
Referenced by find_option().
void AlterSystemSetConfigFile | ( | AlterSystemStmt * | altersysstmt | ) |
Definition at line 7314 of file guc.c.
References AllocateFile(), 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 |
|
static |
|
static |
|
static |
Definition at line 10667 of file guc.c.
References ERROR, free, guc_malloc(), pgstat_stat_directory, pgstat_stat_filename, and pgstat_stat_tmpname.
|
static |
Definition at line 10373 of file guc.c.
References ResetPlanCache(), and SessionReplicationRole.
|
static |
|
static |
|
static |
Definition at line 10572 of file guc.c.
References MyProcPort, and pq_setkeepalivescount().
|
static |
Definition at line 10528 of file guc.c.
References MyProcPort, and pq_setkeepalivesidle().
|
static |
Definition at line 10555 of file guc.c.
References MyProcPort, and pq_setkeepalivesinterval().
|
static |
Definition at line 10492 of file guc.c.
References InstallTimeZoneAbbrevs().
|
static |
void AtEOXact_GUC | ( | bool | isCommit, |
int | nestLevel | ||
) |
Definition at line 5299 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_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, ReportGUCOption(), 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_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(), do_analyze_rel(), ExecCreateTableAs(), ExecRefreshMatView(), execute_extension_script(), fmgr_security_definer(), index_build(), PrepareTransaction(), ProcedureCreate(), reset_transmission_modes(), restoreLocalGucs(), RI_Initial_Check(), vacuum_rel(), and validate_index().
void AtStart_GUC | ( | void | ) |
void BeginReportingGUCOptions | ( | void | ) |
Definition at line 5580 of file guc.c.
References DestRemote, config_generic::flags, FrontendProtocol, GUC_REPORT, i, num_guc_variables, PG_PROTOCOL_MAJOR, ReportGUCOption(), and whereToSendOutput.
Referenced by PostgresMain().
void build_guc_variables | ( | void | ) |
Definition at line 4419 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 10034 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 10170 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 10068 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 10102 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 10136 of file guc.c.
References config_string::check_hook, ereport, errcode(), errdetail_internal(), errhint(), errmsg(), errmsg_internal(), FlushErrorState(), config_string::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 9240 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 10598 of file guc.c.
References MAX_BACKENDS, max_worker_processes, and MaxConnections.
Definition at line 10637 of file guc.c.
References ComputeIoConcurrency(), ERROR, guc_malloc(), and rint().
Definition at line 10290 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().
Definition at line 10629 of file guc.c.
References autovacuum_max_workers, MAX_BACKENDS, and MaxConnections.
Definition at line 10589 of file guc.c.
References autovacuum_max_workers, MAX_BACKENDS, and max_worker_processes.
Definition at line 10384 of file guc.c.
References GUC_check_errdetail, and NLocBuffer.
Definition at line 10462 of file guc.c.
References Assert, load_tzoffsets(), and PGC_S_DEFAULT.
|
static |
Definition at line 10210 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 5886 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 5860 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 5837 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 5665 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 5632 of file guc.c.
References GUC_UNIT_MEMORY, i, memory_unit_conversion_table, unit_conversion::multiplier, time_unit_conversion_table, and unit_conversion::unit.
Referenced by parse_int().
|
static |
Definition at line 7800 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 7981 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 8092 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 8007 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 8037 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 8067 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 4383 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 |
Definition at line 9375 of file guc.c.
References elog, ERROR, and vsnprintf().
Referenced by serialize_variable().
|
static |
void EmitWarningsOnPlaceholders | ( | const char * | className | ) |
Definition at line 8120 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 9254 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 9352 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 7528 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().
|
static |
Definition at line 4284 of file guc.c.
References config_var_value::extra, config_generic::extra, guc_stack::masked, PGC_BOOL, PGC_ENUM, PGC_INT, PGC_REAL, PGC_STRING, guc_stack::prev, guc_stack::prior, config_generic::stack, and config_generic::vartype.
Referenced by set_config_option(), and set_extra_field().
char* ExtractSetVariableArgs | ( | VariableSetStmt * | stmt | ) |
Definition at line 7652 of file guc.c.
References VariableSetStmt::args, flatten_set_variable_args(), GetConfigOptionByName(), VariableSetStmt::kind, VariableSetStmt::name, VAR_SET_CURRENT, and VAR_SET_VALUE.
Referenced by AlterSetting(), AlterSystemSetConfigFile(), ExecSetVariableStmt(), and update_proconfig_value().
|
static |
Definition at line 4592 of file guc.c.
References add_placeholder_variable(), Assert, guc_name_compare(), GUC_QUALIFIER_SEPARATOR, guc_var_compare(), i, and name.
Referenced by _ShowOption(), AlterSystemSetConfigFile(), flatten_set_variable_args(), GetConfigOption(), GetConfigOptionByName(), GetConfigOptionFlags(), GetConfigOptionResetString(), GUCArrayAdd(), GUCArrayDelete(), set_config_option(), set_config_sourcefile(), and validate_option_array_item().
|
static |
Definition at line 7051 of file guc.c.
References appendStringInfo(), appendStringInfoString(), arg, TypeCast::arg, Assert, buf, CStringGetDatum, StringInfoData::data, DatumGetCString, DirectFunctionCall1, DirectFunctionCall3, elog, ereport, errcode(), errmsg(), ERROR, find_option(), config_generic::flags, GUC_LIST_INPUT, GUC_LIST_QUOTE, initStringInfo(), Int32GetDatum, interval_in(), interval_out(), intVal, InvalidOid, IsA, lfirst, list_head(), list_length(), NIL, nodeTag, ObjectIdGetDatum, quote_identifier(), strVal, T_Float, T_Integer, T_String, TypeCast::typeName, typenameTypeIdAndMod(), A_Const::val, val, and WARNING.
Referenced by ExtractSetVariableArgs(), and SetPGVariable().
struct config_generic** get_guc_variables | ( | void | ) |
Definition at line 6916 of file guc.c.
References buffer, config_enum_lookup_by_value(), ereport, errcode(), errmsg(), ERROR, find_option(), config_generic::flags, GetUserId(), GUC_SUPERUSER_ONLY, is_member_of_role(), PGC_BOOL, PGC_ENUM, PGC_INT, PGC_REAL, PGC_STRING, snprintf(), and config_generic::vartype.
Referenced by applyRemoteGucs(), and PostmasterMain().
char* GetConfigOptionByName | ( | const char * | name, |
const char ** | varname, | ||
bool | missing_ok | ||
) |
Definition at line 8287 of file guc.c.
References _ShowOption(), ereport, errcode(), errmsg(), ERROR, find_option(), config_generic::flags, GetUserId(), GUC_SUPERUSER_ONLY, is_member_of_role(), and config_generic::name.
Referenced by ExtractSetVariableArgs(), GetPGVariableResultDesc(), set_config_by_name(), show_config_by_name(), show_config_by_name_missing_ok(), and ShowGUCConfigOption().
void GetConfigOptionByNum | ( | int | varnum, |
const char ** | values, | ||
bool * | noshow | ||
) |
Definition at line 8324 of file guc.c.
References _ShowOption(), Assert, config_bool::boot_val, config_int::boot_val, config_real::boot_val, config_string::boot_val, config_enum::boot_val, buffer, config_enum_get_options(), config_enum_lookup_by_value(), config_generic::context, elog, ERROR, config_generic::flags, GetUserId(), config_generic::group, GUC_NO_SHOW_ALL, GUC_PENDING_RESTART, GUC_SUPERUSER_ONLY, GUC_UNIT_BLOCKS, GUC_UNIT_BYTE, GUC_UNIT_KB, GUC_UNIT_MB, GUC_UNIT_MEMORY, GUC_UNIT_MIN, GUC_UNIT_MS, GUC_UNIT_S, GUC_UNIT_TIME, GUC_UNIT_XBLOCKS, is_member_of_role(), config_generic::long_desc, config_int::max, config_real::max, config_int::min, config_real::min, config_generic::name, PGC_BOOL, PGC_ENUM, PGC_INT, PGC_REAL, PGC_S_FILE, PGC_STRING, pstrdup(), config_bool::reset_val, config_int::reset_val, config_real::reset_val, config_string::reset_val, config_enum::reset_val, config_generic::short_desc, snprintf(), config_generic::source, config_generic::sourcefile, config_generic::sourceline, config_generic::status, superuser(), and config_generic::vartype.
Referenced by show_all_settings().