Reorganize GUC structs
This patch series does some reorganizing of the GUC table structs
(config_generic, config_bool, etc.) to modernize and simplify things. I
suspect that some changes like these would have been desirable as the
GUC code has evolved over time, but were avoided because of the burden
of having to adjust all the static GUC tables at the same time. Since
these are now generated, this is no longer a problem.
The main change is that instead of having five separate structs, one for
each type, with the generic part contained in each of them, flip it
around and have one common struct, with the type-specific part has a
subfield.
The very original GUC design had type-specific structs and
type-specific lists, and the membership in one of the lists defined
the type. But now the structs themselves know the type (from the
.vartype field), and they are all loaded into a common hash table at
run time, this original separation no longer makes sense. It creates
a bunch of inconsistencies in the code about whether the type-specific
or the generic struct is the primary struct, and a lot of casting in
between, which makes certain assumptions about the struct layouts.
After the change, all these casts are gone and all the data is
accessed via normal field references. Also, various code is
simplified because only one kind of struct needs to be processed.
Additionally, I have sorted guc_parameters.dat alphabetically by name,
and have added code to enforce the sort order going forward. (Note: The
order is actually checked after lower-casing, to handle the likes of
"DateStyle".)
The order in these lists was previously pretty random and had grown
organically over time. This made it unnecessarily cumbersome to
maintain these lists, as there was no clear guidelines about where to
put new entries. Also, after the merger of the type-specific GUC
structs, the list still reflected the previous type-specific
super-order.
By enforcing alphabetical order, the place for new entries becomes
clear, and often related entries will be listed close together.
The patches in the series are arranged so that they can be considered
and applied incrementally.
Attachments:
v1-0001-Modernize-some-for-loops.patchtext/plain; charset=UTF-8; name=v1-0001-Modernize-some-for-loops.patchDownload
From 46ed0194cfe80ac2ca06ddc17785d83626f2116d Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 3 Oct 2025 08:27:18 +0200
Subject: [PATCH v1 1/8] Modernize some for loops
in guc-related source files, in anticipation of some further
restructuring.
---
src/backend/utils/misc/guc.c | 135 ++++++++++-----------------
src/backend/utils/misc/guc_funcs.c | 3 +-
src/backend/utils/misc/help_config.c | 5 +-
3 files changed, 53 insertions(+), 90 deletions(-)
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 46fdefebe35..f22189471dc 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -285,8 +285,7 @@ ProcessConfigFileInternal(GucContext context, bool applySettings, int elevel)
bool error = false;
bool applying = false;
const char *ConfFileWithError;
- ConfigVariable *item,
- *head,
+ ConfigVariable *head,
*tail;
HASH_SEQ_STATUS status;
GUCHashEntry *hentry;
@@ -337,7 +336,7 @@ ProcessConfigFileInternal(GucContext context, bool applySettings, int elevel)
/*
* Prune all items except the last "data_directory" from the list.
*/
- for (item = head; item; item = item->next)
+ for (ConfigVariable *item = head; item; item = item->next)
{
if (!item->ignore &&
strcmp(item->name, "data_directory") == 0)
@@ -385,7 +384,7 @@ ProcessConfigFileInternal(GucContext context, bool applySettings, int elevel)
* variable mentioned in the file; and we detect duplicate entries in the
* file and mark the earlier occurrences as ignorable.
*/
- for (item = head; item; item = item->next)
+ for (ConfigVariable *item = head; item; item = item->next)
{
struct config_generic *record;
@@ -409,9 +408,7 @@ ProcessConfigFileInternal(GucContext context, bool applySettings, int elevel)
* avoid the O(N^2) behavior here with some additional state,
* but it seems unlikely to be worth the trouble.
*/
- ConfigVariable *pitem;
-
- for (pitem = head; pitem != item; pitem = pitem->next)
+ for (ConfigVariable *pitem = head; pitem != item; pitem = pitem->next)
{
if (!pitem->ignore &&
strcmp(pitem->name, item->name) == 0)
@@ -455,7 +452,6 @@ ProcessConfigFileInternal(GucContext context, bool applySettings, int elevel)
while ((hentry = (GUCHashEntry *) hash_seq_search(&status)) != NULL)
{
struct config_generic *gconf = hentry->gucvar;
- GucStack *stack;
if (gconf->reset_source != PGC_S_FILE ||
(gconf->status & GUC_IS_IN_FILE))
@@ -488,7 +484,7 @@ ProcessConfigFileInternal(GucContext context, bool applySettings, int elevel)
gconf->reset_source = PGC_S_DEFAULT;
if (gconf->source == PGC_S_FILE)
set_guc_source(gconf, PGC_S_DEFAULT);
- for (stack = gconf->stack; stack; stack = stack->prev)
+ for (GucStack *stack = gconf->stack; stack; stack = stack->prev)
{
if (stack->source == PGC_S_FILE)
stack->source = PGC_S_DEFAULT;
@@ -532,7 +528,7 @@ ProcessConfigFileInternal(GucContext context, bool applySettings, int elevel)
/*
* Now apply the values from the config file.
*/
- for (item = head; item; item = item->next)
+ for (ConfigVariable *item = head; item; item = item->next)
{
char *pre_value = NULL;
int scres;
@@ -708,13 +704,11 @@ guc_free(void *ptr)
static bool
string_field_used(struct config_string *conf, char *strval)
{
- GucStack *stack;
-
if (strval == *(conf->variable) ||
strval == conf->reset_val ||
strval == conf->boot_val)
return true;
- for (stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
{
if (strval == stack->prior.val.stringval ||
strval == stack->masked.val.stringval)
@@ -747,8 +741,6 @@ set_string_field(struct config_string *conf, char **field, char *newval)
static bool
extra_field_used(struct config_generic *gconf, void *extra)
{
- GucStack *stack;
-
if (extra == gconf->extra)
return true;
switch (gconf->vartype)
@@ -774,7 +766,7 @@ extra_field_used(struct config_generic *gconf, void *extra)
return true;
break;
}
- for (stack = gconf->stack; stack; stack = stack->prev)
+ for (GucStack *stack = gconf->stack; stack; stack = stack->prev)
{
if (extra == stack->prior.extra ||
extra == stack->masked.extra)
@@ -908,7 +900,6 @@ build_guc_variables(void)
HASHCTL hash_ctl;
GUCHashEntry *hentry;
bool found;
- int i;
/*
* Create the memory context that will hold all GUC-related data.
@@ -921,7 +912,7 @@ build_guc_variables(void)
/*
* Count all the built-in variables, and set their vartypes correctly.
*/
- for (i = 0; ConfigureNamesBool[i].gen.name; i++)
+ for (int i = 0; ConfigureNamesBool[i].gen.name; i++)
{
struct config_bool *conf = &ConfigureNamesBool[i];
@@ -930,7 +921,7 @@ build_guc_variables(void)
num_vars++;
}
- for (i = 0; ConfigureNamesInt[i].gen.name; i++)
+ for (int i = 0; ConfigureNamesInt[i].gen.name; i++)
{
struct config_int *conf = &ConfigureNamesInt[i];
@@ -938,7 +929,7 @@ build_guc_variables(void)
num_vars++;
}
- for (i = 0; ConfigureNamesReal[i].gen.name; i++)
+ for (int i = 0; ConfigureNamesReal[i].gen.name; i++)
{
struct config_real *conf = &ConfigureNamesReal[i];
@@ -946,7 +937,7 @@ build_guc_variables(void)
num_vars++;
}
- for (i = 0; ConfigureNamesString[i].gen.name; i++)
+ for (int i = 0; ConfigureNamesString[i].gen.name; i++)
{
struct config_string *conf = &ConfigureNamesString[i];
@@ -954,7 +945,7 @@ build_guc_variables(void)
num_vars++;
}
- for (i = 0; ConfigureNamesEnum[i].gen.name; i++)
+ for (int i = 0; ConfigureNamesEnum[i].gen.name; i++)
{
struct config_enum *conf = &ConfigureNamesEnum[i];
@@ -977,7 +968,7 @@ build_guc_variables(void)
&hash_ctl,
HASH_ELEM | HASH_FUNCTION | HASH_COMPARE | HASH_CONTEXT);
- for (i = 0; ConfigureNamesBool[i].gen.name; i++)
+ for (int i = 0; ConfigureNamesBool[i].gen.name; i++)
{
struct config_generic *gucvar = &ConfigureNamesBool[i].gen;
@@ -989,7 +980,7 @@ build_guc_variables(void)
hentry->gucvar = gucvar;
}
- for (i = 0; ConfigureNamesInt[i].gen.name; i++)
+ for (int i = 0; ConfigureNamesInt[i].gen.name; i++)
{
struct config_generic *gucvar = &ConfigureNamesInt[i].gen;
@@ -1001,7 +992,7 @@ build_guc_variables(void)
hentry->gucvar = gucvar;
}
- for (i = 0; ConfigureNamesReal[i].gen.name; i++)
+ for (int i = 0; ConfigureNamesReal[i].gen.name; i++)
{
struct config_generic *gucvar = &ConfigureNamesReal[i].gen;
@@ -1013,7 +1004,7 @@ build_guc_variables(void)
hentry->gucvar = gucvar;
}
- for (i = 0; ConfigureNamesString[i].gen.name; i++)
+ for (int i = 0; ConfigureNamesString[i].gen.name; i++)
{
struct config_generic *gucvar = &ConfigureNamesString[i].gen;
@@ -1025,7 +1016,7 @@ build_guc_variables(void)
hentry->gucvar = gucvar;
}
- for (i = 0; ConfigureNamesEnum[i].gen.name; i++)
+ for (int i = 0; ConfigureNamesEnum[i].gen.name; i++)
{
struct config_generic *gucvar = &ConfigureNamesEnum[i].gen;
@@ -1237,7 +1228,6 @@ find_option(const char *name, bool create_placeholders, bool skip_errors,
int elevel)
{
GUCHashEntry *hentry;
- int i;
Assert(name);
@@ -1254,7 +1244,7 @@ find_option(const char *name, bool create_placeholders, bool skip_errors,
* set of supported old names is short enough that a brute-force search is
* the best way.
*/
- for (i = 0; map_old_guc_names[i] != NULL; i += 2)
+ for (int i = 0; map_old_guc_names[i] != NULL; i += 2)
{
if (guc_name_compare(name, map_old_guc_names[i]) == 0)
return find_option(map_old_guc_names[i + 1], false,
@@ -2679,7 +2669,6 @@ convert_to_base_unit(double value, const char *unit,
char unitstr[MAX_UNIT_LEN + 1];
int unitlen;
const unit_conversion *table;
- int i;
/* extract unit string to compare to table entries */
unitlen = 0;
@@ -2699,7 +2688,7 @@ convert_to_base_unit(double value, const char *unit,
else
table = time_unit_conversion_table;
- for (i = 0; *table[i].unit; i++)
+ for (int i = 0; *table[i].unit; i++)
{
if (base_unit == table[i].base_unit &&
strcmp(unitstr, table[i].unit) == 0)
@@ -2735,7 +2724,6 @@ convert_int_from_base_unit(int64 base_value, int base_unit,
int64 *value, const char **unit)
{
const unit_conversion *table;
- int i;
*unit = NULL;
@@ -2744,7 +2732,7 @@ convert_int_from_base_unit(int64 base_value, int base_unit,
else
table = time_unit_conversion_table;
- for (i = 0; *table[i].unit; i++)
+ for (int i = 0; *table[i].unit; i++)
{
if (base_unit == table[i].base_unit)
{
@@ -2777,7 +2765,6 @@ convert_real_from_base_unit(double base_value, int base_unit,
double *value, const char **unit)
{
const unit_conversion *table;
- int i;
*unit = NULL;
@@ -2786,7 +2773,7 @@ convert_real_from_base_unit(double base_value, int base_unit,
else
table = time_unit_conversion_table;
- for (i = 0; *table[i].unit; i++)
+ for (int i = 0; *table[i].unit; i++)
{
if (base_unit == table[i].base_unit)
{
@@ -3027,9 +3014,7 @@ 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)
{
- const struct config_enum_entry *entry;
-
- for (entry = record->options; entry && entry->name; entry++)
+ for (const struct config_enum_entry *entry = record->options; entry && entry->name; entry++)
{
if (entry->val == val)
return entry->name;
@@ -3051,9 +3036,7 @@ bool
config_enum_lookup_by_name(struct config_enum *record, const char *value,
int *retval)
{
- const struct config_enum_entry *entry;
-
- for (entry = record->options; entry && entry->name; entry++)
+ for (const struct config_enum_entry *entry = record->options; entry && entry->name; entry++)
{
if (pg_strcasecmp(value, entry->name) == 0)
{
@@ -3077,7 +3060,6 @@ char *
config_enum_get_options(struct config_enum *record, const char *prefix,
const char *suffix, const char *separator)
{
- const struct config_enum_entry *entry;
StringInfoData retstr;
int seplen;
@@ -3085,7 +3067,7 @@ config_enum_get_options(struct config_enum *record, const char *prefix,
appendStringInfoString(&retstr, prefix);
seplen = strlen(separator);
- for (entry = record->options; entry && entry->name; entry++)
+ for (const struct config_enum_entry *entry = record->options; entry && entry->name; entry++)
{
if (!entry->hidden)
{
@@ -3772,8 +3754,6 @@ set_config_with_handle(const char *name, config_handle *handle,
}
if (makeDefault)
{
- GucStack *stack;
-
if (conf->gen.reset_source <= source)
{
conf->reset_val = newval;
@@ -3783,7 +3763,7 @@ set_config_with_handle(const char *name, config_handle *handle,
conf->gen.reset_scontext = context;
conf->gen.reset_srole = srole;
}
- for (stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
{
if (stack->source <= source)
{
@@ -3870,8 +3850,6 @@ set_config_with_handle(const char *name, config_handle *handle,
}
if (makeDefault)
{
- GucStack *stack;
-
if (conf->gen.reset_source <= source)
{
conf->reset_val = newval;
@@ -3881,7 +3859,7 @@ set_config_with_handle(const char *name, config_handle *handle,
conf->gen.reset_scontext = context;
conf->gen.reset_srole = srole;
}
- for (stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
{
if (stack->source <= source)
{
@@ -3968,8 +3946,6 @@ set_config_with_handle(const char *name, config_handle *handle,
}
if (makeDefault)
{
- GucStack *stack;
-
if (conf->gen.reset_source <= source)
{
conf->reset_val = newval;
@@ -3979,7 +3955,7 @@ set_config_with_handle(const char *name, config_handle *handle,
conf->gen.reset_scontext = context;
conf->gen.reset_srole = srole;
}
- for (stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
{
if (stack->source <= source)
{
@@ -4134,8 +4110,6 @@ set_config_with_handle(const char *name, config_handle *handle,
if (makeDefault)
{
- GucStack *stack;
-
if (conf->gen.reset_source <= source)
{
set_string_field(conf, &conf->reset_val, newval);
@@ -4145,7 +4119,7 @@ set_config_with_handle(const char *name, config_handle *handle,
conf->gen.reset_scontext = context;
conf->gen.reset_srole = srole;
}
- for (stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
{
if (stack->source <= source)
{
@@ -4236,8 +4210,6 @@ set_config_with_handle(const char *name, config_handle *handle,
}
if (makeDefault)
{
- GucStack *stack;
-
if (conf->gen.reset_source <= source)
{
conf->reset_val = newval;
@@ -4247,7 +4219,7 @@ set_config_with_handle(const char *name, config_handle *handle,
conf->gen.reset_scontext = context;
conf->gen.reset_srole = srole;
}
- for (stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
{
if (stack->source <= source)
{
@@ -4474,7 +4446,6 @@ static void
write_auto_conf_file(int fd, const char *filename, ConfigVariable *head)
{
StringInfoData buf;
- ConfigVariable *item;
initStringInfo(&buf);
@@ -4494,7 +4465,7 @@ write_auto_conf_file(int fd, const char *filename, ConfigVariable *head)
}
/* Emit each parameter, properly quoting the value */
- for (item = head; item != NULL; item = item->next)
+ for (ConfigVariable *item = head; item != NULL; item = item->next)
{
char *escaped;
@@ -4542,7 +4513,7 @@ static void
replace_auto_config_value(ConfigVariable **head_p, ConfigVariable **tail_p,
const char *name, const char *value)
{
- ConfigVariable *item,
+ ConfigVariable *newitem,
*next,
*prev = NULL;
@@ -4551,7 +4522,7 @@ replace_auto_config_value(ConfigVariable **head_p, ConfigVariable **tail_p,
* one, but if external tools have modified the config file, there could
* be more.
*/
- for (item = *head_p; item != NULL; item = next)
+ for (ConfigVariable *item = *head_p; item != NULL; item = next)
{
next = item->next;
if (guc_name_compare(item->name, name) == 0)
@@ -4578,21 +4549,21 @@ replace_auto_config_value(ConfigVariable **head_p, ConfigVariable **tail_p,
return;
/* OK, append a new entry */
- item = palloc(sizeof *item);
- item->name = pstrdup(name);
- item->value = pstrdup(value);
- item->errmsg = NULL;
- item->filename = pstrdup(""); /* new item has no location */
- item->sourceline = 0;
- item->ignore = false;
- item->applied = false;
- item->next = NULL;
+ newitem = palloc_object(ConfigVariable);
+ newitem->name = pstrdup(name);
+ newitem->value = pstrdup(value);
+ newitem->errmsg = NULL;
+ newitem->filename = pstrdup(""); /* new item has no location */
+ newitem->sourceline = 0;
+ newitem->ignore = false;
+ newitem->applied = false;
+ newitem->next = NULL;
if (*head_p == NULL)
- *head_p = item;
+ *head_p = newitem;
else
- (*tail_p)->next = item;
- *tail_p = item;
+ (*tail_p)->next = newitem;
+ *tail_p = newitem;
}
@@ -6384,7 +6355,6 @@ void
ParseLongOption(const char *string, char **name, char **value)
{
size_t equal_pos;
- char *cp;
Assert(string);
Assert(name);
@@ -6406,7 +6376,7 @@ ParseLongOption(const char *string, char **name, char **value)
*value = NULL;
}
- for (cp = *name; *cp; cp++)
+ for (char *cp = *name; *cp; cp++)
if (*cp == '-')
*cp = '_';
}
@@ -6420,8 +6390,6 @@ ParseLongOption(const char *string, char **name, char **value)
void
TransformGUCArray(ArrayType *array, List **names, List **values)
{
- int i;
-
Assert(array != NULL);
Assert(ARR_ELEMTYPE(array) == TEXTOID);
Assert(ARR_NDIM(array) == 1);
@@ -6429,7 +6397,7 @@ TransformGUCArray(ArrayType *array, List **names, List **values)
*names = NIL;
*values = NIL;
- for (i = 1; i <= ARR_DIMS(array)[0]; i++)
+ for (int i = 1; i <= ARR_DIMS(array)[0]; i++)
{
Datum d;
bool isnull;
@@ -6533,7 +6501,6 @@ GUCArrayAdd(ArrayType *array, const char *name, const char *value)
{
int index;
bool isnull;
- int i;
Assert(ARR_ELEMTYPE(array) == TEXTOID);
Assert(ARR_NDIM(array) == 1);
@@ -6541,7 +6508,7 @@ GUCArrayAdd(ArrayType *array, const char *name, const char *value)
index = ARR_DIMS(array)[0] + 1; /* add after end */
- for (i = 1; i <= ARR_DIMS(array)[0]; i++)
+ for (int i = 1; i <= ARR_DIMS(array)[0]; i++)
{
Datum d;
char *current;
@@ -6589,7 +6556,6 @@ GUCArrayDelete(ArrayType *array, const char *name)
{
struct config_generic *record;
ArrayType *newarray;
- int i;
int index;
Assert(name);
@@ -6609,7 +6575,7 @@ GUCArrayDelete(ArrayType *array, const char *name)
newarray = NULL;
index = 1;
- for (i = 1; i <= ARR_DIMS(array)[0]; i++)
+ for (int i = 1; i <= ARR_DIMS(array)[0]; i++)
{
Datum d;
char *val;
@@ -6658,7 +6624,6 @@ ArrayType *
GUCArrayReset(ArrayType *array)
{
ArrayType *newarray;
- int i;
int index;
/* if array is currently null, nothing to do */
@@ -6672,7 +6637,7 @@ GUCArrayReset(ArrayType *array)
newarray = NULL;
index = 1;
- for (i = 1; i <= ARR_DIMS(array)[0]; i++)
+ for (int i = 1; i <= ARR_DIMS(array)[0]; i++)
{
Datum d;
char *val;
diff --git a/src/backend/utils/misc/guc_funcs.c b/src/backend/utils/misc/guc_funcs.c
index b9e26982abd..f712a5971cf 100644
--- a/src/backend/utils/misc/guc_funcs.c
+++ b/src/backend/utils/misc/guc_funcs.c
@@ -986,7 +986,6 @@ show_all_file_settings(PG_FUNCTION_ARGS)
#define NUM_PG_FILE_SETTINGS_ATTS 7
ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
ConfigVariable *conf;
- int seqno;
/* Scan the config files using current context as workspace */
conf = ProcessConfigFileInternal(PGC_SIGHUP, false, DEBUG3);
@@ -995,7 +994,7 @@ show_all_file_settings(PG_FUNCTION_ARGS)
InitMaterializedSRF(fcinfo, 0);
/* Process the results and create a tuplestore */
- for (seqno = 1; conf != NULL; conf = conf->next, seqno++)
+ for (int seqno = 1; conf != NULL; conf = conf->next, seqno++)
{
Datum values[NUM_PG_FILE_SETTINGS_ATTS];
bool nulls[NUM_PG_FILE_SETTINGS_ATTS];
diff --git a/src/backend/utils/misc/help_config.c b/src/backend/utils/misc/help_config.c
index 55c36ddf051..86812ac881f 100644
--- a/src/backend/utils/misc/help_config.c
+++ b/src/backend/utils/misc/help_config.c
@@ -46,15 +46,14 @@ void
GucInfoMain(void)
{
struct config_generic **guc_vars;
- int numOpts,
- i;
+ int numOpts;
/* Initialize the GUC hash table */
build_guc_variables();
guc_vars = get_guc_variables(&numOpts);
- for (i = 0; i < numOpts; i++)
+ for (int i = 0; i < numOpts; i++)
{
mixedStruct *var = (mixedStruct *) guc_vars[i];
base-commit: b292256272623d1a7532f3893a4565d1944742b4
--
2.51.0
v1-0002-Add-some-const-qualifiers.patchtext/plain; charset=UTF-8; name=v1-0002-Add-some-const-qualifiers.patchDownload
From af7827dc6292c9fac5476624658c7c499b023064 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 3 Oct 2025 08:27:18 +0200
Subject: [PATCH v1 2/8] Add some const qualifiers
in guc-related source files, in anticipation of some further
restructuring.
---
src/backend/utils/misc/guc.c | 62 +++++++++++++++---------------
src/backend/utils/misc/guc_funcs.c | 16 ++++----
src/include/utils/guc_tables.h | 10 ++---
3 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index f22189471dc..dac09ae7853 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -260,15 +260,15 @@ static bool assignable_custom_variable_name(const char *name, bool skip_errors,
int elevel);
static void do_serialize(char **destptr, Size *maxbytes,
const char *fmt,...) pg_attribute_printf(3, 4);
-static bool call_bool_check_hook(struct config_bool *conf, bool *newval,
+static bool call_bool_check_hook(const struct config_bool *conf, bool *newval,
void **extra, GucSource source, int elevel);
-static bool call_int_check_hook(struct config_int *conf, int *newval,
+static bool call_int_check_hook(const struct config_int *conf, int *newval,
void **extra, GucSource source, int elevel);
-static bool call_real_check_hook(struct config_real *conf, double *newval,
+static bool call_real_check_hook(const struct config_real *conf, double *newval,
void **extra, GucSource source, int elevel);
-static bool call_string_check_hook(struct config_string *conf, char **newval,
+static bool call_string_check_hook(const struct config_string *conf, char **newval,
void **extra, GucSource source, int elevel);
-static bool call_enum_check_hook(struct config_enum *conf, int *newval,
+static bool call_enum_check_hook(const struct config_enum *conf, int *newval,
void **extra, GucSource source, int elevel);
@@ -1424,14 +1424,14 @@ check_GUC_name_for_parameter_acl(const char *name)
*/
#ifdef USE_ASSERT_CHECKING
static bool
-check_GUC_init(struct config_generic *gconf)
+check_GUC_init(const struct config_generic *gconf)
{
/* Checks on values */
switch (gconf->vartype)
{
case PGC_BOOL:
{
- struct config_bool *conf = (struct config_bool *) gconf;
+ const struct config_bool *conf = (const struct config_bool *) gconf;
if (*conf->variable && !conf->boot_val)
{
@@ -1443,7 +1443,7 @@ check_GUC_init(struct config_generic *gconf)
}
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) gconf;
+ const struct config_int *conf = (const struct config_int *) gconf;
if (*conf->variable != 0 && *conf->variable != conf->boot_val)
{
@@ -1455,7 +1455,7 @@ check_GUC_init(struct config_generic *gconf)
}
case PGC_REAL:
{
- struct config_real *conf = (struct config_real *) gconf;
+ const struct config_real *conf = (const struct config_real *) gconf;
if (*conf->variable != 0.0 && *conf->variable != conf->boot_val)
{
@@ -1467,7 +1467,7 @@ check_GUC_init(struct config_generic *gconf)
}
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) gconf;
+ const struct config_string *conf = (const struct config_string *) gconf;
if (*conf->variable != NULL &&
(conf->boot_val == NULL ||
@@ -1481,7 +1481,7 @@ check_GUC_init(struct config_generic *gconf)
}
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) gconf;
+ const struct config_enum *conf = (const struct config_enum *) gconf;
if (*conf->variable != conf->boot_val)
{
@@ -3012,7 +3012,7 @@ parse_real(const char *value, double *result, int flags, const char **hintmsg)
* allocated for modification.
*/
const char *
-config_enum_lookup_by_value(struct config_enum *record, int val)
+config_enum_lookup_by_value(const struct config_enum *record, int val)
{
for (const struct config_enum_entry *entry = record->options; entry && entry->name; entry++)
{
@@ -3033,7 +3033,7 @@ config_enum_lookup_by_value(struct config_enum *record, int val)
* true. If it's not found, return false and retval is set to 0.
*/
bool
-config_enum_lookup_by_name(struct config_enum *record, const char *value,
+config_enum_lookup_by_name(const struct config_enum *record, const char *value,
int *retval)
{
for (const struct config_enum_entry *entry = record->options; entry && entry->name; entry++)
@@ -3057,7 +3057,7 @@ config_enum_lookup_by_name(struct config_enum *record, const char *value,
* If suffix is non-NULL, it is added to the end of the string.
*/
char *
-config_enum_get_options(struct config_enum *record, const char *prefix,
+config_enum_get_options(const struct config_enum *record, const char *prefix,
const char *suffix, const char *separator)
{
StringInfoData retstr;
@@ -3113,7 +3113,7 @@ config_enum_get_options(struct config_enum *record, const char *prefix,
* Returns true if OK, false if not (or throws error, if elevel >= ERROR)
*/
static bool
-parse_and_validate_value(struct config_generic *record,
+parse_and_validate_value(const struct config_generic *record,
const char *value,
GucSource source, int elevel,
union config_var_val *newval, void **newextra)
@@ -3122,7 +3122,7 @@ parse_and_validate_value(struct config_generic *record,
{
case PGC_BOOL:
{
- struct config_bool *conf = (struct config_bool *) record;
+ const struct config_bool *conf = (const struct config_bool *) record;
if (!parse_bool(value, &newval->boolval))
{
@@ -3140,7 +3140,7 @@ parse_and_validate_value(struct config_generic *record,
break;
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) record;
+ const struct config_int *conf = (const struct config_int *) record;
const char *hintmsg;
if (!parse_int(value, &newval->intval,
@@ -3181,7 +3181,7 @@ parse_and_validate_value(struct config_generic *record,
break;
case PGC_REAL:
{
- struct config_real *conf = (struct config_real *) record;
+ const struct config_real *conf = (const struct config_real *) record;
const char *hintmsg;
if (!parse_real(value, &newval->realval,
@@ -3222,7 +3222,7 @@ parse_and_validate_value(struct config_generic *record,
break;
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) record;
+ const struct config_string *conf = (const struct config_string *) record;
/*
* The value passed by the caller could be transient, so we
@@ -3252,7 +3252,7 @@ parse_and_validate_value(struct config_generic *record,
break;
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) record;
+ const struct config_enum *conf = (const struct config_enum *) record;
if (!config_enum_lookup_by_name(conf, value, &newval->enumval))
{
@@ -5455,7 +5455,7 @@ GetConfigOptionByName(const char *name, const char **varname, bool missing_ok)
* The result string is palloc'd.
*/
char *
-ShowGUCOption(struct config_generic *record, bool use_units)
+ShowGUCOption(const struct config_generic *record, bool use_units)
{
char buffer[256];
const char *val;
@@ -5464,7 +5464,7 @@ ShowGUCOption(struct config_generic *record, bool use_units)
{
case PGC_BOOL:
{
- struct config_bool *conf = (struct config_bool *) record;
+ const struct config_bool *conf = (const struct config_bool *) record;
if (conf->show_hook)
val = conf->show_hook();
@@ -5475,7 +5475,7 @@ ShowGUCOption(struct config_generic *record, bool use_units)
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) record;
+ const struct config_int *conf = (const struct config_int *) record;
if (conf->show_hook)
val = conf->show_hook();
@@ -5504,7 +5504,7 @@ ShowGUCOption(struct config_generic *record, bool use_units)
case PGC_REAL:
{
- struct config_real *conf = (struct config_real *) record;
+ const struct config_real *conf = (const struct config_real *) record;
if (conf->show_hook)
val = conf->show_hook();
@@ -5529,7 +5529,7 @@ ShowGUCOption(struct config_generic *record, bool use_units)
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) record;
+ const struct config_string *conf = (const struct config_string *) record;
if (conf->show_hook)
val = conf->show_hook();
@@ -5542,7 +5542,7 @@ ShowGUCOption(struct config_generic *record, bool use_units)
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) record;
+ const struct config_enum *conf = (const struct config_enum *) record;
if (conf->show_hook)
val = conf->show_hook();
@@ -6788,7 +6788,7 @@ GUC_check_errcode(int sqlerrcode)
*/
static bool
-call_bool_check_hook(struct config_bool *conf, bool *newval, void **extra,
+call_bool_check_hook(const struct config_bool *conf, bool *newval, void **extra,
GucSource source, int elevel)
{
/* Quick success if no hook */
@@ -6822,7 +6822,7 @@ call_bool_check_hook(struct config_bool *conf, bool *newval, void **extra,
}
static bool
-call_int_check_hook(struct config_int *conf, int *newval, void **extra,
+call_int_check_hook(const struct config_int *conf, int *newval, void **extra,
GucSource source, int elevel)
{
/* Quick success if no hook */
@@ -6856,7 +6856,7 @@ call_int_check_hook(struct config_int *conf, int *newval, void **extra,
}
static bool
-call_real_check_hook(struct config_real *conf, double *newval, void **extra,
+call_real_check_hook(const struct config_real *conf, double *newval, void **extra,
GucSource source, int elevel)
{
/* Quick success if no hook */
@@ -6890,7 +6890,7 @@ call_real_check_hook(struct config_real *conf, double *newval, void **extra,
}
static bool
-call_string_check_hook(struct config_string *conf, char **newval, void **extra,
+call_string_check_hook(const struct config_string *conf, char **newval, void **extra,
GucSource source, int elevel)
{
volatile bool result = true;
@@ -6940,7 +6940,7 @@ call_string_check_hook(struct config_string *conf, char **newval, void **extra,
}
static bool
-call_enum_check_hook(struct config_enum *conf, int *newval, void **extra,
+call_enum_check_hook(const struct config_enum *conf, int *newval, void **extra,
GucSource source, int elevel)
{
/* Quick success if no hook */
diff --git a/src/backend/utils/misc/guc_funcs.c b/src/backend/utils/misc/guc_funcs.c
index f712a5971cf..d7a822e1462 100644
--- a/src/backend/utils/misc/guc_funcs.c
+++ b/src/backend/utils/misc/guc_funcs.c
@@ -578,7 +578,7 @@ pg_settings_get_flags(PG_FUNCTION_ARGS)
* Return whether or not the GUC variable is visible to the current user.
*/
bool
-ConfigOptionIsVisible(struct config_generic *conf)
+ConfigOptionIsVisible(const struct config_generic *conf)
{
if ((conf->flags & GUC_SUPERUSER_ONLY) &&
!has_privs_of_role(GetUserId(), ROLE_PG_READ_ALL_SETTINGS))
@@ -591,7 +591,7 @@ ConfigOptionIsVisible(struct config_generic *conf)
* Extract fields to show in pg_settings for given variable.
*/
static void
-GetConfigOptionValues(struct config_generic *conf, const char **values)
+GetConfigOptionValues(const struct config_generic *conf, const char **values)
{
char buffer[256];
@@ -629,7 +629,7 @@ GetConfigOptionValues(struct config_generic *conf, const char **values)
{
case PGC_BOOL:
{
- struct config_bool *lconf = (struct config_bool *) conf;
+ const struct config_bool *lconf = (const struct config_bool *) conf;
/* min_val */
values[9] = NULL;
@@ -650,7 +650,7 @@ GetConfigOptionValues(struct config_generic *conf, const char **values)
case PGC_INT:
{
- struct config_int *lconf = (struct config_int *) conf;
+ const struct config_int *lconf = (const struct config_int *) conf;
/* min_val */
snprintf(buffer, sizeof(buffer), "%d", lconf->min);
@@ -675,7 +675,7 @@ GetConfigOptionValues(struct config_generic *conf, const char **values)
case PGC_REAL:
{
- struct config_real *lconf = (struct config_real *) conf;
+ const struct config_real *lconf = (const struct config_real *) conf;
/* min_val */
snprintf(buffer, sizeof(buffer), "%g", lconf->min);
@@ -700,7 +700,7 @@ GetConfigOptionValues(struct config_generic *conf, const char **values)
case PGC_STRING:
{
- struct config_string *lconf = (struct config_string *) conf;
+ const struct config_string *lconf = (const struct config_string *) conf;
/* min_val */
values[9] = NULL;
@@ -727,7 +727,7 @@ GetConfigOptionValues(struct config_generic *conf, const char **values)
case PGC_ENUM:
{
- struct config_enum *lconf = (struct config_enum *) conf;
+ const struct config_enum *lconf = (const struct config_enum *) conf;
/* min_val */
values[9] = NULL;
@@ -741,7 +741,7 @@ GetConfigOptionValues(struct config_generic *conf, const char **values)
* NOTE! enumvals with double quotes in them are not
* supported!
*/
- values[11] = config_enum_get_options((struct config_enum *) conf,
+ values[11] = config_enum_get_options(lconf,
"{\"", "\"}", "\",\"");
/* boot_val */
diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h
index f72ce944d7f..44514691ba6 100644
--- a/src/include/utils/guc_tables.h
+++ b/src/include/utils/guc_tables.h
@@ -319,10 +319,10 @@ extern struct config_generic *find_option(const char *name,
extern struct config_generic **get_explain_guc_options(int *num);
/* get string value of variable */
-extern char *ShowGUCOption(struct config_generic *record, bool use_units);
+extern char *ShowGUCOption(const struct config_generic *record, bool use_units);
/* get whether or not the GUC variable is visible to current user */
-extern bool ConfigOptionIsVisible(struct config_generic *conf);
+extern bool ConfigOptionIsVisible(const struct config_generic *conf);
/* get the current set of variables */
extern struct config_generic **get_guc_variables(int *num_vars);
@@ -330,10 +330,10 @@ extern struct config_generic **get_guc_variables(int *num_vars);
extern void build_guc_variables(void);
/* search in enum options */
-extern const char *config_enum_lookup_by_value(struct config_enum *record, int val);
-extern bool config_enum_lookup_by_name(struct config_enum *record,
+extern const char *config_enum_lookup_by_value(const struct config_enum *record, int val);
+extern bool config_enum_lookup_by_name(const struct config_enum *record,
const char *value, int *retval);
-extern char *config_enum_get_options(struct config_enum *record,
+extern char *config_enum_get_options(const struct config_enum *record,
const char *prefix,
const char *suffix,
const char *separator);
--
2.51.0
v1-0003-Change-reset_extra-into-a-config_generic-common-f.patchtext/plain; charset=UTF-8; name=v1-0003-Change-reset_extra-into-a-config_generic-common-f.patchDownload
From 62dadff86dba4a13b3092ddd8bd58f58e6f5c70f Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 3 Oct 2025 08:27:18 +0200
Subject: [PATCH v1 3/8] Change reset_extra into a config_generic common field
This is not specific to the GUC parameter type, so it can be part of
the generic struct rather than the type-specific struct (like the
related "extra" field).
---
src/backend/utils/misc/guc.c | 115 +++++++++------------------------
src/include/utils/guc_tables.h | 6 +-
2 files changed, 32 insertions(+), 89 deletions(-)
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index dac09ae7853..d3c3179a053 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -743,29 +743,8 @@ extra_field_used(struct config_generic *gconf, void *extra)
{
if (extra == gconf->extra)
return true;
- switch (gconf->vartype)
- {
- case PGC_BOOL:
- if (extra == ((struct config_bool *) gconf)->reset_extra)
- return true;
- break;
- case PGC_INT:
- if (extra == ((struct config_int *) gconf)->reset_extra)
- return true;
- break;
- case PGC_REAL:
- if (extra == ((struct config_real *) gconf)->reset_extra)
- return true;
- break;
- case PGC_STRING:
- if (extra == ((struct config_string *) gconf)->reset_extra)
- return true;
- break;
- case PGC_ENUM:
- if (extra == ((struct config_enum *) gconf)->reset_extra)
- return true;
- break;
- }
+ if (extra == gconf->reset_extra)
+ return true;
for (GucStack *stack = gconf->stack; stack; stack = stack->prev)
{
if (extra == stack->prior.extra ||
@@ -1634,6 +1613,8 @@ InitializeGUCOptionsFromEnvironment(void)
static void
InitializeOneGUCOption(struct config_generic *gconf)
{
+ void *extra = NULL;
+
gconf->status = 0;
gconf->source = PGC_S_DEFAULT;
gconf->reset_source = PGC_S_DEFAULT;
@@ -1653,7 +1634,6 @@ InitializeOneGUCOption(struct config_generic *gconf)
{
struct config_bool *conf = (struct config_bool *) gconf;
bool newval = conf->boot_val;
- void *extra = NULL;
if (!call_bool_check_hook(conf, &newval, &extra,
PGC_S_DEFAULT, LOG))
@@ -1662,14 +1642,12 @@ InitializeOneGUCOption(struct config_generic *gconf)
if (conf->assign_hook)
conf->assign_hook(newval, extra);
*conf->variable = conf->reset_val = newval;
- conf->gen.extra = conf->reset_extra = extra;
break;
}
case PGC_INT:
{
struct config_int *conf = (struct config_int *) gconf;
int newval = conf->boot_val;
- void *extra = NULL;
Assert(newval >= conf->min);
Assert(newval <= conf->max);
@@ -1680,14 +1658,12 @@ InitializeOneGUCOption(struct config_generic *gconf)
if (conf->assign_hook)
conf->assign_hook(newval, extra);
*conf->variable = conf->reset_val = newval;
- conf->gen.extra = conf->reset_extra = extra;
break;
}
case PGC_REAL:
{
struct config_real *conf = (struct config_real *) gconf;
double newval = conf->boot_val;
- void *extra = NULL;
Assert(newval >= conf->min);
Assert(newval <= conf->max);
@@ -1698,14 +1674,12 @@ InitializeOneGUCOption(struct config_generic *gconf)
if (conf->assign_hook)
conf->assign_hook(newval, extra);
*conf->variable = conf->reset_val = newval;
- conf->gen.extra = conf->reset_extra = extra;
break;
}
case PGC_STRING:
{
struct config_string *conf = (struct config_string *) gconf;
char *newval;
- void *extra = NULL;
/* non-NULL boot_val must always get strdup'd */
if (conf->boot_val != NULL)
@@ -1720,14 +1694,12 @@ InitializeOneGUCOption(struct config_generic *gconf)
if (conf->assign_hook)
conf->assign_hook(newval, extra);
*conf->variable = conf->reset_val = newval;
- conf->gen.extra = conf->reset_extra = extra;
break;
}
case PGC_ENUM:
{
struct config_enum *conf = (struct config_enum *) gconf;
int newval = conf->boot_val;
- void *extra = NULL;
if (!call_enum_check_hook(conf, &newval, &extra,
PGC_S_DEFAULT, LOG))
@@ -1736,10 +1708,11 @@ InitializeOneGUCOption(struct config_generic *gconf)
if (conf->assign_hook)
conf->assign_hook(newval, extra);
*conf->variable = conf->reset_val = newval;
- conf->gen.extra = conf->reset_extra = extra;
break;
}
}
+
+ gconf->extra = gconf->reset_extra = extra;
}
/*
@@ -2027,10 +2000,10 @@ ResetAllOptions(void)
if (conf->assign_hook)
conf->assign_hook(conf->reset_val,
- conf->reset_extra);
+ conf->gen.reset_extra);
*conf->variable = conf->reset_val;
set_extra_field(&conf->gen, &conf->gen.extra,
- conf->reset_extra);
+ conf->gen.reset_extra);
break;
}
case PGC_INT:
@@ -2039,10 +2012,10 @@ ResetAllOptions(void)
if (conf->assign_hook)
conf->assign_hook(conf->reset_val,
- conf->reset_extra);
+ conf->gen.reset_extra);
*conf->variable = conf->reset_val;
set_extra_field(&conf->gen, &conf->gen.extra,
- conf->reset_extra);
+ conf->gen.reset_extra);
break;
}
case PGC_REAL:
@@ -2051,10 +2024,10 @@ ResetAllOptions(void)
if (conf->assign_hook)
conf->assign_hook(conf->reset_val,
- conf->reset_extra);
+ conf->gen.reset_extra);
*conf->variable = conf->reset_val;
set_extra_field(&conf->gen, &conf->gen.extra,
- conf->reset_extra);
+ conf->gen.reset_extra);
break;
}
case PGC_STRING:
@@ -2063,10 +2036,10 @@ ResetAllOptions(void)
if (conf->assign_hook)
conf->assign_hook(conf->reset_val,
- conf->reset_extra);
+ conf->gen.reset_extra);
set_string_field(conf, conf->variable, conf->reset_val);
set_extra_field(&conf->gen, &conf->gen.extra,
- conf->reset_extra);
+ conf->gen.reset_extra);
break;
}
case PGC_ENUM:
@@ -2075,10 +2048,10 @@ ResetAllOptions(void)
if (conf->assign_hook)
conf->assign_hook(conf->reset_val,
- conf->reset_extra);
+ conf->gen.reset_extra);
*conf->variable = conf->reset_val;
set_extra_field(&conf->gen, &conf->gen.extra,
- conf->reset_extra);
+ conf->gen.reset_extra);
break;
}
}
@@ -3712,7 +3685,7 @@ set_config_with_handle(const char *name, config_handle *handle,
else
{
newval = conf->reset_val;
- newextra = conf->reset_extra;
+ newextra = conf->gen.reset_extra;
source = conf->gen.reset_source;
context = conf->gen.reset_scontext;
srole = conf->gen.reset_srole;
@@ -3757,7 +3730,7 @@ set_config_with_handle(const char *name, config_handle *handle,
if (conf->gen.reset_source <= source)
{
conf->reset_val = newval;
- set_extra_field(&conf->gen, &conf->reset_extra,
+ set_extra_field(&conf->gen, &conf->gen.reset_extra,
newextra);
conf->gen.reset_source = source;
conf->gen.reset_scontext = context;
@@ -3808,7 +3781,7 @@ set_config_with_handle(const char *name, config_handle *handle,
else
{
newval = conf->reset_val;
- newextra = conf->reset_extra;
+ newextra = conf->gen.reset_extra;
source = conf->gen.reset_source;
context = conf->gen.reset_scontext;
srole = conf->gen.reset_srole;
@@ -3853,7 +3826,7 @@ set_config_with_handle(const char *name, config_handle *handle,
if (conf->gen.reset_source <= source)
{
conf->reset_val = newval;
- set_extra_field(&conf->gen, &conf->reset_extra,
+ set_extra_field(&conf->gen, &conf->gen.reset_extra,
newextra);
conf->gen.reset_source = source;
conf->gen.reset_scontext = context;
@@ -3904,7 +3877,7 @@ set_config_with_handle(const char *name, config_handle *handle,
else
{
newval = conf->reset_val;
- newextra = conf->reset_extra;
+ newextra = conf->gen.reset_extra;
source = conf->gen.reset_source;
context = conf->gen.reset_scontext;
srole = conf->gen.reset_srole;
@@ -3949,7 +3922,7 @@ set_config_with_handle(const char *name, config_handle *handle,
if (conf->gen.reset_source <= source)
{
conf->reset_val = newval;
- set_extra_field(&conf->gen, &conf->reset_extra,
+ set_extra_field(&conf->gen, &conf->gen.reset_extra,
newextra);
conf->gen.reset_source = source;
conf->gen.reset_scontext = context;
@@ -4019,7 +3992,7 @@ set_config_with_handle(const char *name, config_handle *handle,
* guc.c's control
*/
newval = conf->reset_val;
- newextra = conf->reset_extra;
+ newextra = conf->gen.reset_extra;
source = conf->gen.reset_source;
context = conf->gen.reset_scontext;
srole = conf->gen.reset_srole;
@@ -4113,7 +4086,7 @@ set_config_with_handle(const char *name, config_handle *handle,
if (conf->gen.reset_source <= source)
{
set_string_field(conf, &conf->reset_val, newval);
- set_extra_field(&conf->gen, &conf->reset_extra,
+ set_extra_field(&conf->gen, &conf->gen.reset_extra,
newextra);
conf->gen.reset_source = source;
conf->gen.reset_scontext = context;
@@ -4168,7 +4141,7 @@ set_config_with_handle(const char *name, config_handle *handle,
else
{
newval = conf->reset_val;
- newextra = conf->reset_extra;
+ newextra = conf->gen.reset_extra;
source = conf->gen.reset_source;
context = conf->gen.reset_scontext;
srole = conf->gen.reset_srole;
@@ -4213,7 +4186,7 @@ set_config_with_handle(const char *name, config_handle *handle,
if (conf->gen.reset_source <= source)
{
conf->reset_val = newval;
- set_extra_field(&conf->gen, &conf->reset_extra,
+ set_extra_field(&conf->gen, &conf->gen.reset_extra,
newextra);
conf->gen.reset_source = source;
conf->gen.reset_scontext = context;
@@ -6244,29 +6217,11 @@ RestoreGUCState(void *gucstate)
switch (gconf->vartype)
{
case PGC_BOOL:
- {
- struct config_bool *conf = (struct config_bool *) gconf;
-
- if (conf->reset_extra && conf->reset_extra != gconf->extra)
- guc_free(conf->reset_extra);
- break;
- }
case PGC_INT:
- {
- struct config_int *conf = (struct config_int *) gconf;
-
- if (conf->reset_extra && conf->reset_extra != gconf->extra)
- guc_free(conf->reset_extra);
- break;
- }
case PGC_REAL:
- {
- struct config_real *conf = (struct config_real *) gconf;
-
- if (conf->reset_extra && conf->reset_extra != gconf->extra)
- guc_free(conf->reset_extra);
- break;
- }
+ case PGC_ENUM:
+ /* no need to do anything */
+ break;
case PGC_STRING:
{
struct config_string *conf = (struct config_string *) gconf;
@@ -6274,19 +6229,11 @@ RestoreGUCState(void *gucstate)
guc_free(*conf->variable);
if (conf->reset_val && conf->reset_val != *conf->variable)
guc_free(conf->reset_val);
- if (conf->reset_extra && conf->reset_extra != gconf->extra)
- guc_free(conf->reset_extra);
- break;
- }
- case PGC_ENUM:
- {
- struct config_enum *conf = (struct config_enum *) gconf;
-
- if (conf->reset_extra && conf->reset_extra != gconf->extra)
- guc_free(conf->reset_extra);
break;
}
}
+ if (gconf->reset_extra && gconf->reset_extra != gconf->extra)
+ guc_free(gconf->reset_extra);
/* Remove it from any lists it's in. */
RemoveGUCFromLists(gconf);
/* Now we can reset the struct to PGS_S_DEFAULT state. */
diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h
index 44514691ba6..c5776be029b 100644
--- a/src/include/utils/guc_tables.h
+++ b/src/include/utils/guc_tables.h
@@ -188,6 +188,7 @@ struct config_generic
Oid reset_srole; /* role that set the reset value */
GucStack *stack; /* stacked prior values */
void *extra; /* "extra" pointer for current actual value */
+ void *reset_extra;
dlist_node nondef_link; /* list link for variables that have source
* different from PGC_S_DEFAULT */
slist_node stack_link; /* list link for variables that have non-NULL
@@ -224,7 +225,6 @@ struct config_bool
GucShowHook show_hook;
/* variable fields, initialized at runtime: */
bool reset_val;
- void *reset_extra;
};
struct config_int
@@ -240,7 +240,6 @@ struct config_int
GucShowHook show_hook;
/* variable fields, initialized at runtime: */
int reset_val;
- void *reset_extra;
};
struct config_real
@@ -256,7 +255,6 @@ struct config_real
GucShowHook show_hook;
/* variable fields, initialized at runtime: */
double reset_val;
- void *reset_extra;
};
/*
@@ -280,7 +278,6 @@ struct config_string
GucShowHook show_hook;
/* variable fields, initialized at runtime: */
char *reset_val;
- void *reset_extra;
};
struct config_enum
@@ -295,7 +292,6 @@ struct config_enum
GucShowHook show_hook;
/* variable fields, initialized at runtime: */
int reset_val;
- void *reset_extra;
};
/* constant tables corresponding to enums above and in guc.h */
--
2.51.0
v1-0004-Use-designated-initializers-for-guc_tables.patchtext/plain; charset=UTF-8; name=v1-0004-Use-designated-initializers-for-guc_tables.patchDownload
From 03dc28b1ffe1611e9c39f25d0e3a6e6472fc5368 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 3 Oct 2025 08:27:18 +0200
Subject: [PATCH v1 4/8] Use designated initializers for guc_tables
This makes the generating script simpler and the output easier to
read. In the future, it will make it easier to reorder and rearrange
the underlying C structures.
---
src/backend/utils/misc/gen_guc_tables.pl | 51 ++++++++----------------
1 file changed, 16 insertions(+), 35 deletions(-)
diff --git a/src/backend/utils/misc/gen_guc_tables.pl b/src/backend/utils/misc/gen_guc_tables.pl
index bc8233f2d39..b221fd8c71e 100644
--- a/src/backend/utils/misc/gen_guc_tables.pl
+++ b/src/backend/utils/misc/gen_guc_tables.pl
@@ -57,48 +57,29 @@ sub print_one_table
print $ofh "#ifdef $entry->{ifdef}\n" if $entry->{ifdef};
print $ofh "\t{\n";
- printf $ofh "\t\t{%s, %s, %s,\n",
- dquote($entry->{name}),
- $entry->{context},
- $entry->{group};
- printf $ofh "\t\t\tgettext_noop(%s),\n", dquote($entry->{short_desc});
- if ($entry->{long_desc})
- {
- printf $ofh "\t\t\tgettext_noop(%s)", dquote($entry->{long_desc});
- }
- else
- {
- print $ofh "\t\t\tNULL";
- }
- if ($entry->{flags})
- {
- print $ofh ",\n\t\t\t$entry->{flags}\n";
- }
- else
- {
- print $ofh "\n";
- }
+ print $ofh "\t\t{\n";
+ printf $ofh "\t\t\t.name = %s,\n", dquote($entry->{name});
+ printf $ofh "\t\t\t.context = %s,\n", $entry->{context};
+ printf $ofh "\t\t\t.group = %s,\n", $entry->{group};
+ printf $ofh "\t\t\t.short_desc = gettext_noop(%s),\n", dquote($entry->{short_desc});
+ printf $ofh "\t\t\t.long_desc = gettext_noop(%s),\n", dquote($entry->{long_desc}) if $entry->{long_desc};
+ printf $ofh "\t\t\t.flags = %s,\n", $entry->{flags} if $entry->{flags};
print $ofh "\t\t},\n";
- print $ofh "\t\t&$entry->{variable},\n";
- print $ofh "\t\t$entry->{boot_val},";
- print $ofh " $entry->{min},"
- if $entry->{type} eq 'int' || $entry->{type} eq 'real';
- print $ofh " $entry->{max},"
- if $entry->{type} eq 'int' || $entry->{type} eq 'real';
- print $ofh " $entry->{options},"
- if $entry->{type} eq 'enum';
- print $ofh "\n";
- printf $ofh "\t\t%s, %s, %s\n",
- ($entry->{check_hook} || 'NULL'),
- ($entry->{assign_hook} || 'NULL'),
- ($entry->{show_hook} || 'NULL');
+ printf $ofh "\t\t.variable = &%s,\n", $entry->{variable};
+ printf $ofh "\t\t.boot_val = %s,\n", $entry->{boot_val};
+ printf $ofh "\t\t.min = %s,\n", $entry->{min} if $entry->{type} eq 'int' || $entry->{type} eq 'real';
+ printf $ofh "\t\t.max = %s,\n", $entry->{max} if $entry->{type} eq 'int' || $entry->{type} eq 'real';
+ printf $ofh "\t\t.options = %s,\n", $entry->{options} if $entry->{type} eq 'enum';
+ printf $ofh "\t\t.check_hook = %s,\n", $entry->{check_hook} if $entry->{check_hook};
+ printf $ofh "\t\t.assign_hook = %s,\n", $entry->{assign_hook} if $entry->{assign_hook};
+ printf $ofh "\t\t.show_hook = %s,\n", $entry->{show_hook} if $entry->{show_hook};
print $ofh "\t},\n";
print $ofh "#endif\n" if $entry->{ifdef};
print $ofh "\n";
}
print $ofh "\t/* End-of-list marker */\n";
- print $ofh "\t{{0}}\n";
+ print $ofh "\t{0}\n";
print $ofh "};\n";
return;
--
2.51.0
v1-0005-Change-config_generic.vartype-to-be-initialized-a.patchtext/plain; charset=UTF-8; name=v1-0005-Change-config_generic.vartype-to-be-initialized-a.patchDownload
From 8b632e14022f3a2dd15cbbba81fd83d26925466e Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 3 Oct 2025 08:27:18 +0200
Subject: [PATCH v1 5/8] Change config_generic.vartype to be initialized at
compile time
Previously, this was initialized at run time so that it did not have
to be maintained by hand in guc_tables.c, but since that table is now
generated anyway, we might as well generate this bit as well.
---
src/backend/utils/misc/gen_guc_tables.pl | 3 ++-
src/backend/utils/misc/guc.c | 28 +-----------------------
src/include/utils/guc_tables.h | 2 +-
3 files changed, 4 insertions(+), 29 deletions(-)
diff --git a/src/backend/utils/misc/gen_guc_tables.pl b/src/backend/utils/misc/gen_guc_tables.pl
index b221fd8c71e..8a416ca48d1 100644
--- a/src/backend/utils/misc/gen_guc_tables.pl
+++ b/src/backend/utils/misc/gen_guc_tables.pl
@@ -64,6 +64,7 @@ sub print_one_table
printf $ofh "\t\t\t.short_desc = gettext_noop(%s),\n", dquote($entry->{short_desc});
printf $ofh "\t\t\t.long_desc = gettext_noop(%s),\n", dquote($entry->{long_desc}) if $entry->{long_desc};
printf $ofh "\t\t\t.flags = %s,\n", $entry->{flags} if $entry->{flags};
+ printf $ofh "\t\t\t.vartype = %s,\n", ('PGC_' . uc($type));
print $ofh "\t\t},\n";
printf $ofh "\t\t.variable = &%s,\n", $entry->{variable};
printf $ofh "\t\t.boot_val = %s,\n", $entry->{boot_val};
@@ -79,7 +80,7 @@ sub print_one_table
}
print $ofh "\t/* End-of-list marker */\n";
- print $ofh "\t{0}\n";
+ print $ofh "\t{{0}}\n";
print $ofh "};\n";
return;
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index d3c3179a053..647a0166adc 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -889,48 +889,22 @@ build_guc_variables(void)
ALLOCSET_DEFAULT_SIZES);
/*
- * Count all the built-in variables, and set their vartypes correctly.
+ * Count all the built-in variables.
*/
for (int i = 0; ConfigureNamesBool[i].gen.name; i++)
- {
- struct config_bool *conf = &ConfigureNamesBool[i];
-
- /* Rather than requiring vartype to be filled in by hand, do this: */
- conf->gen.vartype = PGC_BOOL;
num_vars++;
- }
for (int i = 0; ConfigureNamesInt[i].gen.name; i++)
- {
- struct config_int *conf = &ConfigureNamesInt[i];
-
- conf->gen.vartype = PGC_INT;
num_vars++;
- }
for (int i = 0; ConfigureNamesReal[i].gen.name; i++)
- {
- struct config_real *conf = &ConfigureNamesReal[i];
-
- conf->gen.vartype = PGC_REAL;
num_vars++;
- }
for (int i = 0; ConfigureNamesString[i].gen.name; i++)
- {
- struct config_string *conf = &ConfigureNamesString[i];
-
- conf->gen.vartype = PGC_STRING;
num_vars++;
- }
for (int i = 0; ConfigureNamesEnum[i].gen.name; i++)
- {
- struct config_enum *conf = &ConfigureNamesEnum[i];
-
- conf->gen.vartype = PGC_ENUM;
num_vars++;
- }
/*
* Create hash table with 20% slack
diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h
index c5776be029b..3de3d809545 100644
--- a/src/include/utils/guc_tables.h
+++ b/src/include/utils/guc_tables.h
@@ -177,8 +177,8 @@ struct config_generic
const char *short_desc; /* short desc. of this variable's purpose */
const char *long_desc; /* long desc. of this variable's purpose */
int flags; /* flag bits, see guc.h */
+ enum config_type vartype; /* type of variable */
/* variable fields, initialized at runtime: */
- enum config_type vartype; /* type of variable (set only at startup) */
int status; /* status bits, see below */
GucSource source; /* source of the current actual value */
GucSource reset_source; /* source of the reset_value */
--
2.51.0
v1-0006-Reorganize-GUC-structs.patchtext/plain; charset=UTF-8; name=v1-0006-Reorganize-GUC-structs.patchDownload
From d3d9693e26f57cc2474aec5a5838b7ac7baada09 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 3 Oct 2025 08:27:18 +0200
Subject: [PATCH v1 6/8] Reorganize GUC structs
Instead of having five separate structs, one for each type, with the
generic part contained in each of them, flip it around and have one
common struct, with the type-specific part has a subfield.
The very original GUC design had type-specific structs and
type-specific lists, and the membership in one of the lists defined
the type. But now the structs themselves know the type (from the
.vartype field), and they are all loaded into a common hash table at
run time, this original separation no longer makes sense. It creates
a bunch of inconsistencies in the code about whether the type-specific
or the generic struct is the primary struct, and a lot of casting in
between, which makes certain assumptions about the struct layouts.
After the change, all these casts are gone and all the data is
accessed via normal field references. Also, various code is
simplified because only one kind of struct needs to be processed.
---
src/backend/utils/misc/gen_guc_tables.pl | 50 +-
src/backend/utils/misc/guc.c | 847 ++++++++++-------------
src/backend/utils/misc/guc_funcs.c | 14 +-
src/backend/utils/misc/help_config.c | 59 +-
src/include/utils/guc_tables.h | 180 ++---
src/tools/pgindent/typedefs.list | 1 -
6 files changed, 524 insertions(+), 627 deletions(-)
diff --git a/src/backend/utils/misc/gen_guc_tables.pl b/src/backend/utils/misc/gen_guc_tables.pl
index 8a416ca48d1..0823e2e552c 100644
--- a/src/backend/utils/misc/gen_guc_tables.pl
+++ b/src/backend/utils/misc/gen_guc_tables.pl
@@ -25,10 +25,7 @@
open my $ofh, '>', $output_fname or die;
print_boilerplate($ofh, $output_fname, 'GUC tables');
-foreach my $type (qw(bool int real string enum))
-{
- print_one_table($ofh, $type);
-}
+print_table($ofh);
close $ofh;
@@ -41,46 +38,43 @@ sub dquote
return q{"} . $s =~ s/"/\\"/gr . q{"};
}
-# Print GUC table for one type.
-sub print_one_table
+# Print GUC table.
+sub print_table
{
- my ($ofh, $type) = @_;
- my $Type = ucfirst $type;
+ my ($ofh) = @_;
print $ofh "\n\n";
- print $ofh "struct config_${type} ConfigureNames${Type}[] =\n";
+ print $ofh "struct config_generic ConfigureNames[] =\n";
print $ofh "{\n";
foreach my $entry (@{$parse})
{
- next if $entry->{type} ne $type;
-
print $ofh "#ifdef $entry->{ifdef}\n" if $entry->{ifdef};
print $ofh "\t{\n";
- print $ofh "\t\t{\n";
- printf $ofh "\t\t\t.name = %s,\n", dquote($entry->{name});
- printf $ofh "\t\t\t.context = %s,\n", $entry->{context};
- printf $ofh "\t\t\t.group = %s,\n", $entry->{group};
- printf $ofh "\t\t\t.short_desc = gettext_noop(%s),\n", dquote($entry->{short_desc});
- printf $ofh "\t\t\t.long_desc = gettext_noop(%s),\n", dquote($entry->{long_desc}) if $entry->{long_desc};
- printf $ofh "\t\t\t.flags = %s,\n", $entry->{flags} if $entry->{flags};
- printf $ofh "\t\t\t.vartype = %s,\n", ('PGC_' . uc($type));
+ printf $ofh "\t\t.name = %s,\n", dquote($entry->{name});
+ printf $ofh "\t\t.context = %s,\n", $entry->{context};
+ printf $ofh "\t\t.group = %s,\n", $entry->{group};
+ printf $ofh "\t\t.short_desc = gettext_noop(%s),\n", dquote($entry->{short_desc});
+ printf $ofh "\t\t.long_desc = gettext_noop(%s),\n", dquote($entry->{long_desc}) if $entry->{long_desc};
+ printf $ofh "\t\t.flags = %s,\n", $entry->{flags} if $entry->{flags};
+ printf $ofh "\t\t.vartype = %s,\n", ('PGC_' . uc($entry->{type}));
+ printf $ofh "\t\t._%s = {\n", $entry->{type};
+ printf $ofh "\t\t\t.variable = &%s,\n", $entry->{variable};
+ printf $ofh "\t\t\t.boot_val = %s,\n", $entry->{boot_val};
+ printf $ofh "\t\t\t.min = %s,\n", $entry->{min} if $entry->{type} eq 'int' || $entry->{type} eq 'real';
+ printf $ofh "\t\t\t.max = %s,\n", $entry->{max} if $entry->{type} eq 'int' || $entry->{type} eq 'real';
+ printf $ofh "\t\t\t.options = %s,\n", $entry->{options} if $entry->{type} eq 'enum';
+ printf $ofh "\t\t\t.check_hook = %s,\n", $entry->{check_hook} if $entry->{check_hook};
+ printf $ofh "\t\t\t.assign_hook = %s,\n", $entry->{assign_hook} if $entry->{assign_hook};
+ printf $ofh "\t\t\t.show_hook = %s,\n", $entry->{show_hook} if $entry->{show_hook};
print $ofh "\t\t},\n";
- printf $ofh "\t\t.variable = &%s,\n", $entry->{variable};
- printf $ofh "\t\t.boot_val = %s,\n", $entry->{boot_val};
- printf $ofh "\t\t.min = %s,\n", $entry->{min} if $entry->{type} eq 'int' || $entry->{type} eq 'real';
- printf $ofh "\t\t.max = %s,\n", $entry->{max} if $entry->{type} eq 'int' || $entry->{type} eq 'real';
- printf $ofh "\t\t.options = %s,\n", $entry->{options} if $entry->{type} eq 'enum';
- printf $ofh "\t\t.check_hook = %s,\n", $entry->{check_hook} if $entry->{check_hook};
- printf $ofh "\t\t.assign_hook = %s,\n", $entry->{assign_hook} if $entry->{assign_hook};
- printf $ofh "\t\t.show_hook = %s,\n", $entry->{show_hook} if $entry->{show_hook};
print $ofh "\t},\n";
print $ofh "#endif\n" if $entry->{ifdef};
print $ofh "\n";
}
print $ofh "\t/* End-of-list marker */\n";
- print $ofh "\t{{0}}\n";
+ print $ofh "\t{0}\n";
print $ofh "};\n";
return;
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 647a0166adc..f137db583c8 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -244,12 +244,12 @@ static void ReportGUCOption(struct config_generic *record);
static void set_config_sourcefile(const char *name, char *sourcefile,
int sourceline);
static void reapply_stacked_values(struct config_generic *variable,
- struct config_string *pHolder,
+ struct config_generic *pHolder,
GucStack *stack,
const char *curvalue,
GucContext curscontext, GucSource cursource,
Oid cursrole);
-static void free_placeholder(struct config_string *pHolder);
+static void free_placeholder(struct config_generic *pHolder);
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);
@@ -260,15 +260,15 @@ static bool assignable_custom_variable_name(const char *name, bool skip_errors,
int elevel);
static void do_serialize(char **destptr, Size *maxbytes,
const char *fmt,...) pg_attribute_printf(3, 4);
-static bool call_bool_check_hook(const struct config_bool *conf, bool *newval,
+static bool call_bool_check_hook(const struct config_generic *conf, bool *newval,
void **extra, GucSource source, int elevel);
-static bool call_int_check_hook(const struct config_int *conf, int *newval,
+static bool call_int_check_hook(const struct config_generic *conf, int *newval,
void **extra, GucSource source, int elevel);
-static bool call_real_check_hook(const struct config_real *conf, double *newval,
+static bool call_real_check_hook(const struct config_generic *conf, double *newval,
void **extra, GucSource source, int elevel);
-static bool call_string_check_hook(const struct config_string *conf, char **newval,
+static bool call_string_check_hook(const struct config_generic *conf, char **newval,
void **extra, GucSource source, int elevel);
-static bool call_enum_check_hook(const struct config_enum *conf, int *newval,
+static bool call_enum_check_hook(const struct config_generic *conf, int *newval,
void **extra, GucSource source, int elevel);
@@ -702,13 +702,13 @@ guc_free(void *ptr)
* Detect whether strval is referenced anywhere in a GUC string item
*/
static bool
-string_field_used(struct config_string *conf, char *strval)
+string_field_used(struct config_generic *conf, char *strval)
{
- if (strval == *(conf->variable) ||
- strval == conf->reset_val ||
- strval == conf->boot_val)
+ if (strval == *(conf->_string.variable) ||
+ strval == conf->_string.reset_val ||
+ strval == conf->_string.boot_val)
return true;
- for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = conf->stack; stack; stack = stack->prev)
{
if (strval == stack->prior.val.stringval ||
strval == stack->masked.val.stringval)
@@ -723,7 +723,7 @@ string_field_used(struct config_string *conf, char *strval)
* states).
*/
static void
-set_string_field(struct config_string *conf, char **field, char *newval)
+set_string_field(struct config_generic *conf, char **field, char *newval)
{
char *oldval = *field;
@@ -786,25 +786,19 @@ set_stack_value(struct config_generic *gconf, config_var_value *val)
switch (gconf->vartype)
{
case PGC_BOOL:
- val->val.boolval =
- *((struct config_bool *) gconf)->variable;
+ val->val.boolval = *gconf->_bool.variable;
break;
case PGC_INT:
- val->val.intval =
- *((struct config_int *) gconf)->variable;
+ val->val.intval = *gconf->_int.variable;
break;
case PGC_REAL:
- val->val.realval =
- *((struct config_real *) gconf)->variable;
+ val->val.realval = *gconf->_real.variable;
break;
case PGC_STRING:
- set_string_field((struct config_string *) gconf,
- &(val->val.stringval),
- *((struct config_string *) gconf)->variable);
+ set_string_field(gconf, &(val->val.stringval), *gconf->_string.variable);
break;
case PGC_ENUM:
- val->val.enumval =
- *((struct config_enum *) gconf)->variable;
+ val->val.enumval = *gconf->_enum.variable;
break;
}
set_extra_field(gconf, &(val->extra), gconf->extra);
@@ -826,7 +820,7 @@ discard_stack_value(struct config_generic *gconf, config_var_value *val)
/* no need to do anything */
break;
case PGC_STRING:
- set_string_field((struct config_string *) gconf,
+ set_string_field(gconf,
&(val->val.stringval),
NULL);
break;
@@ -891,19 +885,7 @@ build_guc_variables(void)
/*
* Count all the built-in variables.
*/
- for (int i = 0; ConfigureNamesBool[i].gen.name; i++)
- num_vars++;
-
- for (int i = 0; ConfigureNamesInt[i].gen.name; i++)
- num_vars++;
-
- for (int i = 0; ConfigureNamesReal[i].gen.name; i++)
- num_vars++;
-
- for (int i = 0; ConfigureNamesString[i].gen.name; i++)
- num_vars++;
-
- for (int i = 0; ConfigureNamesEnum[i].gen.name; i++)
+ for (int i = 0; ConfigureNames[i].name; i++)
num_vars++;
/*
@@ -921,57 +903,9 @@ build_guc_variables(void)
&hash_ctl,
HASH_ELEM | HASH_FUNCTION | HASH_COMPARE | HASH_CONTEXT);
- for (int i = 0; ConfigureNamesBool[i].gen.name; i++)
- {
- struct config_generic *gucvar = &ConfigureNamesBool[i].gen;
-
- hentry = (GUCHashEntry *) hash_search(guc_hashtab,
- &gucvar->name,
- HASH_ENTER,
- &found);
- Assert(!found);
- hentry->gucvar = gucvar;
- }
-
- for (int i = 0; ConfigureNamesInt[i].gen.name; i++)
- {
- struct config_generic *gucvar = &ConfigureNamesInt[i].gen;
-
- hentry = (GUCHashEntry *) hash_search(guc_hashtab,
- &gucvar->name,
- HASH_ENTER,
- &found);
- Assert(!found);
- hentry->gucvar = gucvar;
- }
-
- for (int i = 0; ConfigureNamesReal[i].gen.name; i++)
- {
- struct config_generic *gucvar = &ConfigureNamesReal[i].gen;
-
- hentry = (GUCHashEntry *) hash_search(guc_hashtab,
- &gucvar->name,
- HASH_ENTER,
- &found);
- Assert(!found);
- hentry->gucvar = gucvar;
- }
-
- for (int i = 0; ConfigureNamesString[i].gen.name; i++)
- {
- struct config_generic *gucvar = &ConfigureNamesString[i].gen;
-
- hentry = (GUCHashEntry *) hash_search(guc_hashtab,
- &gucvar->name,
- HASH_ENTER,
- &found);
- Assert(!found);
- hentry->gucvar = gucvar;
- }
-
- for (int i = 0; ConfigureNamesEnum[i].gen.name; i++)
+ for (int i = 0; ConfigureNames[i].name; i++)
{
- struct config_generic *gucvar = &ConfigureNamesEnum[i].gen;
+ struct config_generic *gucvar = &ConfigureNames[i];
hentry = (GUCHashEntry *) hash_search(guc_hashtab,
&gucvar->name,
@@ -1121,44 +1055,42 @@ assignable_custom_variable_name(const char *name, bool skip_errors, int elevel)
static struct config_generic *
add_placeholder_variable(const char *name, int elevel)
{
- size_t sz = sizeof(struct config_string) + sizeof(char *);
- struct config_string *var;
- struct config_generic *gen;
+ size_t sz = sizeof(struct config_generic) + sizeof(char *);
+ struct config_generic *var;
- var = (struct config_string *) guc_malloc(elevel, sz);
+ var = (struct config_generic *) guc_malloc(elevel, sz);
if (var == NULL)
return NULL;
memset(var, 0, sz);
- gen = &var->gen;
- gen->name = guc_strdup(elevel, name);
- if (gen->name == NULL)
+ var->name = guc_strdup(elevel, name);
+ if (var->name == NULL)
{
guc_free(var);
return NULL;
}
- gen->context = PGC_USERSET;
- gen->group = CUSTOM_OPTIONS;
- gen->short_desc = "GUC placeholder variable";
- gen->flags = GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_CUSTOM_PLACEHOLDER;
- gen->vartype = PGC_STRING;
+ var->context = PGC_USERSET;
+ var->group = CUSTOM_OPTIONS;
+ var->short_desc = "GUC placeholder variable";
+ var->flags = GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_CUSTOM_PLACEHOLDER;
+ var->vartype = PGC_STRING;
/*
* The char* is allocated at the end of the struct since we have no
* 'static' place to point to. Note that the current value, as well as
* the boot and reset values, start out NULL.
*/
- var->variable = (char **) (var + 1);
+ var->_string.variable = (char **) (var + 1);
- if (!add_guc_variable((struct config_generic *) var, elevel))
+ if (!add_guc_variable(var, elevel))
{
- guc_free(unconstify(char *, gen->name));
+ guc_free(unconstify(char *, var->name));
guc_free(var);
return NULL;
}
- return gen;
+ return var;
}
/*
@@ -1384,62 +1316,62 @@ check_GUC_init(const struct config_generic *gconf)
{
case PGC_BOOL:
{
- const struct config_bool *conf = (const struct config_bool *) gconf;
+ const struct config_bool *conf = &gconf->_bool;
if (*conf->variable && !conf->boot_val)
{
elog(LOG, "GUC (PGC_BOOL) %s, boot_val=%d, C-var=%d",
- conf->gen.name, conf->boot_val, *conf->variable);
+ gconf->name, conf->boot_val, *conf->variable);
return false;
}
break;
}
case PGC_INT:
{
- const struct config_int *conf = (const struct config_int *) gconf;
+ const struct config_int *conf = &gconf->_int;
if (*conf->variable != 0 && *conf->variable != conf->boot_val)
{
elog(LOG, "GUC (PGC_INT) %s, boot_val=%d, C-var=%d",
- conf->gen.name, conf->boot_val, *conf->variable);
+ gconf->name, conf->boot_val, *conf->variable);
return false;
}
break;
}
case PGC_REAL:
{
- const struct config_real *conf = (const struct config_real *) gconf;
+ const struct config_real *conf = &gconf->_real;
if (*conf->variable != 0.0 && *conf->variable != conf->boot_val)
{
elog(LOG, "GUC (PGC_REAL) %s, boot_val=%g, C-var=%g",
- conf->gen.name, conf->boot_val, *conf->variable);
+ gconf->name, conf->boot_val, *conf->variable);
return false;
}
break;
}
case PGC_STRING:
{
- const struct config_string *conf = (const struct config_string *) gconf;
+ const struct config_string *conf = &gconf->_string;
if (*conf->variable != NULL &&
(conf->boot_val == NULL ||
strcmp(*conf->variable, conf->boot_val) != 0))
{
elog(LOG, "GUC (PGC_STRING) %s, boot_val=%s, C-var=%s",
- conf->gen.name, conf->boot_val ? conf->boot_val : "<null>", *conf->variable);
+ gconf->name, conf->boot_val ? conf->boot_val : "<null>", *conf->variable);
return false;
}
break;
}
case PGC_ENUM:
{
- const struct config_enum *conf = (const struct config_enum *) gconf;
+ const struct config_enum *conf = &gconf->_enum;
if (*conf->variable != conf->boot_val)
{
elog(LOG, "GUC (PGC_ENUM) %s, boot_val=%d, C-var=%d",
- conf->gen.name, conf->boot_val, *conf->variable);
+ gconf->name, conf->boot_val, *conf->variable);
return false;
}
break;
@@ -1606,13 +1538,13 @@ InitializeOneGUCOption(struct config_generic *gconf)
{
case PGC_BOOL:
{
- struct config_bool *conf = (struct config_bool *) gconf;
+ struct config_bool *conf = &gconf->_bool;
bool newval = conf->boot_val;
- if (!call_bool_check_hook(conf, &newval, &extra,
+ if (!call_bool_check_hook(gconf, &newval, &extra,
PGC_S_DEFAULT, LOG))
elog(FATAL, "failed to initialize %s to %d",
- conf->gen.name, (int) newval);
+ gconf->name, (int) newval);
if (conf->assign_hook)
conf->assign_hook(newval, extra);
*conf->variable = conf->reset_val = newval;
@@ -1620,15 +1552,15 @@ InitializeOneGUCOption(struct config_generic *gconf)
}
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) gconf;
+ struct config_int *conf = &gconf->_int;
int newval = conf->boot_val;
Assert(newval >= conf->min);
Assert(newval <= conf->max);
- if (!call_int_check_hook(conf, &newval, &extra,
+ if (!call_int_check_hook(gconf, &newval, &extra,
PGC_S_DEFAULT, LOG))
elog(FATAL, "failed to initialize %s to %d",
- conf->gen.name, newval);
+ gconf->name, newval);
if (conf->assign_hook)
conf->assign_hook(newval, extra);
*conf->variable = conf->reset_val = newval;
@@ -1636,15 +1568,15 @@ InitializeOneGUCOption(struct config_generic *gconf)
}
case PGC_REAL:
{
- struct config_real *conf = (struct config_real *) gconf;
+ struct config_real *conf = &gconf->_real;
double newval = conf->boot_val;
Assert(newval >= conf->min);
Assert(newval <= conf->max);
- if (!call_real_check_hook(conf, &newval, &extra,
+ if (!call_real_check_hook(gconf, &newval, &extra,
PGC_S_DEFAULT, LOG))
elog(FATAL, "failed to initialize %s to %g",
- conf->gen.name, newval);
+ gconf->name, newval);
if (conf->assign_hook)
conf->assign_hook(newval, extra);
*conf->variable = conf->reset_val = newval;
@@ -1652,7 +1584,7 @@ InitializeOneGUCOption(struct config_generic *gconf)
}
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) gconf;
+ struct config_string *conf = &gconf->_string;
char *newval;
/* non-NULL boot_val must always get strdup'd */
@@ -1661,10 +1593,10 @@ InitializeOneGUCOption(struct config_generic *gconf)
else
newval = NULL;
- if (!call_string_check_hook(conf, &newval, &extra,
+ if (!call_string_check_hook(gconf, &newval, &extra,
PGC_S_DEFAULT, LOG))
elog(FATAL, "failed to initialize %s to \"%s\"",
- conf->gen.name, newval ? newval : "");
+ gconf->name, newval ? newval : "");
if (conf->assign_hook)
conf->assign_hook(newval, extra);
*conf->variable = conf->reset_val = newval;
@@ -1672,13 +1604,13 @@ InitializeOneGUCOption(struct config_generic *gconf)
}
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) gconf;
+ struct config_enum *conf = &gconf->_enum;
int newval = conf->boot_val;
- if (!call_enum_check_hook(conf, &newval, &extra,
+ if (!call_enum_check_hook(gconf, &newval, &extra,
PGC_S_DEFAULT, LOG))
elog(FATAL, "failed to initialize %s to %d",
- conf->gen.name, newval);
+ gconf->name, newval);
if (conf->assign_hook)
conf->assign_hook(newval, extra);
*conf->variable = conf->reset_val = newval;
@@ -1725,7 +1657,7 @@ SelectConfigFiles(const char *userDoption, const char *progname)
char *fname;
bool fname_is_malloced;
struct stat stat_buf;
- struct config_string *data_directory_rec;
+ struct config_generic *data_directory_rec;
/* configdir is -D option, or $PGDATA if no -D */
if (userDoption)
@@ -1805,10 +1737,10 @@ SelectConfigFiles(const char *userDoption, const char *progname)
* Note: SetDataDir will copy and absolute-ize its argument, so we don't
* have to.
*/
- data_directory_rec = (struct config_string *)
+ data_directory_rec =
find_option("data_directory", false, false, PANIC);
- if (*data_directory_rec->variable)
- SetDataDir(*data_directory_rec->variable);
+ if (*data_directory_rec->_string.variable)
+ SetDataDir(*data_directory_rec->_string.variable);
else if (configdir)
SetDataDir(configdir);
else
@@ -1970,62 +1902,62 @@ ResetAllOptions(void)
{
case PGC_BOOL:
{
- struct config_bool *conf = (struct config_bool *) gconf;
+ struct config_bool *conf = &gconf->_bool;
if (conf->assign_hook)
conf->assign_hook(conf->reset_val,
- conf->gen.reset_extra);
+ gconf->reset_extra);
*conf->variable = conf->reset_val;
- set_extra_field(&conf->gen, &conf->gen.extra,
- conf->gen.reset_extra);
+ set_extra_field(gconf, &gconf->extra,
+ gconf->reset_extra);
break;
}
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) gconf;
+ struct config_int *conf = &gconf->_int;
if (conf->assign_hook)
conf->assign_hook(conf->reset_val,
- conf->gen.reset_extra);
+ gconf->reset_extra);
*conf->variable = conf->reset_val;
- set_extra_field(&conf->gen, &conf->gen.extra,
- conf->gen.reset_extra);
+ set_extra_field(gconf, &gconf->extra,
+ gconf->reset_extra);
break;
}
case PGC_REAL:
{
- struct config_real *conf = (struct config_real *) gconf;
+ struct config_real *conf = &gconf->_real;
if (conf->assign_hook)
conf->assign_hook(conf->reset_val,
- conf->gen.reset_extra);
+ gconf->reset_extra);
*conf->variable = conf->reset_val;
- set_extra_field(&conf->gen, &conf->gen.extra,
- conf->gen.reset_extra);
+ set_extra_field(gconf, &gconf->extra,
+ gconf->reset_extra);
break;
}
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) gconf;
+ struct config_string *conf = &gconf->_string;
if (conf->assign_hook)
conf->assign_hook(conf->reset_val,
- conf->gen.reset_extra);
- set_string_field(conf, conf->variable, conf->reset_val);
- set_extra_field(&conf->gen, &conf->gen.extra,
- conf->gen.reset_extra);
+ gconf->reset_extra);
+ set_string_field(gconf, conf->variable, conf->reset_val);
+ set_extra_field(gconf, &gconf->extra,
+ gconf->reset_extra);
break;
}
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) gconf;
+ struct config_enum *conf = &gconf->_enum;
if (conf->assign_hook)
conf->assign_hook(conf->reset_val,
- conf->gen.reset_extra);
+ gconf->reset_extra);
*conf->variable = conf->reset_val;
- set_extra_field(&conf->gen, &conf->gen.extra,
- conf->gen.reset_extra);
+ set_extra_field(gconf, &gconf->extra,
+ gconf->reset_extra);
break;
}
}
@@ -2345,17 +2277,17 @@ AtEOXact_GUC(bool isCommit, int nestLevel)
{
case PGC_BOOL:
{
- struct config_bool *conf = (struct config_bool *) gconf;
+ struct config_bool *conf = &gconf->_bool;
bool newval = newvalue.val.boolval;
void *newextra = newvalue.extra;
if (*conf->variable != newval ||
- conf->gen.extra != newextra)
+ gconf->extra != newextra)
{
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
*conf->variable = newval;
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_extra_field(gconf, &gconf->extra,
newextra);
changed = true;
}
@@ -2363,17 +2295,17 @@ AtEOXact_GUC(bool isCommit, int nestLevel)
}
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) gconf;
+ struct config_int *conf = &gconf->_int;
int newval = newvalue.val.intval;
void *newextra = newvalue.extra;
if (*conf->variable != newval ||
- conf->gen.extra != newextra)
+ gconf->extra != newextra)
{
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
*conf->variable = newval;
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_extra_field(gconf, &gconf->extra,
newextra);
changed = true;
}
@@ -2381,17 +2313,17 @@ AtEOXact_GUC(bool isCommit, int nestLevel)
}
case PGC_REAL:
{
- struct config_real *conf = (struct config_real *) gconf;
+ struct config_real *conf = &gconf->_real;
double newval = newvalue.val.realval;
void *newextra = newvalue.extra;
if (*conf->variable != newval ||
- conf->gen.extra != newextra)
+ gconf->extra != newextra)
{
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
*conf->variable = newval;
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_extra_field(gconf, &gconf->extra,
newextra);
changed = true;
}
@@ -2399,17 +2331,17 @@ AtEOXact_GUC(bool isCommit, int nestLevel)
}
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) gconf;
+ struct config_string *conf = &gconf->_string;
char *newval = newvalue.val.stringval;
void *newextra = newvalue.extra;
if (*conf->variable != newval ||
- conf->gen.extra != newextra)
+ gconf->extra != newextra)
{
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
- set_string_field(conf, conf->variable, newval);
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_string_field(gconf, conf->variable, newval);
+ set_extra_field(gconf, &gconf->extra,
newextra);
changed = true;
}
@@ -2420,23 +2352,23 @@ AtEOXact_GUC(bool isCommit, int nestLevel)
* we have type-specific code anyway, might as
* well inline it.
*/
- set_string_field(conf, &stack->prior.val.stringval, NULL);
- set_string_field(conf, &stack->masked.val.stringval, NULL);
+ set_string_field(gconf, &stack->prior.val.stringval, NULL);
+ set_string_field(gconf, &stack->masked.val.stringval, NULL);
break;
}
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) gconf;
+ struct config_enum *conf = &gconf->_enum;
int newval = newvalue.val.enumval;
void *newextra = newvalue.extra;
if (*conf->variable != newval ||
- conf->gen.extra != newextra)
+ gconf->extra != newextra)
{
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
*conf->variable = newval;
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_extra_field(gconf, &gconf->extra,
newextra);
changed = true;
}
@@ -2959,16 +2891,16 @@ parse_real(const char *value, double *result, int flags, const char **hintmsg)
* allocated for modification.
*/
const char *
-config_enum_lookup_by_value(const struct config_enum *record, int val)
+config_enum_lookup_by_value(const struct config_generic *record, int val)
{
- for (const struct config_enum_entry *entry = record->options; entry && entry->name; entry++)
+ for (const struct config_enum_entry *entry = record->_enum.options; entry && entry->name; entry++)
{
if (entry->val == val)
return entry->name;
}
elog(ERROR, "could not find enum option %d for %s",
- val, record->gen.name);
+ val, record->name);
return NULL; /* silence compiler */
}
@@ -3069,41 +3001,39 @@ parse_and_validate_value(const struct config_generic *record,
{
case PGC_BOOL:
{
- const struct config_bool *conf = (const struct config_bool *) record;
-
if (!parse_bool(value, &newval->boolval))
{
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("parameter \"%s\" requires a Boolean value",
- conf->gen.name)));
+ record->name)));
return false;
}
- if (!call_bool_check_hook(conf, &newval->boolval, newextra,
+ if (!call_bool_check_hook(record, &newval->boolval, newextra,
source, elevel))
return false;
}
break;
case PGC_INT:
{
- const struct config_int *conf = (const struct config_int *) record;
+ const struct config_int *conf = &record->_int;
const char *hintmsg;
if (!parse_int(value, &newval->intval,
- conf->gen.flags, &hintmsg))
+ record->flags, &hintmsg))
{
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid value for parameter \"%s\": \"%s\"",
- conf->gen.name, value),
+ record->name, value),
hintmsg ? errhint("%s", _(hintmsg)) : 0));
return false;
}
if (newval->intval < conf->min || newval->intval > conf->max)
{
- const char *unit = get_config_unit_name(conf->gen.flags);
+ const char *unit = get_config_unit_name(record->flags);
const char *unitspace;
if (unit)
@@ -3115,36 +3045,36 @@ parse_and_validate_value(const struct config_generic *record,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("%d%s%s is outside the valid range for parameter \"%s\" (%d%s%s .. %d%s%s)",
newval->intval, unitspace, unit,
- conf->gen.name,
+ record->name,
conf->min, unitspace, unit,
conf->max, unitspace, unit)));
return false;
}
- if (!call_int_check_hook(conf, &newval->intval, newextra,
+ if (!call_int_check_hook(record, &newval->intval, newextra,
source, elevel))
return false;
}
break;
case PGC_REAL:
{
- const struct config_real *conf = (const struct config_real *) record;
+ const struct config_real *conf = &record->_real;
const char *hintmsg;
if (!parse_real(value, &newval->realval,
- conf->gen.flags, &hintmsg))
+ record->flags, &hintmsg))
{
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid value for parameter \"%s\": \"%s\"",
- conf->gen.name, value),
+ record->name, value),
hintmsg ? errhint("%s", _(hintmsg)) : 0));
return false;
}
if (newval->realval < conf->min || newval->realval > conf->max)
{
- const char *unit = get_config_unit_name(conf->gen.flags);
+ const char *unit = get_config_unit_name(record->flags);
const char *unitspace;
if (unit)
@@ -3156,21 +3086,19 @@ parse_and_validate_value(const struct config_generic *record,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("%g%s%s is outside the valid range for parameter \"%s\" (%g%s%s .. %g%s%s)",
newval->realval, unitspace, unit,
- conf->gen.name,
+ record->name,
conf->min, unitspace, unit,
conf->max, unitspace, unit)));
return false;
}
- if (!call_real_check_hook(conf, &newval->realval, newextra,
+ if (!call_real_check_hook(record, &newval->realval, newextra,
source, elevel))
return false;
}
break;
case PGC_STRING:
{
- const struct config_string *conf = (const struct config_string *) record;
-
/*
* The value passed by the caller could be transient, so we
* always strdup it.
@@ -3183,12 +3111,12 @@ parse_and_validate_value(const struct config_generic *record,
* The only built-in "parsing" check we have is to apply
* truncation if GUC_IS_NAME.
*/
- if (conf->gen.flags & GUC_IS_NAME)
+ if (record->flags & GUC_IS_NAME)
truncate_identifier(newval->stringval,
strlen(newval->stringval),
true);
- if (!call_string_check_hook(conf, &newval->stringval, newextra,
+ if (!call_string_check_hook(record, &newval->stringval, newextra,
source, elevel))
{
guc_free(newval->stringval);
@@ -3199,7 +3127,7 @@ parse_and_validate_value(const struct config_generic *record,
break;
case PGC_ENUM:
{
- const struct config_enum *conf = (const struct config_enum *) record;
+ const struct config_enum *conf = &record->_enum;
if (!config_enum_lookup_by_name(conf, value, &newval->enumval))
{
@@ -3212,7 +3140,7 @@ parse_and_validate_value(const struct config_generic *record,
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid value for parameter \"%s\": \"%s\"",
- conf->gen.name, value),
+ record->name, value),
hintmsg ? errhint("%s", _(hintmsg)) : 0));
if (hintmsg)
@@ -3220,7 +3148,7 @@ parse_and_validate_value(const struct config_generic *record,
return false;
}
- if (!call_enum_check_hook(conf, &newval->enumval, newextra,
+ if (!call_enum_check_hook(record, &newval->enumval, newextra,
source, elevel))
return false;
}
@@ -3638,7 +3566,7 @@ set_config_with_handle(const char *name, config_handle *handle,
{
case PGC_BOOL:
{
- struct config_bool *conf = (struct config_bool *) record;
+ struct config_bool *conf = &record->_bool;
#define newval (newval_union.boolval)
@@ -3652,23 +3580,23 @@ set_config_with_handle(const char *name, config_handle *handle,
else if (source == PGC_S_DEFAULT)
{
newval = conf->boot_val;
- if (!call_bool_check_hook(conf, &newval, &newextra,
+ if (!call_bool_check_hook(record, &newval, &newextra,
source, elevel))
return 0;
}
else
{
newval = conf->reset_val;
- newextra = conf->gen.reset_extra;
- source = conf->gen.reset_source;
- context = conf->gen.reset_scontext;
- srole = conf->gen.reset_srole;
+ newextra = record->reset_extra;
+ source = record->reset_source;
+ context = record->reset_scontext;
+ srole = record->reset_srole;
}
if (prohibitValueChange)
{
/* Release newextra, unless it's reset_extra */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
if (*conf->variable != newval)
@@ -3677,7 +3605,7 @@ set_config_with_handle(const char *name, config_handle *handle,
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
errmsg("parameter \"%s\" cannot be changed without restarting the server",
- conf->gen.name)));
+ record->name)));
return 0;
}
record->status &= ~GUC_PENDING_RESTART;
@@ -3688,34 +3616,34 @@ set_config_with_handle(const char *name, config_handle *handle,
{
/* Save old value to support transaction abort */
if (!makeDefault)
- push_old_value(&conf->gen, action);
+ push_old_value(record, action);
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
*conf->variable = newval;
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_extra_field(record, &record->extra,
newextra);
- set_guc_source(&conf->gen, source);
- conf->gen.scontext = context;
- conf->gen.srole = srole;
+ set_guc_source(record, source);
+ record->scontext = context;
+ record->srole = srole;
}
if (makeDefault)
{
- if (conf->gen.reset_source <= source)
+ if (record->reset_source <= source)
{
conf->reset_val = newval;
- set_extra_field(&conf->gen, &conf->gen.reset_extra,
+ set_extra_field(record, &record->reset_extra,
newextra);
- conf->gen.reset_source = source;
- conf->gen.reset_scontext = context;
- conf->gen.reset_srole = srole;
+ record->reset_source = source;
+ record->reset_scontext = context;
+ record->reset_srole = srole;
}
- for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = record->stack; stack; stack = stack->prev)
{
if (stack->source <= source)
{
stack->prior.val.boolval = newval;
- set_extra_field(&conf->gen, &stack->prior.extra,
+ set_extra_field(record, &stack->prior.extra,
newextra);
stack->source = source;
stack->scontext = context;
@@ -3725,7 +3653,7 @@ set_config_with_handle(const char *name, config_handle *handle,
}
/* Perhaps we didn't install newextra anywhere */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
break;
@@ -3734,7 +3662,7 @@ set_config_with_handle(const char *name, config_handle *handle,
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) record;
+ struct config_int *conf = &record->_int;
#define newval (newval_union.intval)
@@ -3748,23 +3676,23 @@ set_config_with_handle(const char *name, config_handle *handle,
else if (source == PGC_S_DEFAULT)
{
newval = conf->boot_val;
- if (!call_int_check_hook(conf, &newval, &newextra,
+ if (!call_int_check_hook(record, &newval, &newextra,
source, elevel))
return 0;
}
else
{
newval = conf->reset_val;
- newextra = conf->gen.reset_extra;
- source = conf->gen.reset_source;
- context = conf->gen.reset_scontext;
- srole = conf->gen.reset_srole;
+ newextra = record->reset_extra;
+ source = record->reset_source;
+ context = record->reset_scontext;
+ srole = record->reset_srole;
}
if (prohibitValueChange)
{
/* Release newextra, unless it's reset_extra */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
if (*conf->variable != newval)
@@ -3773,7 +3701,7 @@ set_config_with_handle(const char *name, config_handle *handle,
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
errmsg("parameter \"%s\" cannot be changed without restarting the server",
- conf->gen.name)));
+ record->name)));
return 0;
}
record->status &= ~GUC_PENDING_RESTART;
@@ -3784,34 +3712,34 @@ set_config_with_handle(const char *name, config_handle *handle,
{
/* Save old value to support transaction abort */
if (!makeDefault)
- push_old_value(&conf->gen, action);
+ push_old_value(record, action);
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
*conf->variable = newval;
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_extra_field(record, &record->extra,
newextra);
- set_guc_source(&conf->gen, source);
- conf->gen.scontext = context;
- conf->gen.srole = srole;
+ set_guc_source(record, source);
+ record->scontext = context;
+ record->srole = srole;
}
if (makeDefault)
{
- if (conf->gen.reset_source <= source)
+ if (record->reset_source <= source)
{
conf->reset_val = newval;
- set_extra_field(&conf->gen, &conf->gen.reset_extra,
+ set_extra_field(record, &record->reset_extra,
newextra);
- conf->gen.reset_source = source;
- conf->gen.reset_scontext = context;
- conf->gen.reset_srole = srole;
+ record->reset_source = source;
+ record->reset_scontext = context;
+ record->reset_srole = srole;
}
- for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = record->stack; stack; stack = stack->prev)
{
if (stack->source <= source)
{
stack->prior.val.intval = newval;
- set_extra_field(&conf->gen, &stack->prior.extra,
+ set_extra_field(record, &stack->prior.extra,
newextra);
stack->source = source;
stack->scontext = context;
@@ -3821,7 +3749,7 @@ set_config_with_handle(const char *name, config_handle *handle,
}
/* Perhaps we didn't install newextra anywhere */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
break;
@@ -3830,7 +3758,7 @@ set_config_with_handle(const char *name, config_handle *handle,
case PGC_REAL:
{
- struct config_real *conf = (struct config_real *) record;
+ struct config_real *conf = &record->_real;
#define newval (newval_union.realval)
@@ -3844,23 +3772,23 @@ set_config_with_handle(const char *name, config_handle *handle,
else if (source == PGC_S_DEFAULT)
{
newval = conf->boot_val;
- if (!call_real_check_hook(conf, &newval, &newextra,
+ if (!call_real_check_hook(record, &newval, &newextra,
source, elevel))
return 0;
}
else
{
newval = conf->reset_val;
- newextra = conf->gen.reset_extra;
- source = conf->gen.reset_source;
- context = conf->gen.reset_scontext;
- srole = conf->gen.reset_srole;
+ newextra = record->reset_extra;
+ source = record->reset_source;
+ context = record->reset_scontext;
+ srole = record->reset_srole;
}
if (prohibitValueChange)
{
/* Release newextra, unless it's reset_extra */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
if (*conf->variable != newval)
@@ -3869,7 +3797,7 @@ set_config_with_handle(const char *name, config_handle *handle,
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
errmsg("parameter \"%s\" cannot be changed without restarting the server",
- conf->gen.name)));
+ record->name)));
return 0;
}
record->status &= ~GUC_PENDING_RESTART;
@@ -3880,34 +3808,34 @@ set_config_with_handle(const char *name, config_handle *handle,
{
/* Save old value to support transaction abort */
if (!makeDefault)
- push_old_value(&conf->gen, action);
+ push_old_value(record, action);
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
*conf->variable = newval;
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_extra_field(record, &record->extra,
newextra);
- set_guc_source(&conf->gen, source);
- conf->gen.scontext = context;
- conf->gen.srole = srole;
+ set_guc_source(record, source);
+ record->scontext = context;
+ record->srole = srole;
}
if (makeDefault)
{
- if (conf->gen.reset_source <= source)
+ if (record->reset_source <= source)
{
conf->reset_val = newval;
- set_extra_field(&conf->gen, &conf->gen.reset_extra,
+ set_extra_field(record, &record->reset_extra,
newextra);
- conf->gen.reset_source = source;
- conf->gen.reset_scontext = context;
- conf->gen.reset_srole = srole;
+ record->reset_source = source;
+ record->reset_scontext = context;
+ record->reset_srole = srole;
}
- for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = record->stack; stack; stack = stack->prev)
{
if (stack->source <= source)
{
stack->prior.val.realval = newval;
- set_extra_field(&conf->gen, &stack->prior.extra,
+ set_extra_field(record, &stack->prior.extra,
newextra);
stack->source = source;
stack->scontext = context;
@@ -3917,7 +3845,7 @@ set_config_with_handle(const char *name, config_handle *handle,
}
/* Perhaps we didn't install newextra anywhere */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
break;
@@ -3926,7 +3854,7 @@ set_config_with_handle(const char *name, config_handle *handle,
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) record;
+ struct config_string *conf = &record->_string;
GucContext orig_context = context;
GucSource orig_source = source;
Oid orig_srole = srole;
@@ -3952,7 +3880,7 @@ set_config_with_handle(const char *name, config_handle *handle,
else
newval = NULL;
- if (!call_string_check_hook(conf, &newval, &newextra,
+ if (!call_string_check_hook(record, &newval, &newextra,
source, elevel))
{
guc_free(newval);
@@ -3966,10 +3894,10 @@ set_config_with_handle(const char *name, config_handle *handle,
* guc.c's control
*/
newval = conf->reset_val;
- newextra = conf->gen.reset_extra;
- source = conf->gen.reset_source;
- context = conf->gen.reset_scontext;
- srole = conf->gen.reset_srole;
+ newextra = record->reset_extra;
+ source = record->reset_source;
+ context = record->reset_scontext;
+ srole = record->reset_srole;
}
if (prohibitValueChange)
@@ -3982,10 +3910,10 @@ set_config_with_handle(const char *name, config_handle *handle,
strcmp(*conf->variable, newval) != 0);
/* Release newval, unless it's reset_val */
- if (newval && !string_field_used(conf, newval))
+ if (newval && !string_field_used(record, newval))
guc_free(newval);
/* Release newextra, unless it's reset_extra */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
if (newval_different)
@@ -3994,7 +3922,7 @@ set_config_with_handle(const char *name, config_handle *handle,
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
errmsg("parameter \"%s\" cannot be changed without restarting the server",
- conf->gen.name)));
+ record->name)));
return 0;
}
record->status &= ~GUC_PENDING_RESTART;
@@ -4005,16 +3933,16 @@ set_config_with_handle(const char *name, config_handle *handle,
{
/* Save old value to support transaction abort */
if (!makeDefault)
- push_old_value(&conf->gen, action);
+ push_old_value(record, action);
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
- set_string_field(conf, conf->variable, newval);
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_string_field(record, conf->variable, newval);
+ set_extra_field(record, &record->extra,
newextra);
- set_guc_source(&conf->gen, source);
- conf->gen.scontext = context;
- conf->gen.srole = srole;
+ set_guc_source(record, source);
+ record->scontext = context;
+ record->srole = srole;
/*
* Ugly hack: during SET session_authorization, forcibly
@@ -4041,7 +3969,7 @@ set_config_with_handle(const char *name, config_handle *handle,
* that.
*/
if (!is_reload &&
- strcmp(conf->gen.name, "session_authorization") == 0)
+ strcmp(record->name, "session_authorization") == 0)
(void) set_config_with_handle("role", NULL,
value ? "none" : NULL,
orig_context,
@@ -4057,22 +3985,22 @@ set_config_with_handle(const char *name, config_handle *handle,
if (makeDefault)
{
- if (conf->gen.reset_source <= source)
+ if (record->reset_source <= source)
{
- set_string_field(conf, &conf->reset_val, newval);
- set_extra_field(&conf->gen, &conf->gen.reset_extra,
+ set_string_field(record, &conf->reset_val, newval);
+ set_extra_field(record, &record->reset_extra,
newextra);
- conf->gen.reset_source = source;
- conf->gen.reset_scontext = context;
- conf->gen.reset_srole = srole;
+ record->reset_source = source;
+ record->reset_scontext = context;
+ record->reset_srole = srole;
}
- for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = record->stack; stack; stack = stack->prev)
{
if (stack->source <= source)
{
- set_string_field(conf, &stack->prior.val.stringval,
+ set_string_field(record, &stack->prior.val.stringval,
newval);
- set_extra_field(&conf->gen, &stack->prior.extra,
+ set_extra_field(record, &stack->prior.extra,
newextra);
stack->source = source;
stack->scontext = context;
@@ -4082,10 +4010,10 @@ set_config_with_handle(const char *name, config_handle *handle,
}
/* Perhaps we didn't install newval anywhere */
- if (newval && !string_field_used(conf, newval))
+ if (newval && !string_field_used(record, newval))
guc_free(newval);
/* Perhaps we didn't install newextra anywhere */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
break;
@@ -4094,7 +4022,7 @@ set_config_with_handle(const char *name, config_handle *handle,
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) record;
+ struct config_enum *conf = &record->_enum;
#define newval (newval_union.enumval)
@@ -4108,23 +4036,23 @@ set_config_with_handle(const char *name, config_handle *handle,
else if (source == PGC_S_DEFAULT)
{
newval = conf->boot_val;
- if (!call_enum_check_hook(conf, &newval, &newextra,
+ if (!call_enum_check_hook(record, &newval, &newextra,
source, elevel))
return 0;
}
else
{
newval = conf->reset_val;
- newextra = conf->gen.reset_extra;
- source = conf->gen.reset_source;
- context = conf->gen.reset_scontext;
- srole = conf->gen.reset_srole;
+ newextra = record->reset_extra;
+ source = record->reset_source;
+ context = record->reset_scontext;
+ srole = record->reset_srole;
}
if (prohibitValueChange)
{
/* Release newextra, unless it's reset_extra */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
if (*conf->variable != newval)
@@ -4133,7 +4061,7 @@ set_config_with_handle(const char *name, config_handle *handle,
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
errmsg("parameter \"%s\" cannot be changed without restarting the server",
- conf->gen.name)));
+ record->name)));
return 0;
}
record->status &= ~GUC_PENDING_RESTART;
@@ -4144,34 +4072,34 @@ set_config_with_handle(const char *name, config_handle *handle,
{
/* Save old value to support transaction abort */
if (!makeDefault)
- push_old_value(&conf->gen, action);
+ push_old_value(record, action);
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
*conf->variable = newval;
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_extra_field(record, &record->extra,
newextra);
- set_guc_source(&conf->gen, source);
- conf->gen.scontext = context;
- conf->gen.srole = srole;
+ set_guc_source(record, source);
+ record->scontext = context;
+ record->srole = srole;
}
if (makeDefault)
{
- if (conf->gen.reset_source <= source)
+ if (record->reset_source <= source)
{
conf->reset_val = newval;
- set_extra_field(&conf->gen, &conf->gen.reset_extra,
+ set_extra_field(record, &record->reset_extra,
newextra);
- conf->gen.reset_source = source;
- conf->gen.reset_scontext = context;
- conf->gen.reset_srole = srole;
+ record->reset_source = source;
+ record->reset_scontext = context;
+ record->reset_srole = srole;
}
- for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = record->stack; stack; stack = stack->prev)
{
if (stack->source <= source)
{
stack->prior.val.enumval = newval;
- set_extra_field(&conf->gen, &stack->prior.extra,
+ set_extra_field(record, &stack->prior.extra,
newextra);
stack->source = source;
stack->scontext = context;
@@ -4181,7 +4109,7 @@ set_config_with_handle(const char *name, config_handle *handle,
}
/* Perhaps we didn't install newextra anywhere */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
break;
@@ -4295,25 +4223,25 @@ GetConfigOption(const char *name, bool missing_ok, bool restrict_privileged)
switch (record->vartype)
{
case PGC_BOOL:
- return *((struct config_bool *) record)->variable ? "on" : "off";
+ return *record->_bool.variable ? "on" : "off";
case PGC_INT:
snprintf(buffer, sizeof(buffer), "%d",
- *((struct config_int *) record)->variable);
+ *record->_int.variable);
return buffer;
case PGC_REAL:
snprintf(buffer, sizeof(buffer), "%g",
- *((struct config_real *) record)->variable);
+ *record->_real.variable);
return buffer;
case PGC_STRING:
- return *((struct config_string *) record)->variable ?
- *((struct config_string *) record)->variable : "";
+ return *record->_string.variable ?
+ *record->_string.variable : "";
case PGC_ENUM:
- return config_enum_lookup_by_value((struct config_enum *) record,
- *((struct config_enum *) record)->variable);
+ return config_enum_lookup_by_value(record,
+ *record->_enum.variable);
}
return NULL;
}
@@ -4343,25 +4271,25 @@ GetConfigOptionResetString(const char *name)
switch (record->vartype)
{
case PGC_BOOL:
- return ((struct config_bool *) record)->reset_val ? "on" : "off";
+ return record->_bool.reset_val ? "on" : "off";
case PGC_INT:
snprintf(buffer, sizeof(buffer), "%d",
- ((struct config_int *) record)->reset_val);
+ record->_int.reset_val);
return buffer;
case PGC_REAL:
snprintf(buffer, sizeof(buffer), "%g",
- ((struct config_real *) record)->reset_val);
+ record->_real.reset_val);
return buffer;
case PGC_STRING:
- return ((struct config_string *) record)->reset_val ?
- ((struct config_string *) record)->reset_val : "";
+ return record->_string.reset_val ?
+ record->_string.reset_val : "";
case PGC_ENUM:
- return config_enum_lookup_by_value((struct config_enum *) record,
- ((struct config_enum *) record)->reset_val);
+ return config_enum_lookup_by_value(record,
+ record->_enum.reset_val);
}
return NULL;
}
@@ -4801,8 +4729,7 @@ init_custom_variable(const char *name,
const char *long_desc,
GucContext context,
int flags,
- enum config_type type,
- size_t sz)
+ enum config_type type)
{
struct config_generic *gen;
@@ -4838,8 +4765,8 @@ init_custom_variable(const char *name,
context = PGC_SUSET;
/* As above, an OOM here is FATAL */
- gen = (struct config_generic *) guc_malloc(FATAL, sz);
- memset(gen, 0, sz);
+ gen = (struct config_generic *) guc_malloc(FATAL, sizeof(struct config_generic));
+ memset(gen, 0, sizeof(struct config_generic));
gen->name = guc_strdup(FATAL, name);
gen->context = context;
@@ -4861,7 +4788,7 @@ define_custom_variable(struct config_generic *variable)
{
const char *name = variable->name;
GUCHashEntry *hentry;
- struct config_string *pHolder;
+ struct config_generic *pHolder;
/* Check mapping between initial and default value */
Assert(check_GUC_init(variable));
@@ -4893,7 +4820,7 @@ define_custom_variable(struct config_generic *variable)
errmsg("attempt to redefine parameter \"%s\"", name)));
Assert(hentry->gucvar->vartype == PGC_STRING);
- pHolder = (struct config_string *) hentry->gucvar;
+ pHolder = hentry->gucvar;
/*
* First, set the variable to its default value. We must do this even
@@ -4912,7 +4839,7 @@ define_custom_variable(struct config_generic *variable)
/*
* Remove the placeholder from any lists it's in, too.
*/
- RemoveGUCFromLists(&pHolder->gen);
+ RemoveGUCFromLists(pHolder);
/*
* Assign the string value(s) stored in the placeholder to the real
@@ -4926,25 +4853,25 @@ define_custom_variable(struct config_generic *variable)
*/
/* First, apply the reset value if any */
- if (pHolder->reset_val)
- (void) set_config_option_ext(name, pHolder->reset_val,
- pHolder->gen.reset_scontext,
- pHolder->gen.reset_source,
- pHolder->gen.reset_srole,
+ if (pHolder->_string.reset_val)
+ (void) set_config_option_ext(name, pHolder->_string.reset_val,
+ pHolder->reset_scontext,
+ pHolder->reset_source,
+ pHolder->reset_srole,
GUC_ACTION_SET, true, WARNING, false);
/* That should not have resulted in stacking anything */
Assert(variable->stack == NULL);
/* Now, apply current and stacked values, in the order they were stacked */
- reapply_stacked_values(variable, pHolder, pHolder->gen.stack,
- *(pHolder->variable),
- pHolder->gen.scontext, pHolder->gen.source,
- pHolder->gen.srole);
+ reapply_stacked_values(variable, pHolder, pHolder->stack,
+ *(pHolder->_string.variable),
+ pHolder->scontext, pHolder->source,
+ pHolder->srole);
/* Also copy over any saved source-location information */
- if (pHolder->gen.sourcefile)
- set_config_sourcefile(name, pHolder->gen.sourcefile,
- pHolder->gen.sourceline);
+ if (pHolder->sourcefile)
+ set_config_sourcefile(name, pHolder->sourcefile,
+ pHolder->sourceline);
/* Now we can free the no-longer-referenced placeholder variable */
free_placeholder(pHolder);
@@ -4959,7 +4886,7 @@ define_custom_variable(struct config_generic *variable)
*/
static void
reapply_stacked_values(struct config_generic *variable,
- struct config_string *pHolder,
+ struct config_generic *pHolder,
GucStack *stack,
const char *curvalue,
GucContext curscontext, GucSource cursource,
@@ -5029,10 +4956,10 @@ reapply_stacked_values(struct config_generic *variable,
* this is to be just a transactional assignment. (We leak the stack
* entry.)
*/
- if (curvalue != pHolder->reset_val ||
- curscontext != pHolder->gen.reset_scontext ||
- cursource != pHolder->gen.reset_source ||
- cursrole != pHolder->gen.reset_srole)
+ if (curvalue != pHolder->_string.reset_val ||
+ curscontext != pHolder->reset_scontext ||
+ cursource != pHolder->reset_source ||
+ cursrole != pHolder->reset_srole)
{
(void) set_config_option_ext(name, curvalue,
curscontext, cursource, cursrole,
@@ -5054,14 +4981,14 @@ reapply_stacked_values(struct config_generic *variable,
* doesn't seem worth spending much code on.
*/
static void
-free_placeholder(struct config_string *pHolder)
+free_placeholder(struct config_generic *pHolder)
{
/* Placeholders are always STRING type, so free their values */
- Assert(pHolder->gen.vartype == PGC_STRING);
- set_string_field(pHolder, pHolder->variable, NULL);
- set_string_field(pHolder, &pHolder->reset_val, NULL);
+ Assert(pHolder->vartype == PGC_STRING);
+ set_string_field(pHolder, pHolder->_string.variable, NULL);
+ set_string_field(pHolder, &pHolder->_string.reset_val, NULL);
- guc_free(unconstify(char *, pHolder->gen.name));
+ guc_free(unconstify(char *, pHolder->name));
guc_free(pHolder);
}
@@ -5080,18 +5007,16 @@ DefineCustomBoolVariable(const char *name,
GucBoolAssignHook assign_hook,
GucShowHook show_hook)
{
- struct config_bool *var;
-
- var = (struct config_bool *)
- init_custom_variable(name, short_desc, long_desc, context, flags,
- PGC_BOOL, sizeof(struct config_bool));
- var->variable = valueAddr;
- var->boot_val = bootValue;
- var->reset_val = bootValue;
- var->check_hook = check_hook;
- var->assign_hook = assign_hook;
- var->show_hook = show_hook;
- define_custom_variable(&var->gen);
+ struct config_generic *var;
+
+ var = init_custom_variable(name, short_desc, long_desc, context, flags, PGC_BOOL);
+ var->_bool.variable = valueAddr;
+ var->_bool.boot_val = bootValue;
+ var->_bool.reset_val = bootValue;
+ var->_bool.check_hook = check_hook;
+ var->_bool.assign_hook = assign_hook;
+ var->_bool.show_hook = show_hook;
+ define_custom_variable(var);
}
void
@@ -5108,20 +5033,18 @@ DefineCustomIntVariable(const char *name,
GucIntAssignHook assign_hook,
GucShowHook show_hook)
{
- struct config_int *var;
-
- var = (struct config_int *)
- init_custom_variable(name, short_desc, long_desc, context, flags,
- PGC_INT, sizeof(struct config_int));
- var->variable = valueAddr;
- var->boot_val = bootValue;
- var->reset_val = bootValue;
- var->min = minValue;
- var->max = maxValue;
- var->check_hook = check_hook;
- var->assign_hook = assign_hook;
- var->show_hook = show_hook;
- define_custom_variable(&var->gen);
+ struct config_generic *var;
+
+ var = init_custom_variable(name, short_desc, long_desc, context, flags, PGC_INT);
+ var->_int.variable = valueAddr;
+ var->_int.boot_val = bootValue;
+ var->_int.reset_val = bootValue;
+ var->_int.min = minValue;
+ var->_int.max = maxValue;
+ var->_int.check_hook = check_hook;
+ var->_int.assign_hook = assign_hook;
+ var->_int.show_hook = show_hook;
+ define_custom_variable(var);
}
void
@@ -5138,20 +5061,18 @@ DefineCustomRealVariable(const char *name,
GucRealAssignHook assign_hook,
GucShowHook show_hook)
{
- struct config_real *var;
-
- var = (struct config_real *)
- init_custom_variable(name, short_desc, long_desc, context, flags,
- PGC_REAL, sizeof(struct config_real));
- var->variable = valueAddr;
- var->boot_val = bootValue;
- var->reset_val = bootValue;
- var->min = minValue;
- var->max = maxValue;
- var->check_hook = check_hook;
- var->assign_hook = assign_hook;
- var->show_hook = show_hook;
- define_custom_variable(&var->gen);
+ struct config_generic *var;
+
+ var = init_custom_variable(name, short_desc, long_desc, context, flags, PGC_REAL);
+ var->_real.variable = valueAddr;
+ var->_real.boot_val = bootValue;
+ var->_real.reset_val = bootValue;
+ var->_real.min = minValue;
+ var->_real.max = maxValue;
+ var->_real.check_hook = check_hook;
+ var->_real.assign_hook = assign_hook;
+ var->_real.show_hook = show_hook;
+ define_custom_variable(var);
}
void
@@ -5166,17 +5087,15 @@ DefineCustomStringVariable(const char *name,
GucStringAssignHook assign_hook,
GucShowHook show_hook)
{
- struct config_string *var;
-
- var = (struct config_string *)
- init_custom_variable(name, short_desc, long_desc, context, flags,
- PGC_STRING, sizeof(struct config_string));
- var->variable = valueAddr;
- var->boot_val = bootValue;
- var->check_hook = check_hook;
- var->assign_hook = assign_hook;
- var->show_hook = show_hook;
- define_custom_variable(&var->gen);
+ struct config_generic *var;
+
+ var = init_custom_variable(name, short_desc, long_desc, context, flags, PGC_STRING);
+ var->_string.variable = valueAddr;
+ var->_string.boot_val = bootValue;
+ var->_string.check_hook = check_hook;
+ var->_string.assign_hook = assign_hook;
+ var->_string.show_hook = show_hook;
+ define_custom_variable(var);
}
void
@@ -5192,19 +5111,17 @@ DefineCustomEnumVariable(const char *name,
GucEnumAssignHook assign_hook,
GucShowHook show_hook)
{
- struct config_enum *var;
-
- var = (struct config_enum *)
- init_custom_variable(name, short_desc, long_desc, context, flags,
- PGC_ENUM, sizeof(struct config_enum));
- var->variable = valueAddr;
- var->boot_val = bootValue;
- var->reset_val = bootValue;
- var->options = options;
- var->check_hook = check_hook;
- var->assign_hook = assign_hook;
- var->show_hook = show_hook;
- define_custom_variable(&var->gen);
+ struct config_generic *var;
+
+ var = init_custom_variable(name, short_desc, long_desc, context, flags, PGC_ENUM);
+ var->_enum.variable = valueAddr;
+ var->_enum.boot_val = bootValue;
+ var->_enum.reset_val = bootValue;
+ var->_enum.options = options;
+ var->_enum.check_hook = check_hook;
+ var->_enum.assign_hook = assign_hook;
+ var->_enum.show_hook = show_hook;
+ define_custom_variable(var);
}
/*
@@ -5250,7 +5167,7 @@ MarkGUCPrefixReserved(const char *className)
/* Remove it from any lists it's in, too */
RemoveGUCFromLists(var);
/* And free it */
- free_placeholder((struct config_string *) var);
+ free_placeholder(var);
}
}
@@ -5303,7 +5220,7 @@ get_explain_guc_options(int *num)
{
case PGC_BOOL:
{
- struct config_bool *lconf = (struct config_bool *) conf;
+ struct config_bool *lconf = &conf->_bool;
modified = (lconf->boot_val != *(lconf->variable));
}
@@ -5311,7 +5228,7 @@ get_explain_guc_options(int *num)
case PGC_INT:
{
- struct config_int *lconf = (struct config_int *) conf;
+ struct config_int *lconf = &conf->_int;
modified = (lconf->boot_val != *(lconf->variable));
}
@@ -5319,7 +5236,7 @@ get_explain_guc_options(int *num)
case PGC_REAL:
{
- struct config_real *lconf = (struct config_real *) conf;
+ struct config_real *lconf = &conf->_real;
modified = (lconf->boot_val != *(lconf->variable));
}
@@ -5327,7 +5244,7 @@ get_explain_guc_options(int *num)
case PGC_STRING:
{
- struct config_string *lconf = (struct config_string *) conf;
+ struct config_string *lconf = &conf->_string;
if (lconf->boot_val == NULL &&
*lconf->variable == NULL)
@@ -5342,7 +5259,7 @@ get_explain_guc_options(int *num)
case PGC_ENUM:
{
- struct config_enum *lconf = (struct config_enum *) conf;
+ struct config_enum *lconf = &conf->_enum;
modified = (lconf->boot_val != *(lconf->variable));
}
@@ -5411,7 +5328,7 @@ ShowGUCOption(const struct config_generic *record, bool use_units)
{
case PGC_BOOL:
{
- const struct config_bool *conf = (const struct config_bool *) record;
+ const struct config_bool *conf = &record->_bool;
if (conf->show_hook)
val = conf->show_hook();
@@ -5422,7 +5339,7 @@ ShowGUCOption(const struct config_generic *record, bool use_units)
case PGC_INT:
{
- const struct config_int *conf = (const struct config_int *) record;
+ const struct config_int *conf = &record->_int;
if (conf->show_hook)
val = conf->show_hook();
@@ -5451,7 +5368,7 @@ ShowGUCOption(const struct config_generic *record, bool use_units)
case PGC_REAL:
{
- const struct config_real *conf = (const struct config_real *) record;
+ const struct config_real *conf = &record->_real;
if (conf->show_hook)
val = conf->show_hook();
@@ -5476,7 +5393,7 @@ ShowGUCOption(const struct config_generic *record, bool use_units)
case PGC_STRING:
{
- const struct config_string *conf = (const struct config_string *) record;
+ const struct config_string *conf = &record->_string;
if (conf->show_hook)
val = conf->show_hook();
@@ -5489,12 +5406,12 @@ ShowGUCOption(const struct config_generic *record, bool use_units)
case PGC_ENUM:
{
- const struct config_enum *conf = (const struct config_enum *) record;
+ const struct config_enum *conf = &record->_enum;
if (conf->show_hook)
val = conf->show_hook();
else
- val = config_enum_lookup_by_value(conf, *conf->variable);
+ val = config_enum_lookup_by_value(record, *conf->variable);
}
break;
@@ -5534,7 +5451,7 @@ write_one_nondefault_variable(FILE *fp, struct config_generic *gconf)
{
case PGC_BOOL:
{
- struct config_bool *conf = (struct config_bool *) gconf;
+ struct config_bool *conf = &gconf->_bool;
if (*conf->variable)
fprintf(fp, "true");
@@ -5545,7 +5462,7 @@ write_one_nondefault_variable(FILE *fp, struct config_generic *gconf)
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) gconf;
+ struct config_int *conf = &gconf->_int;
fprintf(fp, "%d", *conf->variable);
}
@@ -5553,7 +5470,7 @@ write_one_nondefault_variable(FILE *fp, struct config_generic *gconf)
case PGC_REAL:
{
- struct config_real *conf = (struct config_real *) gconf;
+ struct config_real *conf = &gconf->_real;
fprintf(fp, "%.17g", *conf->variable);
}
@@ -5561,7 +5478,7 @@ write_one_nondefault_variable(FILE *fp, struct config_generic *gconf)
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) gconf;
+ struct config_string *conf = &gconf->_string;
if (*conf->variable)
fprintf(fp, "%s", *conf->variable);
@@ -5570,10 +5487,10 @@ write_one_nondefault_variable(FILE *fp, struct config_generic *gconf)
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) gconf;
+ struct config_enum *conf = &gconf->_enum;
fprintf(fp, "%s",
- config_enum_lookup_by_value(conf, *conf->variable));
+ config_enum_lookup_by_value(gconf, *conf->variable));
}
break;
}
@@ -5808,7 +5725,7 @@ estimate_variable_size(struct config_generic *gconf)
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) gconf;
+ struct config_int *conf = &gconf->_int;
/*
* Instead of getting the exact display length, use max
@@ -5837,7 +5754,7 @@ estimate_variable_size(struct config_generic *gconf)
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) gconf;
+ struct config_string *conf = &gconf->_string;
/*
* If the value is NULL, we transmit it as an empty string.
@@ -5853,9 +5770,9 @@ estimate_variable_size(struct config_generic *gconf)
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) gconf;
+ struct config_enum *conf = &gconf->_enum;
- valsize = strlen(config_enum_lookup_by_value(conf, *conf->variable));
+ valsize = strlen(config_enum_lookup_by_value(gconf, *conf->variable));
}
break;
}
@@ -5974,7 +5891,7 @@ serialize_variable(char **destptr, Size *maxbytes,
{
case PGC_BOOL:
{
- struct config_bool *conf = (struct config_bool *) gconf;
+ struct config_bool *conf = &gconf->_bool;
do_serialize(destptr, maxbytes,
(*conf->variable ? "true" : "false"));
@@ -5983,7 +5900,7 @@ serialize_variable(char **destptr, Size *maxbytes,
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) gconf;
+ struct config_int *conf = &gconf->_int;
do_serialize(destptr, maxbytes, "%d", *conf->variable);
}
@@ -5991,7 +5908,7 @@ serialize_variable(char **destptr, Size *maxbytes,
case PGC_REAL:
{
- struct config_real *conf = (struct config_real *) gconf;
+ struct config_real *conf = &gconf->_real;
do_serialize(destptr, maxbytes, "%.*e",
REALTYPE_PRECISION, *conf->variable);
@@ -6000,7 +5917,7 @@ serialize_variable(char **destptr, Size *maxbytes,
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) gconf;
+ struct config_string *conf = &gconf->_string;
/* NULL becomes empty string, see estimate_variable_size() */
do_serialize(destptr, maxbytes, "%s",
@@ -6010,10 +5927,10 @@ serialize_variable(char **destptr, Size *maxbytes,
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) gconf;
+ struct config_enum *conf = &gconf->_enum;
do_serialize(destptr, maxbytes, "%s",
- config_enum_lookup_by_value(conf, *conf->variable));
+ config_enum_lookup_by_value(gconf, *conf->variable));
}
break;
}
@@ -6198,7 +6115,7 @@ RestoreGUCState(void *gucstate)
break;
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) gconf;
+ struct config_string *conf = &gconf->_string;
guc_free(*conf->variable);
if (conf->reset_val && conf->reset_val != *conf->variable)
@@ -6709,11 +6626,11 @@ GUC_check_errcode(int sqlerrcode)
*/
static bool
-call_bool_check_hook(const struct config_bool *conf, bool *newval, void **extra,
+call_bool_check_hook(const struct config_generic *conf, bool *newval, void **extra,
GucSource source, int elevel)
{
/* Quick success if no hook */
- if (!conf->check_hook)
+ if (!conf->_bool.check_hook)
return true;
/* Reset variables that might be set by hook */
@@ -6722,14 +6639,14 @@ call_bool_check_hook(const struct config_bool *conf, bool *newval, void **extra,
GUC_check_errdetail_string = NULL;
GUC_check_errhint_string = NULL;
- if (!conf->check_hook(newval, extra, source))
+ if (!conf->_bool.check_hook(newval, extra, source))
{
ereport(elevel,
(errcode(GUC_check_errcode_value),
GUC_check_errmsg_string ?
errmsg_internal("%s", GUC_check_errmsg_string) :
errmsg("invalid value for parameter \"%s\": %d",
- conf->gen.name, (int) *newval),
+ conf->name, (int) *newval),
GUC_check_errdetail_string ?
errdetail_internal("%s", GUC_check_errdetail_string) : 0,
GUC_check_errhint_string ?
@@ -6743,11 +6660,11 @@ call_bool_check_hook(const struct config_bool *conf, bool *newval, void **extra,
}
static bool
-call_int_check_hook(const struct config_int *conf, int *newval, void **extra,
+call_int_check_hook(const struct config_generic *conf, int *newval, void **extra,
GucSource source, int elevel)
{
/* Quick success if no hook */
- if (!conf->check_hook)
+ if (!conf->_int.check_hook)
return true;
/* Reset variables that might be set by hook */
@@ -6756,14 +6673,14 @@ call_int_check_hook(const struct config_int *conf, int *newval, void **extra,
GUC_check_errdetail_string = NULL;
GUC_check_errhint_string = NULL;
- if (!conf->check_hook(newval, extra, source))
+ if (!conf->_int.check_hook(newval, extra, source))
{
ereport(elevel,
(errcode(GUC_check_errcode_value),
GUC_check_errmsg_string ?
errmsg_internal("%s", GUC_check_errmsg_string) :
errmsg("invalid value for parameter \"%s\": %d",
- conf->gen.name, *newval),
+ conf->name, *newval),
GUC_check_errdetail_string ?
errdetail_internal("%s", GUC_check_errdetail_string) : 0,
GUC_check_errhint_string ?
@@ -6777,11 +6694,11 @@ call_int_check_hook(const struct config_int *conf, int *newval, void **extra,
}
static bool
-call_real_check_hook(const struct config_real *conf, double *newval, void **extra,
+call_real_check_hook(const struct config_generic *conf, double *newval, void **extra,
GucSource source, int elevel)
{
/* Quick success if no hook */
- if (!conf->check_hook)
+ if (!conf->_real.check_hook)
return true;
/* Reset variables that might be set by hook */
@@ -6790,14 +6707,14 @@ call_real_check_hook(const struct config_real *conf, double *newval, void **extr
GUC_check_errdetail_string = NULL;
GUC_check_errhint_string = NULL;
- if (!conf->check_hook(newval, extra, source))
+ if (!conf->_real.check_hook(newval, extra, source))
{
ereport(elevel,
(errcode(GUC_check_errcode_value),
GUC_check_errmsg_string ?
errmsg_internal("%s", GUC_check_errmsg_string) :
errmsg("invalid value for parameter \"%s\": %g",
- conf->gen.name, *newval),
+ conf->name, *newval),
GUC_check_errdetail_string ?
errdetail_internal("%s", GUC_check_errdetail_string) : 0,
GUC_check_errhint_string ?
@@ -6811,13 +6728,13 @@ call_real_check_hook(const struct config_real *conf, double *newval, void **extr
}
static bool
-call_string_check_hook(const struct config_string *conf, char **newval, void **extra,
+call_string_check_hook(const struct config_generic *conf, char **newval, void **extra,
GucSource source, int elevel)
{
volatile bool result = true;
/* Quick success if no hook */
- if (!conf->check_hook)
+ if (!conf->_string.check_hook)
return true;
/*
@@ -6833,14 +6750,14 @@ call_string_check_hook(const struct config_string *conf, char **newval, void **e
GUC_check_errdetail_string = NULL;
GUC_check_errhint_string = NULL;
- if (!conf->check_hook(newval, extra, source))
+ if (!conf->_string.check_hook(newval, extra, source))
{
ereport(elevel,
(errcode(GUC_check_errcode_value),
GUC_check_errmsg_string ?
errmsg_internal("%s", GUC_check_errmsg_string) :
errmsg("invalid value for parameter \"%s\": \"%s\"",
- conf->gen.name, *newval ? *newval : ""),
+ conf->name, *newval ? *newval : ""),
GUC_check_errdetail_string ?
errdetail_internal("%s", GUC_check_errdetail_string) : 0,
GUC_check_errhint_string ?
@@ -6861,11 +6778,11 @@ call_string_check_hook(const struct config_string *conf, char **newval, void **e
}
static bool
-call_enum_check_hook(const struct config_enum *conf, int *newval, void **extra,
+call_enum_check_hook(const struct config_generic *conf, int *newval, void **extra,
GucSource source, int elevel)
{
/* Quick success if no hook */
- if (!conf->check_hook)
+ if (!conf->_enum.check_hook)
return true;
/* Reset variables that might be set by hook */
@@ -6874,14 +6791,14 @@ call_enum_check_hook(const struct config_enum *conf, int *newval, void **extra,
GUC_check_errdetail_string = NULL;
GUC_check_errhint_string = NULL;
- if (!conf->check_hook(newval, extra, source))
+ if (!conf->_enum.check_hook(newval, extra, source))
{
ereport(elevel,
(errcode(GUC_check_errcode_value),
GUC_check_errmsg_string ?
errmsg_internal("%s", GUC_check_errmsg_string) :
errmsg("invalid value for parameter \"%s\": \"%s\"",
- conf->gen.name,
+ conf->name,
config_enum_lookup_by_value(conf, *newval)),
GUC_check_errdetail_string ?
errdetail_internal("%s", GUC_check_errdetail_string) : 0,
diff --git a/src/backend/utils/misc/guc_funcs.c b/src/backend/utils/misc/guc_funcs.c
index d7a822e1462..4f58fa3d4e0 100644
--- a/src/backend/utils/misc/guc_funcs.c
+++ b/src/backend/utils/misc/guc_funcs.c
@@ -629,7 +629,7 @@ GetConfigOptionValues(const struct config_generic *conf, const char **values)
{
case PGC_BOOL:
{
- const struct config_bool *lconf = (const struct config_bool *) conf;
+ const struct config_bool *lconf = &conf->_bool;
/* min_val */
values[9] = NULL;
@@ -650,7 +650,7 @@ GetConfigOptionValues(const struct config_generic *conf, const char **values)
case PGC_INT:
{
- const struct config_int *lconf = (const struct config_int *) conf;
+ const struct config_int *lconf = &conf->_int;
/* min_val */
snprintf(buffer, sizeof(buffer), "%d", lconf->min);
@@ -675,7 +675,7 @@ GetConfigOptionValues(const struct config_generic *conf, const char **values)
case PGC_REAL:
{
- const struct config_real *lconf = (const struct config_real *) conf;
+ const struct config_real *lconf = &conf->_real;
/* min_val */
snprintf(buffer, sizeof(buffer), "%g", lconf->min);
@@ -700,7 +700,7 @@ GetConfigOptionValues(const struct config_generic *conf, const char **values)
case PGC_STRING:
{
- const struct config_string *lconf = (const struct config_string *) conf;
+ const struct config_string *lconf = &conf->_string;
/* min_val */
values[9] = NULL;
@@ -727,7 +727,7 @@ GetConfigOptionValues(const struct config_generic *conf, const char **values)
case PGC_ENUM:
{
- const struct config_enum *lconf = (const struct config_enum *) conf;
+ const struct config_enum *lconf = &conf->_enum;
/* min_val */
values[9] = NULL;
@@ -745,11 +745,11 @@ GetConfigOptionValues(const struct config_generic *conf, const char **values)
"{\"", "\"}", "\",\"");
/* boot_val */
- values[12] = pstrdup(config_enum_lookup_by_value(lconf,
+ values[12] = pstrdup(config_enum_lookup_by_value(conf,
lconf->boot_val));
/* reset_val */
- values[13] = pstrdup(config_enum_lookup_by_value(lconf,
+ values[13] = pstrdup(config_enum_lookup_by_value(conf,
lconf->reset_val));
}
break;
diff --git a/src/backend/utils/misc/help_config.c b/src/backend/utils/misc/help_config.c
index 86812ac881f..2810715693c 100644
--- a/src/backend/utils/misc/help_config.c
+++ b/src/backend/utils/misc/help_config.c
@@ -23,23 +23,8 @@
#include "utils/help_config.h"
-/*
- * This union allows us to mix the numerous different types of structs
- * that we are organizing.
- */
-typedef union
-{
- struct config_generic generic;
- struct config_bool _bool;
- struct config_real real;
- struct config_int integer;
- struct config_string string;
- struct config_enum _enum;
-} mixedStruct;
-
-
-static void printMixedStruct(mixedStruct *structToPrint);
-static bool displayStruct(mixedStruct *structToDisplay);
+static void printMixedStruct(const struct config_generic *structToPrint);
+static bool displayStruct(const struct config_generic *structToDisplay);
void
@@ -55,7 +40,7 @@ GucInfoMain(void)
for (int i = 0; i < numOpts; i++)
{
- mixedStruct *var = (mixedStruct *) guc_vars[i];
+ const struct config_generic *var = guc_vars[i];
if (displayStruct(var))
printMixedStruct(var);
@@ -70,11 +55,11 @@ GucInfoMain(void)
* should be displayed to the user.
*/
static bool
-displayStruct(mixedStruct *structToDisplay)
+displayStruct(const struct config_generic *structToDisplay)
{
- return !(structToDisplay->generic.flags & (GUC_NO_SHOW_ALL |
- GUC_NOT_IN_SAMPLE |
- GUC_DISALLOW_IN_FILE));
+ return !(structToDisplay->flags & (GUC_NO_SHOW_ALL |
+ GUC_NOT_IN_SAMPLE |
+ GUC_DISALLOW_IN_FILE));
}
@@ -83,14 +68,14 @@ displayStruct(mixedStruct *structToDisplay)
* a different format, depending on what the user wants to see.
*/
static void
-printMixedStruct(mixedStruct *structToPrint)
+printMixedStruct(const struct config_generic *structToPrint)
{
printf("%s\t%s\t%s\t",
- structToPrint->generic.name,
- GucContext_Names[structToPrint->generic.context],
- _(config_group_names[structToPrint->generic.group]));
+ structToPrint->name,
+ GucContext_Names[structToPrint->context],
+ _(config_group_names[structToPrint->group]));
- switch (structToPrint->generic.vartype)
+ switch (structToPrint->vartype)
{
case PGC_BOOL:
@@ -101,26 +86,26 @@ printMixedStruct(mixedStruct *structToPrint)
case PGC_INT:
printf("INTEGER\t%d\t%d\t%d\t",
- structToPrint->integer.reset_val,
- structToPrint->integer.min,
- structToPrint->integer.max);
+ structToPrint->_int.reset_val,
+ structToPrint->_int.min,
+ structToPrint->_int.max);
break;
case PGC_REAL:
printf("REAL\t%g\t%g\t%g\t",
- structToPrint->real.reset_val,
- structToPrint->real.min,
- structToPrint->real.max);
+ structToPrint->_real.reset_val,
+ structToPrint->_real.min,
+ structToPrint->_real.max);
break;
case PGC_STRING:
printf("STRING\t%s\t\t\t",
- structToPrint->string.boot_val ? structToPrint->string.boot_val : "");
+ structToPrint->_string.boot_val ? structToPrint->_string.boot_val : "");
break;
case PGC_ENUM:
printf("ENUM\t%s\t\t\t",
- config_enum_lookup_by_value(&structToPrint->_enum,
+ config_enum_lookup_by_value(structToPrint,
structToPrint->_enum.boot_val));
break;
@@ -130,6 +115,6 @@ printMixedStruct(mixedStruct *structToPrint)
}
printf("%s\t%s\n",
- (structToPrint->generic.short_desc == NULL) ? "" : _(structToPrint->generic.short_desc),
- (structToPrint->generic.long_desc == NULL) ? "" : _(structToPrint->generic.long_desc));
+ (structToPrint->short_desc == NULL) ? "" : _(structToPrint->short_desc),
+ (structToPrint->long_desc == NULL) ? "" : _(structToPrint->long_desc));
}
diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h
index 3de3d809545..bbfcc633014 100644
--- a/src/include/utils/guc_tables.h
+++ b/src/include/utils/guc_tables.h
@@ -132,6 +132,84 @@ typedef struct guc_stack
config_var_value masked; /* SET value in a GUC_SET_LOCAL entry */
} GucStack;
+
+/* GUC records for specific variable types */
+
+struct config_bool
+{
+ /* constant fields, must be set correctly in initial value: */
+ bool *variable;
+ bool boot_val;
+ GucBoolCheckHook check_hook;
+ GucBoolAssignHook assign_hook;
+ GucShowHook show_hook;
+ /* variable fields, initialized at runtime: */
+ bool reset_val;
+};
+
+struct config_int
+{
+ /* constant fields, must be set correctly in initial value: */
+ int *variable;
+ int boot_val;
+ int min;
+ int max;
+ GucIntCheckHook check_hook;
+ GucIntAssignHook assign_hook;
+ GucShowHook show_hook;
+ /* variable fields, initialized at runtime: */
+ int reset_val;
+};
+
+struct config_real
+{
+ /* constant fields, must be set correctly in initial value: */
+ double *variable;
+ double boot_val;
+ double min;
+ double max;
+ GucRealCheckHook check_hook;
+ GucRealAssignHook assign_hook;
+ GucShowHook show_hook;
+ /* variable fields, initialized at runtime: */
+ double reset_val;
+};
+
+/*
+ * A note about string GUCs: the boot_val is allowed to be NULL, which leads
+ * to the reset_val and the actual variable value (*variable) also being NULL.
+ * However, there is no way to set a NULL value subsequently using
+ * set_config_option or any other GUC API. Also, GUC APIs such as SHOW will
+ * display a NULL value as an empty string. Callers that choose to use a NULL
+ * boot_val should overwrite the setting later in startup, or else be careful
+ * that NULL doesn't have semantics that are visibly different from an empty
+ * string.
+ */
+struct config_string
+{
+ /* constant fields, must be set correctly in initial value: */
+ char **variable;
+ const char *boot_val;
+ GucStringCheckHook check_hook;
+ GucStringAssignHook assign_hook;
+ GucShowHook show_hook;
+ /* variable fields, initialized at runtime: */
+ char *reset_val;
+};
+
+struct config_enum
+{
+ /* constant fields, must be set correctly in initial value: */
+ int *variable;
+ int boot_val;
+ const struct config_enum_entry *options;
+ GucEnumCheckHook check_hook;
+ GucEnumAssignHook assign_hook;
+ GucShowHook show_hook;
+ /* variable fields, initialized at runtime: */
+ int reset_val;
+};
+
/*
* Generic fields applicable to all types of variables
*
@@ -200,6 +278,16 @@ struct config_generic
char *sourcefile; /* file current setting is from (NULL if not
* set in config file) */
int sourceline; /* line in source file */
+
+ /* fields for specific variable types */
+ union
+ {
+ struct config_bool _bool;
+ struct config_int _int;
+ struct config_real _real;
+ struct config_string _string;
+ struct config_enum _enum;
+ };
};
/* bit values in status field */
@@ -212,100 +300,14 @@ struct config_generic
#define GUC_NEEDS_REPORT 0x0004 /* new value must be reported to client */
-/* GUC records for specific variable types */
-
-struct config_bool
-{
- struct config_generic gen;
- /* constant fields, must be set correctly in initial value: */
- bool *variable;
- bool boot_val;
- GucBoolCheckHook check_hook;
- GucBoolAssignHook assign_hook;
- GucShowHook show_hook;
- /* variable fields, initialized at runtime: */
- bool reset_val;
-};
-
-struct config_int
-{
- struct config_generic gen;
- /* constant fields, must be set correctly in initial value: */
- int *variable;
- int boot_val;
- int min;
- int max;
- GucIntCheckHook check_hook;
- GucIntAssignHook assign_hook;
- GucShowHook show_hook;
- /* variable fields, initialized at runtime: */
- int reset_val;
-};
-
-struct config_real
-{
- struct config_generic gen;
- /* constant fields, must be set correctly in initial value: */
- double *variable;
- double boot_val;
- double min;
- double max;
- GucRealCheckHook check_hook;
- GucRealAssignHook assign_hook;
- GucShowHook show_hook;
- /* variable fields, initialized at runtime: */
- double reset_val;
-};
-
-/*
- * A note about string GUCs: the boot_val is allowed to be NULL, which leads
- * to the reset_val and the actual variable value (*variable) also being NULL.
- * However, there is no way to set a NULL value subsequently using
- * set_config_option or any other GUC API. Also, GUC APIs such as SHOW will
- * display a NULL value as an empty string. Callers that choose to use a NULL
- * boot_val should overwrite the setting later in startup, or else be careful
- * that NULL doesn't have semantics that are visibly different from an empty
- * string.
- */
-struct config_string
-{
- struct config_generic gen;
- /* constant fields, must be set correctly in initial value: */
- char **variable;
- const char *boot_val;
- GucStringCheckHook check_hook;
- GucStringAssignHook assign_hook;
- GucShowHook show_hook;
- /* variable fields, initialized at runtime: */
- char *reset_val;
-};
-
-struct config_enum
-{
- struct config_generic gen;
- /* constant fields, must be set correctly in initial value: */
- int *variable;
- int boot_val;
- const struct config_enum_entry *options;
- GucEnumCheckHook check_hook;
- GucEnumAssignHook assign_hook;
- GucShowHook show_hook;
- /* variable fields, initialized at runtime: */
- int reset_val;
-};
-
/* constant tables corresponding to enums above and in guc.h */
extern PGDLLIMPORT const char *const config_group_names[];
extern PGDLLIMPORT const char *const config_type_names[];
extern PGDLLIMPORT const char *const GucContext_Names[];
extern PGDLLIMPORT const char *const GucSource_Names[];
-/* data arrays defining all the built-in GUC variables */
-extern PGDLLIMPORT struct config_bool ConfigureNamesBool[];
-extern PGDLLIMPORT struct config_int ConfigureNamesInt[];
-extern PGDLLIMPORT struct config_real ConfigureNamesReal[];
-extern PGDLLIMPORT struct config_string ConfigureNamesString[];
-extern PGDLLIMPORT struct config_enum ConfigureNamesEnum[];
+/* data array defining all the built-in GUC variables */
+extern PGDLLIMPORT struct config_generic ConfigureNames[];
/* lookup GUC variables, returning config_generic pointers */
extern struct config_generic *find_option(const char *name,
@@ -326,7 +328,7 @@ extern struct config_generic **get_guc_variables(int *num_vars);
extern void build_guc_variables(void);
/* search in enum options */
-extern const char *config_enum_lookup_by_value(const struct config_enum *record, int val);
+extern const char *config_enum_lookup_by_value(const struct config_generic *record, int val);
extern bool config_enum_lookup_by_name(const struct config_enum *record,
const char *value, int *retval);
extern char *config_enum_get_options(const struct config_enum *record,
diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list
index 37f26f6c6b7..4d71051461f 100644
--- a/src/tools/pgindent/typedefs.list
+++ b/src/tools/pgindent/typedefs.list
@@ -3801,7 +3801,6 @@ memoize_iterator
metastring
missing_cache_key
mix_data_t
-mixedStruct
mode_t
movedb_failure_params
multirange_bsearch_comparison
--
2.51.0
v1-0007-Sort-guc_parameters.dat-alphabetically-by-name.patchtext/plain; charset=UTF-8; name=v1-0007-Sort-guc_parameters.dat-alphabetically-by-name.patchDownload
From 6995d9ffa5ae6452c1437ab4920c73656fea2383 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 3 Oct 2025 08:27:18 +0200
Subject: [PATCH v1 7/8] Sort guc_parameters.dat alphabetically by name
---
src/backend/utils/misc/guc_parameters.dat | 4876 ++++++++++-----------
1 file changed, 2438 insertions(+), 2438 deletions(-)
diff --git a/src/backend/utils/misc/guc_parameters.dat b/src/backend/utils/misc/guc_parameters.dat
index 6bc6be13d2a..d54c65ee9c3 100644
--- a/src/backend/utils/misc/guc_parameters.dat
+++ b/src/backend/utils/misc/guc_parameters.dat
@@ -33,581 +33,703 @@
# 7. If it's a new GUC_LIST_QUOTE option, you must add it to
# variable_is_guc_list_quote() in src/bin/pg_dump/dumputils.c.
-{ name => 'enable_seqscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of sequential-scan plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_seqscan',
+# This setting itself cannot be set by ALTER SYSTEM to avoid an
+# operator turning this setting off by using ALTER SYSTEM, without a
+# way to turn it back on.
+{ name => 'allow_alter_system', type => 'bool', context => 'PGC_SIGHUP', group => 'COMPAT_OPTIONS_OTHER',
+ short_desc => 'Allows running the ALTER SYSTEM command.',
+ long_desc => 'Can be set to off for environments where global configuration changes should be made using a different method.',
+ flags => 'GUC_DISALLOW_IN_AUTO_FILE',
+ variable => 'AllowAlterSystem',
boot_val => 'true',
},
-{ name => 'enable_indexscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of index-scan plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_indexscan',
- boot_val => 'true',
+{ name => 'allow_in_place_tablespaces', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Allows tablespaces directly inside pg_tblspc, for testing.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'allow_in_place_tablespaces',
+ boot_val => 'false',
},
-{ name => 'enable_indexonlyscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of index-only-scan plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_indexonlyscan',
- boot_val => 'true',
+{ name => 'allow_system_table_mods', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Allows modifications of the structure of system tables.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'allowSystemTableMods',
+ boot_val => 'false',
},
-{ name => 'enable_bitmapscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of bitmap-scan plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_bitmapscan',
- boot_val => 'true',
+{ name => 'application_name', type => 'string', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
+ short_desc => 'Sets the application name to be reported in statistics and logs.',
+ flags => 'GUC_IS_NAME | GUC_REPORT | GUC_NOT_IN_SAMPLE',
+ variable => 'application_name',
+ boot_val => '""',
+ check_hook => 'check_application_name',
+ assign_hook => 'assign_application_name',
},
-{ name => 'enable_tidscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of TID scan plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_tidscan',
- boot_val => 'true',
+{ name => 'archive_cleanup_command', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVE_RECOVERY',
+ short_desc => 'Sets the shell command that will be executed at every restart point.',
+ variable => 'archiveCleanupCommand',
+ boot_val => '""',
},
-{ name => 'enable_sort', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of explicit sort steps.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_sort',
- boot_val => 'true',
-},
-{ name => 'enable_incremental_sort', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of incremental sort steps.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_incremental_sort',
- boot_val => 'true',
+{ name => 'archive_command', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVING',
+ short_desc => 'Sets the shell command that will be called to archive a WAL file.',
+ long_desc => 'An empty string means use "archive_library".',
+ variable => 'XLogArchiveCommand',
+ boot_val => '""',
+ show_hook => 'show_archive_command',
},
-{ name => 'enable_hashagg', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of hashed aggregation plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_hashagg',
- boot_val => 'true',
+{ name => 'archive_library', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVING',
+ short_desc => 'Sets the library that will be called to archive a WAL file.',
+ long_desc => 'An empty string means use "archive_command".',
+ variable => 'XLogArchiveLibrary',
+ boot_val => '""',
},
-{ name => 'enable_material', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of materialization.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_material',
- boot_val => 'true',
+{ name => 'archive_mode', type => 'enum', context => 'PGC_POSTMASTER', group => 'WAL_ARCHIVING',
+ short_desc => 'Allows archiving of WAL files using "archive_command".',
+ variable => 'XLogArchiveMode',
+ boot_val => 'ARCHIVE_MODE_OFF',
+ options => 'archive_mode_options',
},
-{ name => 'enable_memoize', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of memoization.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_memoize',
- boot_val => 'true',
+{ name => 'archive_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVING',
+ short_desc => 'Sets the amount of time to wait before forcing a switch to the next WAL file.',
+ long_desc => '0 disables the timeout.',
+ flags => 'GUC_UNIT_S',
+ variable => 'XLogArchiveTimeout',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX / 2',
},
-{ name => 'enable_nestloop', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of nested-loop join plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_nestloop',
+{ name => 'array_nulls', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
+ short_desc => 'Enables input of NULL elements in arrays.',
+ long_desc => 'When turned on, unquoted NULL in an array input value means a null value; otherwise it is taken literally.',
+ variable => 'Array_nulls',
boot_val => 'true',
},
-{ name => 'enable_mergejoin', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of merge join plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_mergejoin',
- boot_val => 'true',
+{ name => 'authentication_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
+ short_desc => 'Sets the maximum allowed time to complete client authentication.',
+ flags => 'GUC_UNIT_S',
+ variable => 'AuthenticationTimeout',
+ boot_val => '60',
+ min => '1',
+ max => '600',
},
-{ name => 'enable_hashjoin', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of hash join plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_hashjoin',
+{ name => 'autovacuum', type => 'bool', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Starts the autovacuum subprocess.',
+ variable => 'autovacuum_start_daemon',
boot_val => 'true',
},
-{ name => 'enable_gathermerge', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of gather merge plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_gathermerge',
- boot_val => 'true',
+{ name => 'autovacuum_analyze_scale_factor', type => 'real', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Number of tuple inserts, updates, or deletes prior to analyze as a fraction of reltuples.',
+ variable => 'autovacuum_anl_scale',
+ boot_val => '0.1',
+ min => '0.0',
+ max => '100.0',
},
-{ name => 'enable_partitionwise_join', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables partitionwise join.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_partitionwise_join',
- boot_val => 'false',
+{ name => 'autovacuum_analyze_threshold', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Minimum number of tuple inserts, updates, or deletes prior to analyze.',
+ variable => 'autovacuum_anl_thresh',
+ boot_val => '50',
+ min => '0',
+ max => 'INT_MAX',
},
-{ name => 'enable_partitionwise_aggregate', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables partitionwise aggregation and grouping.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_partitionwise_aggregate',
- boot_val => 'false',
+# see varsup.c for why this is PGC_POSTMASTER not PGC_SIGHUP
+# see vacuum_failsafe_age if you change the upper-limit value.
+{ name => 'autovacuum_freeze_max_age', type => 'int', context => 'PGC_POSTMASTER', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Age at which to autovacuum a table to prevent transaction ID wraparound.',
+ variable => 'autovacuum_freeze_max_age',
+ boot_val => '200000000',
+ min => '100000',
+ max => '2000000000',
},
-{ name => 'enable_parallel_append', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of parallel append plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_parallel_append',
- boot_val => 'true',
+{ name => 'autovacuum_max_workers', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Sets the maximum number of simultaneously running autovacuum worker processes.',
+ variable => 'autovacuum_max_workers',
+ boot_val => '3',
+ min => '1',
+ max => 'MAX_BACKENDS',
},
-{ name => 'enable_parallel_hash', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of parallel hash plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_parallel_hash',
- boot_val => 'true',
+# see multixact.c for why this is PGC_POSTMASTER not PGC_SIGHUP
+{ name => 'autovacuum_multixact_freeze_max_age', type => 'int', context => 'PGC_POSTMASTER', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Multixact age at which to autovacuum a table to prevent multixact wraparound.',
+ variable => 'autovacuum_multixact_freeze_max_age',
+ boot_val => '400000000',
+ min => '10000',
+ max => '2000000000',
},
-{ name => 'enable_partition_pruning', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables plan-time and execution-time partition pruning.',
- long_desc => 'Allows the query planner and executor to compare partition bounds to conditions in the query to determine which partitions must be scanned.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_partition_pruning',
- boot_val => 'true',
+{ name => 'autovacuum_naptime', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Time to sleep between autovacuum runs.',
+ flags => 'GUC_UNIT_S',
+ variable => 'autovacuum_naptime',
+ boot_val => '60',
+ min => '1',
+ max => 'INT_MAX / 1000',
},
-{ name => 'enable_presorted_aggregate', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s ability to produce plans that provide presorted input for ORDER BY / DISTINCT aggregate functions.',
- long_desc => 'Allows the query planner to build plans that provide presorted input for aggregate functions with an ORDER BY / DISTINCT clause. When disabled, implicit sorts are always performed during execution.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_presorted_aggregate',
- boot_val => 'true',
+{ name => 'autovacuum_vacuum_cost_delay', type => 'real', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Vacuum cost delay in milliseconds, for autovacuum.',
+ long_desc => '-1 means use "vacuum_cost_delay".',
+ flags => 'GUC_UNIT_MS',
+ variable => 'autovacuum_vac_cost_delay',
+ boot_val => '2',
+ min => '-1',
+ max => '100',
},
-{ name => 'enable_async_append', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of async append plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_async_append',
- boot_val => 'true',
+{ name => 'autovacuum_vacuum_cost_limit', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Vacuum cost amount available before napping, for autovacuum.',
+ long_desc => '-1 means use "vacuum_cost_limit".',
+ variable => 'autovacuum_vac_cost_limit',
+ boot_val => '-1',
+ min => '-1',
+ max => '10000',
},
-{ name => 'enable_self_join_elimination', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables removal of unique self-joins.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_self_join_elimination',
- boot_val => 'true',
+{ name => 'autovacuum_vacuum_insert_scale_factor', type => 'real', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Number of tuple inserts prior to vacuum as a fraction of reltuples.',
+ variable => 'autovacuum_vac_ins_scale',
+ boot_val => '0.2',
+ min => '0.0',
+ max => '100.0',
},
-{ name => 'enable_group_by_reordering', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables reordering of GROUP BY keys.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_group_by_reordering',
- boot_val => 'true',
+{ name => 'autovacuum_vacuum_insert_threshold', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Minimum number of tuple inserts prior to vacuum.',
+ long_desc => '-1 disables insert vacuums.',
+ variable => 'autovacuum_vac_ins_thresh',
+ boot_val => '1000',
+ min => '-1',
+ max => 'INT_MAX',
},
-{ name => 'enable_distinct_reordering', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables reordering of DISTINCT keys.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_distinct_reordering',
- boot_val => 'true',
-},
-
-{ name => 'geqo', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
- short_desc => 'Enables genetic query optimization.',
- long_desc => 'This algorithm attempts to do planning without exhaustive searching.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_geqo',
- boot_val => 'true',
+{ name => 'autovacuum_vacuum_max_threshold', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Maximum number of tuple updates or deletes prior to vacuum.',
+ long_desc => '-1 disables the maximum threshold.',
+ variable => 'autovacuum_vac_max_thresh',
+ boot_val => '100000000',
+ min => '-1',
+ max => 'INT_MAX',
},
-# Not for general use --- used by SET SESSION AUTHORIZATION and SET
-# ROLE
-{ name => 'is_superuser', type => 'bool', context => 'PGC_INTERNAL', group => 'UNGROUPED',
- short_desc => 'Shows whether the current user is a superuser.',
- flags => 'GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_ALLOW_IN_PARALLEL',
- variable => 'current_role_is_superuser',
- boot_val => 'false',
+{ name => 'autovacuum_vacuum_scale_factor', type => 'real', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Number of tuple updates or deletes prior to vacuum as a fraction of reltuples.',
+ variable => 'autovacuum_vac_scale',
+ boot_val => '0.2',
+ min => '0.0',
+ max => '100.0',
},
-# This setting itself cannot be set by ALTER SYSTEM to avoid an
-# operator turning this setting off by using ALTER SYSTEM, without a
-# way to turn it back on.
-{ name => 'allow_alter_system', type => 'bool', context => 'PGC_SIGHUP', group => 'COMPAT_OPTIONS_OTHER',
- short_desc => 'Allows running the ALTER SYSTEM command.',
- long_desc => 'Can be set to off for environments where global configuration changes should be made using a different method.',
- flags => 'GUC_DISALLOW_IN_AUTO_FILE',
- variable => 'AllowAlterSystem',
- boot_val => 'true',
+{ name => 'autovacuum_vacuum_threshold', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Minimum number of tuple updates or deletes prior to vacuum.',
+ variable => 'autovacuum_vac_thresh',
+ boot_val => '50',
+ min => '0',
+ max => 'INT_MAX',
},
-{ name => 'bonjour', type => 'bool', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Enables advertising the server via Bonjour.',
- variable => 'enable_bonjour',
- boot_val => 'false',
- check_hook => 'check_bonjour',
+{ name => 'autovacuum_work_mem', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the maximum memory to be used by each autovacuum worker process.',
+ long_desc => '-1 means use "maintenance_work_mem".',
+ flags => 'GUC_UNIT_KB',
+ variable => 'autovacuum_work_mem',
+ boot_val => '-1',
+ min => '-1',
+ max => 'MAX_KILOBYTES',
+ check_hook => 'check_autovacuum_work_mem',
},
-{ name => 'track_commit_timestamp', type => 'bool', context => 'PGC_POSTMASTER', group => 'REPLICATION_SENDING',
- short_desc => 'Collects transaction commit time.',
- variable => 'track_commit_timestamp',
- boot_val => 'false',
+# see max_connections
+{ name => 'autovacuum_worker_slots', type => 'int', context => 'PGC_POSTMASTER', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Sets the number of backend slots to allocate for autovacuum workers.',
+ variable => 'autovacuum_worker_slots',
+ boot_val => '16',
+ min => '1',
+ max => 'MAX_BACKENDS',
},
-{ name => 'ssl', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Enables SSL connections.',
- variable => 'EnableSSL',
- boot_val => 'false',
- check_hook => 'check_ssl',
+{ name => 'backend_flush_after', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_IO',
+ short_desc => 'Number of pages after which previously performed writes are flushed to disk.',
+ long_desc => '0 disables forced writeback.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'backend_flush_after',
+ boot_val => 'DEFAULT_BACKEND_FLUSH_AFTER',
+ min => '0',
+ max => 'WRITEBACK_MAX_PENDING_FLUSHES',
},
-{ name => 'ssl_passphrase_command_supports_reload', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Controls whether "ssl_passphrase_command" is called during server reload.',
- variable => 'ssl_passphrase_command_supports_reload',
- boot_val => 'false',
+{ name => 'backslash_quote', type => 'enum', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
+ short_desc => 'Sets whether "\\\\\'" is allowed in string literals.',
+ variable => 'backslash_quote',
+ boot_val => 'BACKSLASH_QUOTE_SAFE_ENCODING',
+ options => 'backslash_quote_options',
},
-{ name => 'ssl_prefer_server_ciphers', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Give priority to server ciphersuite order.',
- variable => 'SSLPreferServerCiphers',
- boot_val => 'true',
+{ name => 'backtrace_functions', type => 'string', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Log backtrace for errors in these functions.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'backtrace_functions',
+ boot_val => '""',
+ check_hook => 'check_backtrace_functions',
+ assign_hook => 'assign_backtrace_functions',
},
-{ name => 'fsync', type => 'bool', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
- short_desc => 'Forces synchronization of updates to disk.',
- long_desc => 'The server will use the fsync() system call in several places to make sure that updates are physically written to disk. This ensures that a database cluster will recover to a consistent state after an operating system or hardware crash.',
- variable => 'enableFsync',
- boot_val => 'true',
+{ name => 'bgwriter_delay', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_BGWRITER',
+ short_desc => 'Background writer sleep time between rounds.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'BgWriterDelay',
+ boot_val => '200',
+ min => '10',
+ max => '10000',
},
-{ name => 'ignore_checksum_failure', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Continues processing after a checksum failure.',
- long_desc => 'Detection of a checksum failure normally causes PostgreSQL to report an error, aborting the current transaction. Setting ignore_checksum_failure to true causes the system to ignore the failure (but still report a warning), and continue processing. This behavior could cause crashes or other serious problems. Only has an effect if checksums are enabled.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'ignore_checksum_failure',
- boot_val => 'false',
+{ name => 'bgwriter_flush_after', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_BGWRITER',
+ short_desc => 'Number of pages after which previously performed writes are flushed to disk.',
+ long_desc => '0 disables forced writeback.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'bgwriter_flush_after',
+ boot_val => 'DEFAULT_BGWRITER_FLUSH_AFTER',
+ min => '0',
+ max => 'WRITEBACK_MAX_PENDING_FLUSHES',
},
-{ name => 'zero_damaged_pages', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Continues processing past damaged page headers.',
- long_desc => 'Detection of a damaged page header normally causes PostgreSQL to report an error, aborting the current transaction. Setting "zero_damaged_pages" to true causes the system to instead report a warning, zero out the damaged page, and continue processing. This behavior will destroy data, namely all the rows on the damaged page.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'zero_damaged_pages',
- boot_val => 'false',
+# Same upper limit as shared_buffers
+{ name => 'bgwriter_lru_maxpages', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_BGWRITER',
+ short_desc => 'Background writer maximum number of LRU pages to flush per round.',
+ long_desc => '0 disables background writing.',
+ variable => 'bgwriter_lru_maxpages',
+ boot_val => '100',
+ min => '0',
+ max => 'INT_MAX / 2',
},
-{ name => 'ignore_invalid_pages', type => 'bool', context => 'PGC_POSTMASTER', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Continues recovery after an invalid pages failure.',
- long_desc => 'Detection of WAL records having references to invalid pages during recovery causes PostgreSQL to raise a PANIC-level error, aborting the recovery. Setting "ignore_invalid_pages" to true causes the system to ignore invalid page references in WAL records (but still report a warning), and continue recovery. This behavior may cause crashes, data loss, propagate or hide corruption, or other serious problems. Only has an effect during recovery or in standby mode.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'ignore_invalid_pages',
- boot_val => 'false',
+{ name => 'bgwriter_lru_multiplier', type => 'real', context => 'PGC_SIGHUP', group => 'RESOURCES_BGWRITER',
+ short_desc => 'Multiple of the average buffer usage to free per round.',
+ variable => 'bgwriter_lru_multiplier',
+ boot_val => '2.0',
+ min => '0.0',
+ max => '10.0',
},
-{ name => 'full_page_writes', type => 'bool', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
- short_desc => 'Writes full pages to WAL when first modified after a checkpoint.',
- long_desc => 'A page write in process during an operating system crash might be only partially written to disk. During recovery, the row changes stored in WAL are not enough to recover. This option writes pages when first modified after a checkpoint to WAL so full recovery is possible.',
- variable => 'fullPageWrites',
- boot_val => 'true',
+{ name => 'block_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the size of a disk block.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'block_size',
+ boot_val => 'BLCKSZ',
+ min => 'BLCKSZ',
+ max => 'BLCKSZ',
},
-{ name => 'wal_log_hints', type => 'bool', context => 'PGC_POSTMASTER', group => 'WAL_SETTINGS',
- short_desc => 'Writes full pages to WAL when first modified after a checkpoint, even for a non-critical modification.',
- variable => 'wal_log_hints',
+{ name => 'bonjour', type => 'bool', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Enables advertising the server via Bonjour.',
+ variable => 'enable_bonjour',
boot_val => 'false',
+ check_hook => 'check_bonjour',
},
-{ name => 'wal_init_zero', type => 'bool', context => 'PGC_SUSET', group => 'WAL_SETTINGS',
- short_desc => 'Writes zeroes to new WAL files before first use.',
- variable => 'wal_init_zero',
- boot_val => 'true',
+{ name => 'bonjour_name', type => 'string', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the Bonjour service name.',
+ long_desc => 'An empty string means use the computer name.',
+ variable => 'bonjour_name',
+ boot_val => '""',
},
-{ name => 'wal_recycle', type => 'bool', context => 'PGC_SUSET', group => 'WAL_SETTINGS',
- short_desc => 'Recycles WAL files by renaming them.',
- variable => 'wal_recycle',
- boot_val => 'true',
+{ name => 'bytea_output', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the output format for bytea.',
+ variable => 'bytea_output',
+ boot_val => 'BYTEA_OUTPUT_HEX',
+ options => 'bytea_output_options',
},
-{ name => 'log_checkpoints', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
- short_desc => 'Logs each checkpoint.',
- variable => 'log_checkpoints',
+{ name => 'check_function_bodies', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Check routine bodies during CREATE FUNCTION and CREATE PROCEDURE.',
+ variable => 'check_function_bodies',
boot_val => 'true',
},
-{ name => 'trace_connection_negotiation', type => 'bool', context => 'PGC_POSTMASTER', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Logs details of pre-authentication connection handshake.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Trace_connection_negotiation',
- boot_val => 'false',
+{ name => 'checkpoint_completion_target', type => 'real', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
+ short_desc => 'Time spent flushing dirty buffers during checkpoint, as fraction of checkpoint interval.',
+ variable => 'CheckPointCompletionTarget',
+ boot_val => '0.9',
+ min => '0.0',
+ max => '1.0',
+ assign_hook => 'assign_checkpoint_completion_target',
},
-{ name => 'log_disconnections', type => 'bool', context => 'PGC_SU_BACKEND', group => 'LOGGING_WHAT',
- short_desc => 'Logs end of a session, including duration.',
- variable => 'Log_disconnections',
- boot_val => 'false',
+{ name => 'checkpoint_flush_after', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
+ short_desc => 'Number of pages after which previously performed writes are flushed to disk.',
+ long_desc => '0 disables forced writeback.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'checkpoint_flush_after',
+ boot_val => 'DEFAULT_CHECKPOINT_FLUSH_AFTER',
+ min => '0',
+ max => 'WRITEBACK_MAX_PENDING_FLUSHES',
},
-{ name => 'log_replication_commands', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
- short_desc => 'Logs each replication command.',
- variable => 'log_replication_commands',
- boot_val => 'false',
+{ name => 'checkpoint_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
+ short_desc => 'Sets the maximum time between automatic WAL checkpoints.',
+ flags => 'GUC_UNIT_S',
+ variable => 'CheckPointTimeout',
+ boot_val => '300',
+ min => '30',
+ max => '86400',
},
-{ name => 'debug_assertions', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows whether the running server has assertion checks enabled.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'assert_enabled',
- boot_val => 'DEFAULT_ASSERT_ENABLED',
+{ name => 'checkpoint_warning', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
+ short_desc => 'Sets the maximum time before warning if checkpoints triggered by WAL volume happen too frequently.',
+ long_desc => 'Write a message to the server log if checkpoints caused by the filling of WAL segment files happen more frequently than this amount of time. 0 disables the warning.',
+ flags => 'GUC_UNIT_S',
+ variable => 'CheckPointWarning',
+ boot_val => '30',
+ min => '0',
+ max => 'INT_MAX',
},
-{ name => 'exit_on_error', type => 'bool', context => 'PGC_USERSET', group => 'ERROR_HANDLING_OPTIONS',
- short_desc => 'Terminate session on any error.',
- variable => 'ExitOnAnyError',
- boot_val => 'false',
+{ name => 'client_connection_check_interval', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
+ short_desc => 'Sets the time interval between checks for disconnection while running queries.',
+ long_desc => '0 disables connection checks.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'client_connection_check_interval',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
+ check_hook => 'check_client_connection_check_interval',
},
-{ name => 'restart_after_crash', type => 'bool', context => 'PGC_SIGHUP', group => 'ERROR_HANDLING_OPTIONS',
- short_desc => 'Reinitialize server after backend crash.',
- variable => 'restart_after_crash',
- boot_val => 'true',
+{ name => 'client_encoding', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets the client\'s character set encoding.',
+ flags => 'GUC_IS_NAME | GUC_REPORT',
+ variable => 'client_encoding_string',
+ boot_val => '"SQL_ASCII"',
+ check_hook => 'check_client_encoding',
+ assign_hook => 'assign_client_encoding',
},
-{ name => 'remove_temp_files_after_crash', type => 'bool', context => 'PGC_SIGHUP', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Remove temporary files after backend crash.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'remove_temp_files_after_crash',
- boot_val => 'true',
+{ name => 'client_min_messages', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the message levels that are sent to the client.',
+ long_desc => 'Each level includes all the levels that follow it. The later the level, the fewer messages are sent.',
+ variable => 'client_min_messages',
+ boot_val => 'NOTICE',
+ options => 'client_message_level_options',
},
-{ name => 'send_abort_for_crash', type => 'bool', context => 'PGC_SIGHUP', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Send SIGABRT not SIGQUIT to child processes after backend crash.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'send_abort_for_crash',
- boot_val => 'false',
+{ name => 'cluster_name', type => 'string', context => 'PGC_POSTMASTER', group => 'PROCESS_TITLE',
+ short_desc => 'Sets the name of the cluster, which is included in the process title.',
+ flags => 'GUC_IS_NAME',
+ variable => 'cluster_name',
+ boot_val => '""',
+ check_hook => 'check_cluster_name',
},
-{ name => 'send_abort_for_kill', type => 'bool', context => 'PGC_SIGHUP', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Send SIGABRT not SIGKILL to stuck child processes.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'send_abort_for_kill',
- boot_val => 'false',
+# we have no microseconds designation, so can't supply units here
+{ name => 'commit_delay', type => 'int', context => 'PGC_SUSET', group => 'WAL_SETTINGS',
+ short_desc => 'Sets the delay in microseconds between transaction commit and flushing WAL to disk.',
+ variable => 'CommitDelay',
+ boot_val => '0',
+ min => '0',
+ max => '100000',
},
-{ name => 'log_duration', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
- short_desc => 'Logs the duration of each completed SQL statement.',
- variable => 'log_duration',
- boot_val => 'false',
+{ name => 'commit_siblings', type => 'int', context => 'PGC_USERSET', group => 'WAL_SETTINGS',
+ short_desc => 'Sets the minimum number of concurrent open transactions required before performing "commit_delay".',
+ variable => 'CommitSiblings',
+ boot_val => '5',
+ min => '0',
+ max => '1000',
},
-{ name => 'debug_copy_parse_plan_trees', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Set this to force all parse and plan trees to be passed through copyObject(), to facilitate catching errors and omissions in copyObject().',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Debug_copy_parse_plan_trees',
- boot_val => 'DEFAULT_DEBUG_COPY_PARSE_PLAN_TREES',
- ifdef => 'DEBUG_NODE_TESTS_ENABLED',
+{ name => 'commit_timestamp_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the size of the dedicated buffer pool used for the commit timestamp cache.',
+ long_desc => '0 means use a fraction of "shared_buffers".',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'commit_timestamp_buffers',
+ boot_val => '0',
+ min => '0',
+ max => 'SLRU_MAX_ALLOWED_BUFFERS',
+ check_hook => 'check_commit_ts_buffers',
},
-{ name => 'debug_write_read_parse_plan_trees', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Set this to force all parse and plan trees to be passed through outfuncs.c/readfuncs.c, to facilitate catching errors and omissions in those modules.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Debug_write_read_parse_plan_trees',
- boot_val => 'DEFAULT_DEBUG_READ_WRITE_PARSE_PLAN_TREES',
- ifdef => 'DEBUG_NODE_TESTS_ENABLED',
+{ name => 'compute_query_id', type => 'enum', context => 'PGC_SUSET', group => 'STATS_MONITORING',
+ short_desc => 'Enables in-core computation of query identifiers.',
+ variable => 'compute_query_id',
+ boot_val => 'COMPUTE_QUERY_ID_AUTO',
+ options => 'compute_query_id_options',
},
-{ name => 'debug_raw_expression_coverage_test', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Set this to force all raw parse trees for DML statements to be scanned by raw_expression_tree_walker(), to facilitate catching errors and omissions in that function.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Debug_raw_expression_coverage_test',
- boot_val => 'DEFAULT_DEBUG_RAW_EXPRESSION_COVERAGE_TEST',
- ifdef => 'DEBUG_NODE_TESTS_ENABLED',
+{ name => 'config_file', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
+ short_desc => 'Sets the server\'s main configuration file.',
+ flags => 'GUC_DISALLOW_IN_FILE | GUC_SUPERUSER_ONLY',
+ variable => 'ConfigFileName',
+ boot_val => 'NULL',
},
-{ name => 'debug_print_raw_parse', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
- short_desc => 'Logs each query\'s raw parse tree.',
- variable => 'Debug_print_raw_parse',
- boot_val => 'false',
+{ name => 'constraint_exclusion', type => 'enum', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
+ short_desc => 'Enables the planner to use constraints to optimize queries.',
+ long_desc => 'Table scans will be skipped if their constraints guarantee that no rows match the query.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'constraint_exclusion',
+ boot_val => 'CONSTRAINT_EXCLUSION_PARTITION',
+ options => 'constraint_exclusion_options',
},
-{ name => 'debug_print_parse', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
- short_desc => 'Logs each query\'s parse tree.',
- variable => 'Debug_print_parse',
- boot_val => 'false',
+{ name => 'cpu_index_tuple_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the planner\'s estimate of the cost of processing each index entry during an index scan.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'cpu_index_tuple_cost',
+ boot_val => 'DEFAULT_CPU_INDEX_TUPLE_COST',
+ min => '0',
+ max => 'DBL_MAX',
},
-{ name => 'debug_print_rewritten', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
- short_desc => 'Logs each query\'s rewritten parse tree.',
- variable => 'Debug_print_rewritten',
- boot_val => 'false',
+{ name => 'cpu_operator_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the planner\'s estimate of the cost of processing each operator or function call.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'cpu_operator_cost',
+ boot_val => 'DEFAULT_CPU_OPERATOR_COST',
+ min => '0',
+ max => 'DBL_MAX',
},
-{ name => 'debug_print_plan', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
- short_desc => 'Logs each query\'s execution plan.',
- variable => 'Debug_print_plan',
- boot_val => 'false',
+{ name => 'cpu_tuple_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the planner\'s estimate of the cost of processing each tuple (row).',
+ flags => 'GUC_EXPLAIN',
+ variable => 'cpu_tuple_cost',
+ boot_val => 'DEFAULT_CPU_TUPLE_COST',
+ min => '0',
+ max => 'DBL_MAX',
},
-{ name => 'debug_pretty_print', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
- short_desc => 'Indents parse and plan tree displays.',
- variable => 'Debug_pretty_print',
- boot_val => 'true',
+{ name => 'createrole_self_grant', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets whether a CREATEROLE user automatically grants the role to themselves, and with which options.',
+ long_desc => 'An empty string disables automatic self grants.',
+ flags => 'GUC_LIST_INPUT',
+ variable => 'createrole_self_grant',
+ boot_val => '""',
+ check_hook => 'check_createrole_self_grant',
+ assign_hook => 'assign_createrole_self_grant',
},
-{ name => 'log_parser_stats', type => 'bool', context => 'PGC_SUSET', group => 'STATS_MONITORING',
- short_desc => 'Writes parser performance statistics to the server log.',
- variable => 'log_parser_stats',
- boot_val => 'false',
- check_hook => 'check_stage_log_stats',
+{ name => 'cursor_tuple_fraction', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
+ short_desc => 'Sets the planner\'s estimate of the fraction of a cursor\'s rows that will be retrieved.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'cursor_tuple_fraction',
+ boot_val => 'DEFAULT_CURSOR_TUPLE_FRACTION',
+ min => '0.0',
+ max => '1.0',
},
-{ name => 'log_planner_stats', type => 'bool', context => 'PGC_SUSET', group => 'STATS_MONITORING',
- short_desc => 'Writes planner performance statistics to the server log.',
- variable => 'log_planner_stats',
+{ name => 'data_checksums', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows whether data checksums are turned on for this cluster.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
+ variable => 'data_checksums',
boot_val => 'false',
- check_hook => 'check_stage_log_stats',
},
-{ name => 'log_executor_stats', type => 'bool', context => 'PGC_SUSET', group => 'STATS_MONITORING',
- short_desc => 'Writes executor performance statistics to the server log.',
- variable => 'log_executor_stats',
- boot_val => 'false',
- check_hook => 'check_stage_log_stats',
+# Can't be set by ALTER SYSTEM as it can lead to recursive definition
+# of data_directory.
+{ name => 'data_directory', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
+ short_desc => 'Sets the server\'s data directory.',
+ flags => 'GUC_SUPERUSER_ONLY | GUC_DISALLOW_IN_AUTO_FILE',
+ variable => 'data_directory',
+ boot_val => 'NULL',
},
-{ name => 'log_statement_stats', type => 'bool', context => 'PGC_SUSET', group => 'STATS_MONITORING',
- short_desc => 'Writes cumulative performance statistics to the server log.',
- variable => 'log_statement_stats',
- boot_val => 'false',
- check_hook => 'check_log_stats',
+{ name => 'data_directory_mode', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the mode of the data directory.',
+ long_desc => 'The parameter value is a numeric mode specification in the form accepted by the chmod and umask system calls. (To use the customary octal format the number must start with a 0 (zero).)',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
+ variable => 'data_directory_mode',
+ boot_val => '0700',
+ min => '0000',
+ max => '0777',
+ show_hook => 'show_data_directory_mode',
},
-{ name => 'log_btree_build_stats', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Logs system resource usage statistics (memory and CPU) on various B-tree operations.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'log_btree_build_stats',
+{ name => 'data_sync_retry', type => 'bool', context => 'PGC_POSTMASTER', group => 'ERROR_HANDLING_OPTIONS',
+ short_desc => 'Whether to continue running after a failure to sync data files.',
+ variable => 'data_sync_retry',
boot_val => 'false',
- ifdef => 'BTREE_BUILD_STATS',
},
-{ name => 'track_activities', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
- short_desc => 'Collects information about executing commands.',
- long_desc => 'Enables the collection of information on the currently executing command of each session, along with the time at which that command began execution.',
- variable => 'pgstat_track_activities',
- boot_val => 'true',
+{ name => 'DateStyle', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets the display format for date and time values.',
+ long_desc => 'Also controls interpretation of ambiguous date inputs.',
+ flags => 'GUC_LIST_INPUT | GUC_REPORT',
+ variable => 'datestyle_string',
+ boot_val => '"ISO, MDY"',
+ check_hook => 'check_datestyle',
+ assign_hook => 'assign_datestyle',
},
-{ name => 'track_counts', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
- short_desc => 'Collects statistics on database activity.',
- variable => 'pgstat_track_counts',
- boot_val => 'true',
+# This is PGC_SUSET to prevent hiding from log_lock_waits.
+{ name => 'deadlock_timeout', type => 'int', context => 'PGC_SUSET', group => 'LOCK_MANAGEMENT',
+ short_desc => 'Sets the time to wait on a lock before checking for deadlock.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'DeadlockTimeout',
+ boot_val => '1000',
+ min => '1',
+ max => 'INT_MAX',
},
-{ name => 'track_cost_delay_timing', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
- short_desc => 'Collects timing statistics for cost-based vacuum delay.',
- variable => 'track_cost_delay_timing',
- boot_val => 'false',
+{ name => 'debug_assertions', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows whether the running server has assertion checks enabled.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'assert_enabled',
+ boot_val => 'DEFAULT_ASSERT_ENABLED',
},
-{ name => 'track_io_timing', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
- short_desc => 'Collects timing statistics for database I/O activity.',
- variable => 'track_io_timing',
- boot_val => 'false',
+{ name => 'debug_copy_parse_plan_trees', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Set this to force all parse and plan trees to be passed through copyObject(), to facilitate catching errors and omissions in copyObject().',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Debug_copy_parse_plan_trees',
+ boot_val => 'DEFAULT_DEBUG_COPY_PARSE_PLAN_TREES',
+ ifdef => 'DEBUG_NODE_TESTS_ENABLED',
},
-{ name => 'track_wal_io_timing', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
- short_desc => 'Collects timing statistics for WAL I/O activity.',
- variable => 'track_wal_io_timing',
+{ name => 'debug_deadlocks', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Dumps information about all current locks when a deadlock timeout occurs.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Debug_deadlocks',
boot_val => 'false',
+ ifdef => 'LOCK_DEBUG',
},
-{ name => 'update_process_title', type => 'bool', context => 'PGC_SUSET', group => 'PROCESS_TITLE',
- short_desc => 'Updates the process title to show the active SQL command.',
- long_desc => 'Enables updating of the process title every time a new SQL command is received by the server.',
- variable => 'update_process_title',
- boot_val => 'DEFAULT_UPDATE_PROCESS_TITLE',
+{ name => 'debug_discard_caches', type => 'int', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Aggressively flush system caches for debugging purposes.',
+ long_desc => '0 means use normal caching behavior.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'debug_discard_caches',
+ boot_val => 'DEFAULT_DEBUG_DISCARD_CACHES',
+ min => 'MIN_DEBUG_DISCARD_CACHES',
+ max => 'MAX_DEBUG_DISCARD_CACHES',
},
-{ name => 'autovacuum', type => 'bool', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Starts the autovacuum subprocess.',
- variable => 'autovacuum_start_daemon',
- boot_val => 'true',
+{ name => 'debug_io_direct', type => 'string', context => 'PGC_POSTMASTER', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Use direct I/O for file access.',
+ long_desc => 'An empty string disables direct I/O.',
+ flags => 'GUC_LIST_INPUT | GUC_NOT_IN_SAMPLE',
+ variable => 'debug_io_direct_string',
+ boot_val => '""',
+ check_hook => 'check_debug_io_direct',
+ assign_hook => 'assign_debug_io_direct',
},
-{ name => 'trace_notify', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Generates debugging output for LISTEN and NOTIFY.',
+{ name => 'debug_logical_replication_streaming', type => 'enum', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Forces immediate streaming or serialization of changes in large transactions.',
+ long_desc => 'On the publisher, it allows streaming or serializing each change in logical decoding. On the subscriber, it allows serialization of all changes to files and notifies the parallel apply workers to read and apply them at the end of the transaction.',
flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Trace_notify',
- boot_val => 'false',
+ variable => 'debug_logical_replication_streaming',
+ boot_val => 'DEBUG_LOGICAL_REP_STREAMING_BUFFERED',
+ options => 'debug_logical_replication_streaming_options',
},
-{ name => 'trace_locks', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Emits information about lock usage.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Trace_locks',
+{ name => 'debug_parallel_query', type => 'enum', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Forces the planner\'s use parallel query nodes.',
+ long_desc => 'This can be useful for testing the parallel query infrastructure by forcing the planner to generate plans that contain nodes that perform tuple communication between workers and the main process.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_EXPLAIN',
+ variable => 'debug_parallel_query',
+ boot_val => 'DEBUG_PARALLEL_OFF',
+ options => 'debug_parallel_query_options',
+},
+
+{ name => 'debug_pretty_print', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
+ short_desc => 'Indents parse and plan tree displays.',
+ variable => 'Debug_pretty_print',
+ boot_val => 'true',
+},
+
+{ name => 'debug_print_parse', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
+ short_desc => 'Logs each query\'s parse tree.',
+ variable => 'Debug_print_parse',
boot_val => 'false',
- ifdef => 'LOCK_DEBUG',
},
-{ name => 'trace_userlocks', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Emits information about user lock usage.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Trace_userlocks',
+{ name => 'debug_print_plan', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
+ short_desc => 'Logs each query\'s execution plan.',
+ variable => 'Debug_print_plan',
boot_val => 'false',
- ifdef => 'LOCK_DEBUG',
},
-{ name => 'trace_lwlocks', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Emits information about lightweight lock usage.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Trace_lwlocks',
+{ name => 'debug_print_raw_parse', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
+ short_desc => 'Logs each query\'s raw parse tree.',
+ variable => 'Debug_print_raw_parse',
boot_val => 'false',
- ifdef => 'LOCK_DEBUG',
},
-{ name => 'debug_deadlocks', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Dumps information about all current locks when a deadlock timeout occurs.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Debug_deadlocks',
+{ name => 'debug_print_rewritten', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
+ short_desc => 'Logs each query\'s rewritten parse tree.',
+ variable => 'Debug_print_rewritten',
boot_val => 'false',
- ifdef => 'LOCK_DEBUG',
},
-{ name => 'log_lock_waits', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
- short_desc => 'Logs long lock waits.',
- variable => 'log_lock_waits',
- boot_val => 'true',
+{ name => 'debug_raw_expression_coverage_test', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Set this to force all raw parse trees for DML statements to be scanned by raw_expression_tree_walker(), to facilitate catching errors and omissions in that function.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Debug_raw_expression_coverage_test',
+ boot_val => 'DEFAULT_DEBUG_RAW_EXPRESSION_COVERAGE_TEST',
+ ifdef => 'DEBUG_NODE_TESTS_ENABLED',
},
-{ name => 'log_lock_failures', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
- short_desc => 'Logs lock failures.',
- variable => 'log_lock_failures',
- boot_val => 'false',
+{ name => 'debug_write_read_parse_plan_trees', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Set this to force all parse and plan trees to be passed through outfuncs.c/readfuncs.c, to facilitate catching errors and omissions in those modules.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Debug_write_read_parse_plan_trees',
+ boot_val => 'DEFAULT_DEBUG_READ_WRITE_PARSE_PLAN_TREES',
+ ifdef => 'DEBUG_NODE_TESTS_ENABLED',
},
-{ name => 'log_recovery_conflict_waits', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
- short_desc => 'Logs standby recovery conflict waits.',
- variable => 'log_recovery_conflict_waits',
- boot_val => 'false',
+{ name => 'default_statistics_target', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
+ short_desc => 'Sets the default statistics target.',
+ long_desc => 'This applies to table columns that have not had a column-specific target set via ALTER TABLE SET STATISTICS.',
+ variable => 'default_statistics_target',
+ boot_val => '100',
+ min => '1',
+ max => 'MAX_STATISTICS_TARGET',
},
-{ name => 'log_hostname', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
- short_desc => 'Logs the host name in the connection logs.',
- long_desc => 'By default, connection logs only show the IP address of the connecting host. If you want them to show the host name you can turn this on, but depending on your host name resolution setup it might impose a non-negligible performance penalty.',
- variable => 'log_hostname',
- boot_val => 'false',
+{ name => 'default_table_access_method', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the default table access method for new tables.',
+ flags => 'GUC_IS_NAME',
+ variable => 'default_table_access_method',
+ boot_val => 'DEFAULT_TABLE_ACCESS_METHOD',
+ check_hook => 'check_default_table_access_method',
},
-{ name => 'transform_null_equals', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_OTHER',
- short_desc => 'Treats "expr=NULL" as "expr IS NULL".',
- long_desc => 'When turned on, expressions of the form expr = NULL (or NULL = expr) are treated as expr IS NULL, that is, they return true if expr evaluates to the null value, and false otherwise. The correct behavior of expr = NULL is to always return null (unknown).',
- variable => 'Transform_null_equals',
- boot_val => 'false',
+{ name => 'default_tablespace', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the default tablespace to create tables and indexes in.',
+ long_desc => 'An empty string means use the database\'s default tablespace.',
+ flags => 'GUC_IS_NAME',
+ variable => 'default_tablespace',
+ boot_val => '""',
+ check_hook => 'check_default_tablespace',
},
-{ name => 'default_transaction_read_only', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the default read-only status of new transactions.',
- flags => 'GUC_REPORT',
- variable => 'DefaultXactReadOnly',
- boot_val => 'false',
+{ name => 'default_text_search_config', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets default text search configuration.',
+ variable => 'TSCurrentConfig',
+ boot_val => '"pg_catalog.simple"',
+ check_hook => 'check_default_text_search_config',
+ assign_hook => 'assign_default_text_search_config',
},
-{ name => 'transaction_read_only', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the current transaction\'s read-only status.',
- flags => 'GUC_NO_RESET | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'XactReadOnly',
- boot_val => 'false',
- check_hook => 'check_transaction_read_only',
+{ name => 'default_toast_compression', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the default compression method for compressible values.',
+ variable => 'default_toast_compression',
+ boot_val => 'TOAST_PGLZ_COMPRESSION',
+ options => 'default_toast_compression_options',
},
{ name => 'default_transaction_deferrable', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
@@ -616,32 +738,18 @@
boot_val => 'false',
},
-{ name => 'transaction_deferrable', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Whether to defer a read-only serializable transaction until it can be executed with no possible serialization failures.',
- flags => 'GUC_NO_RESET | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'XactDeferrable',
- boot_val => 'false',
- check_hook => 'check_transaction_deferrable',
-},
-
-{ name => 'row_security', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Enables row security.',
- long_desc => 'When enabled, row security will be applied to all users.',
- variable => 'row_security',
- boot_val => 'true',
-},
-
-{ name => 'check_function_bodies', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Check routine bodies during CREATE FUNCTION and CREATE PROCEDURE.',
- variable => 'check_function_bodies',
- boot_val => 'true',
+{ name => 'default_transaction_isolation', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the transaction isolation level of each new transaction.',
+ variable => 'DefaultXactIsoLevel',
+ boot_val => 'XACT_READ_COMMITTED',
+ options => 'isolation_level_options',
},
-{ name => 'array_nulls', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
- short_desc => 'Enables input of NULL elements in arrays.',
- long_desc => 'When turned on, unquoted NULL in an array input value means a null value; otherwise it is taken literally.',
- variable => 'Array_nulls',
- boot_val => 'true',
+{ name => 'default_transaction_read_only', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the default read-only status of new transactions.',
+ flags => 'GUC_REPORT',
+ variable => 'DefaultXactReadOnly',
+ boot_val => 'false',
},
# WITH OIDS support, and consequently default_with_oids, was removed
@@ -655,241 +763,221 @@
check_hook => 'check_default_with_oids',
},
-{ name => 'logging_collector', type => 'bool', context => 'PGC_POSTMASTER', group => 'LOGGING_WHERE',
- short_desc => 'Start a subprocess to capture stderr, csvlog and/or jsonlog into log files.',
- variable => 'Logging_collector',
- boot_val => 'false',
+{ name => 'dynamic_library_path', type => 'string', context => 'PGC_SUSET', group => 'CLIENT_CONN_OTHER',
+ short_desc => 'Sets the path for dynamically loadable modules.',
+ long_desc => 'If a dynamically loadable module needs to be opened and the specified name does not have a directory component (i.e., the name does not contain a slash), the system will search this path for the specified file.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'Dynamic_library_path',
+ boot_val => '"$libdir"',
},
-{ name => 'log_truncate_on_rotation', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Truncate existing log files of same name during log rotation.',
- variable => 'Log_truncate_on_rotation',
- boot_val => 'false',
+{ name => 'dynamic_shared_memory_type', type => 'enum', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Selects the dynamic shared memory implementation used.',
+ variable => 'dynamic_shared_memory_type',
+ boot_val => 'DEFAULT_DYNAMIC_SHARED_MEMORY_TYPE',
+ options => 'dynamic_shared_memory_options',
},
-{ name => 'trace_sort', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Emit information about resource usage in sorting.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'trace_sort',
- boot_val => 'false',
+{ name => 'effective_cache_size', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the planner\'s assumption about the total size of the data caches.',
+ long_desc => 'That is, the total size of the caches (kernel cache and shared buffers) used for PostgreSQL data files. This is measured in disk pages, which are normally 8 kB each.',
+ flags => 'GUC_UNIT_BLOCKS | GUC_EXPLAIN',
+ variable => 'effective_cache_size',
+ boot_val => 'DEFAULT_EFFECTIVE_CACHE_SIZE',
+ min => '1',
+ max => 'INT_MAX',
},
-# this is undocumented because not exposed in a standard build
-{ name => 'trace_syncscan', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Generate debugging output for synchronized scanning.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'trace_syncscan',
- boot_val => 'false',
- ifdef => 'TRACE_SYNCSCAN',
+{ name => 'effective_io_concurrency', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_IO',
+ short_desc => 'Number of simultaneous requests that can be handled efficiently by the disk subsystem.',
+ long_desc => '0 disables simultaneous requests.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'effective_io_concurrency',
+ boot_val => 'DEFAULT_EFFECTIVE_IO_CONCURRENCY',
+ min => '0',
+ max => 'MAX_IO_CONCURRENCY',
},
-# this is undocumented because not exposed in a standard build
-{ name => 'optimize_bounded_sort', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables bounded sorting using heap sort.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_EXPLAIN',
- variable => 'optimize_bounded_sort',
+{ name => 'enable_async_append', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of async append plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_async_append',
boot_val => 'true',
- ifdef => 'DEBUG_BOUNDED_SORT',
-},
-
-{ name => 'wal_debug', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Emit WAL-related debugging output.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'XLOG_DEBUG',
- boot_val => 'false',
- ifdef => 'WAL_DEBUG',
},
-{ name => 'integer_datetimes', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows whether datetimes are integer based.',
- flags => 'GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'integer_datetimes',
+{ name => 'enable_bitmapscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of bitmap-scan plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_bitmapscan',
boot_val => 'true',
},
-{ name => 'krb_caseins_users', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
- short_desc => 'Sets whether Kerberos and GSSAPI user names should be treated as case-insensitive.',
- variable => 'pg_krb_caseins_users',
- boot_val => 'false',
+{ name => 'enable_distinct_reordering', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables reordering of DISTINCT keys.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_distinct_reordering',
+ boot_val => 'true',
},
-{ name => 'gss_accept_delegation', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
- short_desc => 'Sets whether GSSAPI delegation should be accepted from the client.',
- variable => 'pg_gss_accept_delegation',
- boot_val => 'false',
+{ name => 'enable_gathermerge', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of gather merge plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_gathermerge',
+ boot_val => 'true',
},
-{ name => 'escape_string_warning', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
- short_desc => 'Warn about backslash escapes in ordinary string literals.',
- variable => 'escape_string_warning',
+{ name => 'enable_group_by_reordering', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables reordering of GROUP BY keys.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_group_by_reordering',
boot_val => 'true',
},
-{ name => 'standard_conforming_strings', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
- short_desc => 'Causes \'...\' strings to treat backslashes literally.',
- flags => 'GUC_REPORT',
- variable => 'standard_conforming_strings',
+{ name => 'enable_hashagg', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of hashed aggregation plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_hashagg',
boot_val => 'true',
},
-{ name => 'synchronize_seqscans', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
- short_desc => 'Enables synchronized sequential scans.',
- variable => 'synchronize_seqscans',
+{ name => 'enable_hashjoin', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of hash join plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_hashjoin',
boot_val => 'true',
},
-{ name => 'recovery_target_inclusive', type => 'bool', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
- short_desc => 'Sets whether to include or exclude transaction with recovery target.',
- variable => 'recoveryTargetInclusive',
+{ name => 'enable_incremental_sort', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of incremental sort steps.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_incremental_sort',
boot_val => 'true',
},
-{ name => 'summarize_wal', type => 'bool', context => 'PGC_SIGHUP', group => 'WAL_SUMMARIZATION',
- short_desc => 'Starts the WAL summarizer process to enable incremental backup.',
- variable => 'summarize_wal',
- boot_val => 'false',
+{ name => 'enable_indexonlyscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of index-only-scan plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_indexonlyscan',
+ boot_val => 'true',
},
-{ name => 'hot_standby', type => 'bool', context => 'PGC_POSTMASTER', group => 'REPLICATION_STANDBY',
- short_desc => 'Allows connections and queries during recovery.',
- variable => 'EnableHotStandby',
+{ name => 'enable_indexscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of index-scan plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_indexscan',
boot_val => 'true',
},
-{ name => 'hot_standby_feedback', type => 'bool', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Allows feedback from a hot standby to the primary that will avoid query conflicts.',
- variable => 'hot_standby_feedback',
- boot_val => 'false',
+{ name => 'enable_material', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of materialization.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_material',
+ boot_val => 'true',
},
-{ name => 'in_hot_standby', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows whether hot standby is currently active.',
- flags => 'GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'in_hot_standby_guc',
- boot_val => 'false',
- show_hook => 'show_in_hot_standby',
+{ name => 'enable_memoize', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of memoization.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_memoize',
+ boot_val => 'true',
},
-{ name => 'allow_system_table_mods', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Allows modifications of the structure of system tables.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'allowSystemTableMods',
- boot_val => 'false',
+{ name => 'enable_mergejoin', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of merge join plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_mergejoin',
+ boot_val => 'true',
},
-{ name => 'ignore_system_indexes', type => 'bool', context => 'PGC_BACKEND', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Disables reading from system indexes.',
- long_desc => 'It does not prevent updating the indexes, so it is safe to use. The worst consequence is slowness.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'IgnoreSystemIndexes',
- boot_val => 'false',
+{ name => 'enable_nestloop', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of nested-loop join plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_nestloop',
+ boot_val => 'true',
},
-{ name => 'allow_in_place_tablespaces', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Allows tablespaces directly inside pg_tblspc, for testing.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'allow_in_place_tablespaces',
- boot_val => 'false',
+{ name => 'enable_parallel_append', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of parallel append plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_parallel_append',
+ boot_val => 'true',
},
-{ name => 'lo_compat_privileges', type => 'bool', context => 'PGC_SUSET', group => 'COMPAT_OPTIONS_PREVIOUS',
- short_desc => 'Enables backward compatibility mode for privilege checks on large objects.',
- long_desc => 'Skips privilege checks when reading or modifying large objects, for compatibility with PostgreSQL releases prior to 9.0.',
- variable => 'lo_compat_privileges',
- boot_val => 'false',
+{ name => 'enable_parallel_hash', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of parallel hash plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_parallel_hash',
+ boot_val => 'true',
},
-{ name => 'quote_all_identifiers', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
- short_desc => 'When generating SQL fragments, quote all identifiers.',
- variable => 'quote_all_identifiers',
- boot_val => 'false',
+{ name => 'enable_partition_pruning', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables plan-time and execution-time partition pruning.',
+ long_desc => 'Allows the query planner and executor to compare partition bounds to conditions in the query to determine which partitions must be scanned.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_partition_pruning',
+ boot_val => 'true',
},
-{ name => 'data_checksums', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows whether data checksums are turned on for this cluster.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
- variable => 'data_checksums',
+{ name => 'enable_partitionwise_aggregate', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables partitionwise aggregation and grouping.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_partitionwise_aggregate',
boot_val => 'false',
},
-{ name => 'syslog_sequence_numbers', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Add sequence number to syslog messages to avoid duplicate suppression.',
- variable => 'syslog_sequence_numbers',
- boot_val => 'true',
+{ name => 'enable_partitionwise_join', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables partitionwise join.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_partitionwise_join',
+ boot_val => 'false',
},
-{ name => 'syslog_split_messages', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Split messages sent to syslog by lines and to fit into 1024 bytes.',
- variable => 'syslog_split_messages',
+{ name => 'enable_presorted_aggregate', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s ability to produce plans that provide presorted input for ORDER BY / DISTINCT aggregate functions.',
+ long_desc => 'Allows the query planner to build plans that provide presorted input for aggregate functions with an ORDER BY / DISTINCT clause. When disabled, implicit sorts are always performed during execution.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_presorted_aggregate',
boot_val => 'true',
},
-{ name => 'parallel_leader_participation', type => 'bool', context => 'PGC_USERSET', group => 'RESOURCES_WORKER_PROCESSES',
- short_desc => 'Controls whether Gather and Gather Merge also run subplans.',
- long_desc => 'Should gather nodes also run subplans or just gather tuples?',
+{ name => 'enable_self_join_elimination', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables removal of unique self-joins.',
flags => 'GUC_EXPLAIN',
- variable => 'parallel_leader_participation',
+ variable => 'enable_self_join_elimination',
boot_val => 'true',
},
-{ name => 'jit', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
- short_desc => 'Allow JIT compilation.',
+{ name => 'enable_seqscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of sequential-scan plans.',
flags => 'GUC_EXPLAIN',
- variable => 'jit_enabled',
+ variable => 'enable_seqscan',
boot_val => 'true',
},
-# This is not guaranteed to be available, but given it's a developer
-# oriented option, it doesn't seem worth adding code checking
-# availability.
-{ name => 'jit_debugging_support', type => 'bool', context => 'PGC_SU_BACKEND', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Register JIT-compiled functions with debugger.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'jit_debugging_support',
- boot_val => 'false',
-},
-
-{ name => 'jit_dump_bitcode', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Write out LLVM bitcode to facilitate JIT debugging.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'jit_dump_bitcode',
- boot_val => 'false',
-},
-
-{ name => 'jit_expressions', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Allow JIT compilation of expressions.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'jit_expressions',
+{ name => 'enable_sort', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of explicit sort steps.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_sort',
boot_val => 'true',
},
-# This is not guaranteed to be available, but given it's a developer
-# oriented option, it doesn't seem worth adding code checking
-# availability.
-{ name => 'jit_profiling_support', type => 'bool', context => 'PGC_SU_BACKEND', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Register JIT-compiled functions with perf profiler.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'jit_profiling_support',
- boot_val => 'false',
-},
-
-{ name => 'jit_tuple_deforming', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Allow JIT compilation of tuple deforming.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'jit_tuple_deforming',
+{ name => 'enable_tidscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of TID scan plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_tidscan',
boot_val => 'true',
},
-{ name => 'data_sync_retry', type => 'bool', context => 'PGC_POSTMASTER', group => 'ERROR_HANDLING_OPTIONS',
- short_desc => 'Whether to continue running after a failure to sync data files.',
- variable => 'data_sync_retry',
- boot_val => 'false',
+{ name => 'escape_string_warning', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
+ short_desc => 'Warn about backslash escapes in ordinary string literals.',
+ variable => 'escape_string_warning',
+ boot_val => 'true',
},
-{ name => 'wal_receiver_create_temp_slot', type => 'bool', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets whether a WAL receiver should create a temporary replication slot if no permanent slot is configured.',
- variable => 'wal_receiver_create_temp_slot',
- boot_val => 'false',
+{ name => 'event_source', type => 'string', context => 'PGC_POSTMASTER', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the application name used to identify PostgreSQL messages in the event log.',
+ variable => 'event_source',
+ boot_val => 'DEFAULT_EVENT_SOURCE',
},
{ name => 'event_triggers', type => 'bool', context => 'PGC_SUSET', group => 'CLIENT_CONN_STATEMENT',
@@ -899,51 +987,42 @@
boot_val => 'true',
},
-{ name => 'sync_replication_slots', type => 'bool', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Enables a physical standby to synchronize logical failover replication slots from the primary server.',
- variable => 'sync_replication_slots',
+{ name => 'exit_on_error', type => 'bool', context => 'PGC_USERSET', group => 'ERROR_HANDLING_OPTIONS',
+ short_desc => 'Terminate session on any error.',
+ variable => 'ExitOnAnyError',
boot_val => 'false',
},
-{ name => 'md5_password_warnings', type => 'bool', context => 'PGC_USERSET', group => 'CONN_AUTH_AUTH',
- short_desc => 'Enables deprecation warnings for MD5 passwords.',
- variable => 'md5_password_warnings',
- boot_val => 'true',
+{ name => 'extension_control_path', type => 'string', context => 'PGC_SUSET', group => 'CLIENT_CONN_OTHER',
+ short_desc => 'Sets the path for extension control files.',
+ long_desc => 'The remaining extension script and secondary control files are then loaded from the same directory where the primary control file was found.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'Extension_control_path',
+ boot_val => '"$system"',
},
-{ name => 'vacuum_truncate', type => 'bool', context => 'PGC_USERSET', group => 'VACUUM_DEFAULT',
- short_desc => 'Enables vacuum to truncate empty pages at the end of the table.',
- variable => 'vacuum_truncate',
- boot_val => 'true',
-},
-
-{ name => 'archive_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVING',
- short_desc => 'Sets the amount of time to wait before forcing a switch to the next WAL file.',
- long_desc => '0 disables the timeout.',
- flags => 'GUC_UNIT_S',
- variable => 'XLogArchiveTimeout',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX / 2',
+{ name => 'external_pid_file', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
+ short_desc => 'Writes the postmaster PID to the specified file.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'external_pid_file',
+ boot_val => 'NULL',
+ check_hook => 'check_canonical_path',
},
-{ name => 'post_auth_delay', type => 'int', context => 'PGC_BACKEND', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Sets the amount of time to wait after authentication on connection startup.',
- long_desc => 'This allows attaching a debugger to the process.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_UNIT_S',
- variable => 'PostAuthDelay',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX / 1000000',
+{ name => 'extra_float_digits', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets the number of digits displayed for floating-point values.',
+ long_desc => 'This affects real, double precision, and geometric data types. A zero or negative parameter value is added to the standard number of digits (FLT_DIG or DBL_DIG as appropriate). Any value greater than zero selects precise output mode.',
+ variable => 'extra_float_digits',
+ boot_val => '1',
+ min => '-15',
+ max => '3',
},
-{ name => 'default_statistics_target', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
- short_desc => 'Sets the default statistics target.',
- long_desc => 'This applies to table columns that have not had a column-specific target set via ALTER TABLE SET STATISTICS.',
- variable => 'default_statistics_target',
- boot_val => '100',
- min => '1',
- max => 'MAX_STATISTICS_TARGET',
+{ name => 'file_copy_method', type => 'enum', context => 'PGC_USERSET', group => 'RESOURCES_DISK',
+ short_desc => 'Selects the file copy method.',
+ variable => 'file_copy_method',
+ boot_val => 'FILE_COPY_METHOD_COPY',
+ options => 'file_copy_method_options',
},
{ name => 'from_collapse_limit', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
@@ -956,23 +1035,26 @@
max => 'INT_MAX',
},
-{ name => 'join_collapse_limit', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
- short_desc => 'Sets the FROM-list size beyond which JOIN constructs are not flattened.',
- long_desc => 'The planner will flatten explicit JOIN constructs into lists of FROM items whenever a list of no more than this many items would result.',
- flags => 'GUC_EXPLAIN',
- variable => 'join_collapse_limit',
- boot_val => '8',
- min => '1',
- max => 'INT_MAX',
+{ name => 'fsync', type => 'bool', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
+ short_desc => 'Forces synchronization of updates to disk.',
+ long_desc => 'The server will use the fsync() system call in several places to make sure that updates are physically written to disk. This ensures that a database cluster will recover to a consistent state after an operating system or hardware crash.',
+ variable => 'enableFsync',
+ boot_val => 'true',
},
-{ name => 'geqo_threshold', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
- short_desc => 'Sets the threshold of FROM items beyond which GEQO is used.',
+{ name => 'full_page_writes', type => 'bool', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
+ short_desc => 'Writes full pages to WAL when first modified after a checkpoint.',
+ long_desc => 'A page write in process during an operating system crash might be only partially written to disk. During recovery, the row changes stored in WAL are not enough to recover. This option writes pages when first modified after a checkpoint to WAL so full recovery is possible.',
+ variable => 'fullPageWrites',
+ boot_val => 'true',
+},
+
+{ name => 'geqo', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
+ short_desc => 'Enables genetic query optimization.',
+ long_desc => 'This algorithm attempts to do planning without exhaustive searching.',
flags => 'GUC_EXPLAIN',
- variable => 'geqo_threshold',
- boot_val => '12',
- min => '2',
- max => 'INT_MAX',
+ variable => 'enable_geqo',
+ boot_val => 'true',
},
{ name => 'geqo_effort', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
@@ -984,763 +1066,569 @@
max => 'MAX_GEQO_EFFORT',
},
-{ name => 'geqo_pool_size', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
- short_desc => 'GEQO: number of individuals in the population.',
+{ name => 'geqo_generations', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
+ short_desc => 'GEQO: number of iterations of the algorithm.',
long_desc => '0 means use a suitable default value.',
flags => 'GUC_EXPLAIN',
- variable => 'Geqo_pool_size',
+ variable => 'Geqo_generations',
boot_val => '0',
min => '0',
max => 'INT_MAX',
},
-{ name => 'geqo_generations', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
- short_desc => 'GEQO: number of iterations of the algorithm.',
+{ name => 'geqo_pool_size', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
+ short_desc => 'GEQO: number of individuals in the population.',
long_desc => '0 means use a suitable default value.',
flags => 'GUC_EXPLAIN',
- variable => 'Geqo_generations',
+ variable => 'Geqo_pool_size',
boot_val => '0',
min => '0',
max => 'INT_MAX',
},
-# This is PGC_SUSET to prevent hiding from log_lock_waits.
-{ name => 'deadlock_timeout', type => 'int', context => 'PGC_SUSET', group => 'LOCK_MANAGEMENT',
- short_desc => 'Sets the time to wait on a lock before checking for deadlock.',
- flags => 'GUC_UNIT_MS',
- variable => 'DeadlockTimeout',
- boot_val => '1000',
- min => '1',
- max => 'INT_MAX',
+{ name => 'geqo_seed', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
+ short_desc => 'GEQO: seed for random path selection.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'Geqo_seed',
+ boot_val => '0.0',
+ min => '0.0',
+ max => '1.0',
},
-{ name => 'max_standby_archive_delay', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets the maximum delay before canceling queries when a hot standby server is processing archived WAL data.',
- long_desc => '-1 means wait forever.',
- flags => 'GUC_UNIT_MS',
- variable => 'max_standby_archive_delay',
- boot_val => '30 * 1000',
- min => '-1',
- max => 'INT_MAX',
+{ name => 'geqo_selection_bias', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
+ short_desc => 'GEQO: selective pressure within the population.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'Geqo_selection_bias',
+ boot_val => 'DEFAULT_GEQO_SELECTION_BIAS',
+ min => 'MIN_GEQO_SELECTION_BIAS',
+ max => 'MAX_GEQO_SELECTION_BIAS',
},
-{ name => 'max_standby_streaming_delay', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets the maximum delay before canceling queries when a hot standby server is processing streamed WAL data.',
- long_desc => '-1 means wait forever.',
- flags => 'GUC_UNIT_MS',
- variable => 'max_standby_streaming_delay',
- boot_val => '30 * 1000',
- min => '-1',
+{ name => 'geqo_threshold', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
+ short_desc => 'Sets the threshold of FROM items beyond which GEQO is used.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'geqo_threshold',
+ boot_val => '12',
+ min => '2',
max => 'INT_MAX',
},
-{ name => 'recovery_min_apply_delay', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets the minimum delay for applying changes during recovery.',
- flags => 'GUC_UNIT_MS',
- variable => 'recovery_min_apply_delay',
+{ name => 'gin_fuzzy_search_limit', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_OTHER',
+ short_desc => 'Sets the maximum allowed result for exact search by GIN.',
+ long_desc => '0 means no limit.',
+ variable => 'GinFuzzySearchLimit',
boot_val => '0',
min => '0',
max => 'INT_MAX',
},
-{ name => 'wal_receiver_status_interval', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets the maximum interval between WAL receiver status reports to the sending server.',
- flags => 'GUC_UNIT_S',
- variable => 'wal_receiver_status_interval',
- boot_val => '10',
- min => '0',
- max => 'INT_MAX / 1000',
-},
-
-{ name => 'wal_receiver_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets the maximum wait time to receive data from the sending server.',
- long_desc => '0 disables the timeout.',
- flags => 'GUC_UNIT_MS',
- variable => 'wal_receiver_timeout',
- boot_val => '60 * 1000',
- min => '0',
- max => 'INT_MAX',
+{ name => 'gin_pending_list_limit', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the maximum size of the pending list for GIN index.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'gin_pending_list_limit',
+ boot_val => '4096',
+ min => '64',
+ max => 'MAX_KILOBYTES',
},
-{ name => 'max_connections', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the maximum number of concurrent connections.',
- variable => 'MaxConnections',
- boot_val => '100',
- min => '1',
- max => 'MAX_BACKENDS',
+{ name => 'gss_accept_delegation', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
+ short_desc => 'Sets whether GSSAPI delegation should be accepted from the client.',
+ variable => 'pg_gss_accept_delegation',
+ boot_val => 'false',
},
-# see max_connections
-{ name => 'superuser_reserved_connections', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the number of connection slots reserved for superusers.',
- variable => 'SuperuserReservedConnections',
- boot_val => '3',
- min => '0',
- max => 'MAX_BACKENDS',
+{ name => 'hash_mem_multiplier', type => 'real', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
+ short_desc => 'Multiple of "work_mem" to use for hash tables.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'hash_mem_multiplier',
+ boot_val => '2.0',
+ min => '1.0',
+ max => '1000.0',
},
-{ name => 'reserved_connections', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the number of connection slots reserved for roles with privileges of pg_use_reserved_connections.',
- variable => 'ReservedConnections',
- boot_val => '0',
- min => '0',
- max => 'MAX_BACKENDS',
+{ name => 'hba_file', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
+ short_desc => 'Sets the server\'s "hba" configuration file.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'HbaFileName',
+ boot_val => 'NULL',
},
-{ name => 'min_dynamic_shared_memory', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Amount of dynamic shared memory reserved at startup.',
- flags => 'GUC_UNIT_MB',
- variable => 'min_dynamic_shared_memory',
- boot_val => '0',
- min => '0',
- max => '(int) Min((size_t) INT_MAX, SIZE_MAX / (1024 * 1024))',
+{ name => 'hot_standby', type => 'bool', context => 'PGC_POSTMASTER', group => 'REPLICATION_STANDBY',
+ short_desc => 'Allows connections and queries during recovery.',
+ variable => 'EnableHotStandby',
+ boot_val => 'true',
},
-# We sometimes multiply the number of shared buffers by two without
-# checking for overflow, so we mustn't allow more than INT_MAX / 2.
-{ name => 'shared_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the number of shared memory buffers used by the server.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'NBuffers',
- boot_val => '16384',
- min => '16',
- max => 'INT_MAX / 2',
+{ name => 'hot_standby_feedback', type => 'bool', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Allows feedback from a hot standby to the primary that will avoid query conflicts.',
+ variable => 'hot_standby_feedback',
+ boot_val => 'false',
},
-{ name => 'vacuum_buffer_usage_limit', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
- short_desc => 'Sets the buffer pool size for VACUUM, ANALYZE, and autovacuum.',
+{ name => 'huge_page_size', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'The size of huge page that should be requested.',
+ long_desc => '0 means use the system default.',
flags => 'GUC_UNIT_KB',
- variable => 'VacuumBufferUsageLimit',
- boot_val => '2048',
- min => '0',
- max => 'MAX_BAS_VAC_RING_SIZE_KB',
- check_hook => 'check_vacuum_buffer_usage_limit',
-},
-
-{ name => 'shared_memory_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the size of the server\'s main shared memory area (rounded up to the nearest MB).',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_UNIT_MB | GUC_RUNTIME_COMPUTED',
- variable => 'shared_memory_size_mb',
+ variable => 'huge_page_size',
boot_val => '0',
min => '0',
max => 'INT_MAX',
+ check_hook => 'check_huge_page_size',
},
-{ name => 'shared_memory_size_in_huge_pages', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the number of huge pages needed for the main shared memory area.',
- long_desc => '-1 means huge pages are not supported.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
- variable => 'shared_memory_size_in_huge_pages',
- boot_val => '-1',
- min => '-1',
- max => 'INT_MAX',
+{ name => 'huge_pages', type => 'enum', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Use of huge pages on Linux or Windows.',
+ variable => 'huge_pages',
+ boot_val => 'HUGE_PAGES_TRY',
+ options => 'huge_pages_options',
},
-{ name => 'num_os_semaphores', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the number of semaphores required for the server.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
- variable => 'num_os_semaphores',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX',
-},
-
-{ name => 'commit_timestamp_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the size of the dedicated buffer pool used for the commit timestamp cache.',
- long_desc => '0 means use a fraction of "shared_buffers".',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'commit_timestamp_buffers',
- boot_val => '0',
- min => '0',
- max => 'SLRU_MAX_ALLOWED_BUFFERS',
- check_hook => 'check_commit_ts_buffers',
-},
-
-{ name => 'multixact_member_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the size of the dedicated buffer pool used for the MultiXact member cache.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'multixact_member_buffers',
- boot_val => '32',
- min => '16',
- max => 'SLRU_MAX_ALLOWED_BUFFERS',
- check_hook => 'check_multixact_member_buffers',
-},
-
-{ name => 'multixact_offset_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the size of the dedicated buffer pool used for the MultiXact offset cache.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'multixact_offset_buffers',
- boot_val => '16',
- min => '16',
- max => 'SLRU_MAX_ALLOWED_BUFFERS',
- check_hook => 'check_multixact_offset_buffers',
+{ name => 'huge_pages_status', type => 'enum', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Indicates the status of huge pages.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'huge_pages_status',
+ boot_val => 'HUGE_PAGES_UNKNOWN',
+ options => 'huge_pages_status_options',
},
-{ name => 'notify_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the size of the dedicated buffer pool used for the LISTEN/NOTIFY message cache.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'notify_buffers',
- boot_val => '16',
- min => '16',
- max => 'SLRU_MAX_ALLOWED_BUFFERS',
- check_hook => 'check_notify_buffers',
+{ name => 'icu_validation_level', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Log level for reporting invalid ICU locale strings.',
+ variable => 'icu_validation_level',
+ boot_val => 'WARNING',
+ options => 'icu_validation_level_options',
},
-{ name => 'serializable_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the size of the dedicated buffer pool used for the serializable transaction cache.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'serializable_buffers',
- boot_val => '32',
- min => '16',
- max => 'SLRU_MAX_ALLOWED_BUFFERS',
- check_hook => 'check_serial_buffers',
+{ name => 'ident_file', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
+ short_desc => 'Sets the server\'s "ident" configuration file.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'IdentFileName',
+ boot_val => 'NULL',
},
-{ name => 'subtransaction_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the size of the dedicated buffer pool used for the subtransaction cache.',
- long_desc => '0 means use a fraction of "shared_buffers".',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'subtransaction_buffers',
+{ name => 'idle_in_transaction_session_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the maximum allowed idle time between queries, when in a transaction.',
+ long_desc => '0 disables the timeout.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'IdleInTransactionSessionTimeout',
boot_val => '0',
min => '0',
- max => 'SLRU_MAX_ALLOWED_BUFFERS',
- check_hook => 'check_subtrans_buffers',
+ max => 'INT_MAX',
},
-{ name => 'transaction_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the size of the dedicated buffer pool used for the transaction status cache.',
- long_desc => '0 means use a fraction of "shared_buffers".',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'transaction_buffers',
+{ name => 'idle_replication_slot_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SENDING',
+ short_desc => 'Sets the duration a replication slot can remain idle before it is invalidated.',
+ flags => 'GUC_UNIT_S',
+ variable => 'idle_replication_slot_timeout_secs',
boot_val => '0',
min => '0',
- max => 'SLRU_MAX_ALLOWED_BUFFERS',
- check_hook => 'check_transaction_buffers',
+ max => 'INT_MAX',
},
-{ name => 'temp_buffers', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
- short_desc => 'Sets the maximum number of temporary buffers used by each session.',
- flags => 'GUC_UNIT_BLOCKS | GUC_EXPLAIN',
- variable => 'num_temp_buffers',
- boot_val => '1024',
- min => '100',
- max => 'INT_MAX / 2',
- check_hook => 'check_temp_buffers',
+{ name => 'idle_session_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the maximum allowed idle time between queries, when not in a transaction.',
+ long_desc => '0 disables the timeout.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'IdleSessionTimeout',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
},
-{ name => 'port', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the TCP port the server listens on.',
- variable => 'PostPortNumber',
- boot_val => 'DEF_PGPORT',
- min => '1',
- max => '65535',
+{ name => 'ignore_checksum_failure', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Continues processing after a checksum failure.',
+ long_desc => 'Detection of a checksum failure normally causes PostgreSQL to report an error, aborting the current transaction. Setting ignore_checksum_failure to true causes the system to ignore the failure (but still report a warning), and continue processing. This behavior could cause crashes or other serious problems. Only has an effect if checksums are enabled.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'ignore_checksum_failure',
+ boot_val => 'false',
},
-{ name => 'unix_socket_permissions', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the access permissions of the Unix-domain socket.',
- long_desc => 'Unix-domain sockets use the usual Unix file system permission set. The parameter value is expected to be a numeric mode specification in the form accepted by the chmod and umask system calls. (To use the customary octal format the number must start with a 0 (zero).)',
- variable => 'Unix_socket_permissions',
- boot_val => '0777',
- min => '0000',
- max => '0777',
- show_hook => 'show_unix_socket_permissions',
+{ name => 'ignore_invalid_pages', type => 'bool', context => 'PGC_POSTMASTER', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Continues recovery after an invalid pages failure.',
+ long_desc => 'Detection of WAL records having references to invalid pages during recovery causes PostgreSQL to raise a PANIC-level error, aborting the recovery. Setting "ignore_invalid_pages" to true causes the system to ignore invalid page references in WAL records (but still report a warning), and continue recovery. This behavior may cause crashes, data loss, propagate or hide corruption, or other serious problems. Only has an effect during recovery or in standby mode.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'ignore_invalid_pages',
+ boot_val => 'false',
},
-{ name => 'log_file_mode', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Sets the file permissions for log files.',
- long_desc => 'The parameter value is expected to be a numeric mode specification in the form accepted by the chmod and umask system calls. (To use the customary octal format the number must start with a 0 (zero).)',
- variable => 'Log_file_mode',
- boot_val => '0600',
- min => '0000',
- max => '0777',
- show_hook => 'show_log_file_mode',
+{ name => 'ignore_system_indexes', type => 'bool', context => 'PGC_BACKEND', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Disables reading from system indexes.',
+ long_desc => 'It does not prevent updating the indexes, so it is safe to use. The worst consequence is slowness.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'IgnoreSystemIndexes',
+ boot_val => 'false',
},
-{ name => 'data_directory_mode', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the mode of the data directory.',
- long_desc => 'The parameter value is a numeric mode specification in the form accepted by the chmod and umask system calls. (To use the customary octal format the number must start with a 0 (zero).)',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
- variable => 'data_directory_mode',
- boot_val => '0700',
- min => '0000',
- max => '0777',
- show_hook => 'show_data_directory_mode',
+{ name => 'in_hot_standby', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows whether hot standby is currently active.',
+ flags => 'GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'in_hot_standby_guc',
+ boot_val => 'false',
+ show_hook => 'show_in_hot_standby',
},
-{ name => 'work_mem', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
- short_desc => 'Sets the maximum memory to be used for query workspaces.',
- long_desc => 'This much memory can be used by each internal sort operation and hash table before switching to temporary disk files.',
- flags => 'GUC_UNIT_KB | GUC_EXPLAIN',
- variable => 'work_mem',
- boot_val => '4096',
- min => '64',
- max => 'MAX_KILOBYTES',
+{ name => 'integer_datetimes', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows whether datetimes are integer based.',
+ flags => 'GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'integer_datetimes',
+ boot_val => 'true',
},
-# Dynamic shared memory has a higher overhead than local memory
-# contexts, so when testing low-memory scenarios that could use shared
-# memory, the recommended minimum is 1MB.
-{ name => 'maintenance_work_mem', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
- short_desc => 'Sets the maximum memory to be used for maintenance operations.',
- long_desc => 'This includes operations such as VACUUM and CREATE INDEX.',
- flags => 'GUC_UNIT_KB',
- variable => 'maintenance_work_mem',
- boot_val => '65536',
- min => '64',
- max => 'MAX_KILOBYTES',
+{ name => 'IntervalStyle', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets the display format for interval values.',
+ flags => 'GUC_REPORT',
+ variable => 'IntervalStyle',
+ boot_val => 'INTSTYLE_POSTGRES',
+ options => 'intervalstyle_options',
},
-{ name => 'logical_decoding_work_mem', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
- short_desc => 'Sets the maximum memory to be used for logical decoding.',
- long_desc => 'This much memory can be used by each internal reorder buffer before spilling to disk.',
- flags => 'GUC_UNIT_KB',
- variable => 'logical_decoding_work_mem',
- boot_val => '65536',
- min => '64',
- max => 'MAX_KILOBYTES',
+{ name => 'io_combine_limit', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_IO',
+ short_desc => 'Limit on the size of data reads and writes.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'io_combine_limit_guc',
+ boot_val => 'DEFAULT_IO_COMBINE_LIMIT',
+ min => '1',
+ max => 'MAX_IO_COMBINE_LIMIT',
+ assign_hook => 'assign_io_combine_limit',
},
-# We use the hopefully-safely-small value of 100kB as the compiled-in
-# default for max_stack_depth. InitializeGUCOptions will increase it
-# if possible, depending on the actual platform-specific stack limit.
-{ name => 'max_stack_depth', type => 'int', context => 'PGC_SUSET', group => 'RESOURCES_MEM',
- short_desc => 'Sets the maximum stack depth, in kilobytes.',
- flags => 'GUC_UNIT_KB',
- variable => 'max_stack_depth',
- boot_val => '100',
- min => '100',
- max => 'MAX_KILOBYTES',
- check_hook => 'check_max_stack_depth',
- assign_hook => 'assign_max_stack_depth',
+{ name => 'io_max_combine_limit', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_IO',
+ short_desc => 'Server-wide limit that clamps io_combine_limit.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'io_max_combine_limit',
+ boot_val => 'DEFAULT_IO_COMBINE_LIMIT',
+ min => '1',
+ max => 'MAX_IO_COMBINE_LIMIT',
+ assign_hook => 'assign_io_max_combine_limit',
},
-{ name => 'temp_file_limit', type => 'int', context => 'PGC_SUSET', group => 'RESOURCES_DISK',
- short_desc => 'Limits the total size of all temporary files used by each process.',
- long_desc => '-1 means no limit.',
- flags => 'GUC_UNIT_KB',
- variable => 'temp_file_limit',
+{ name => 'io_max_concurrency', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_IO',
+ short_desc => 'Max number of IOs that one process can execute simultaneously.',
+ variable => 'io_max_concurrency',
boot_val => '-1',
min => '-1',
- max => 'INT_MAX',
+ max => '1024',
+ check_hook => 'check_io_max_concurrency',
},
-{ name => 'vacuum_cost_page_hit', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
- short_desc => 'Vacuum cost for a page found in the buffer cache.',
- variable => 'VacuumCostPageHit',
- boot_val => '1',
- min => '0',
- max => '10000',
+{ name => 'io_method', type => 'enum', context => 'PGC_POSTMASTER', group => 'RESOURCES_IO',
+ short_desc => 'Selects the method for executing asynchronous I/O.',
+ variable => 'io_method',
+ boot_val => 'DEFAULT_IO_METHOD',
+ options => 'io_method_options',
+ assign_hook => 'assign_io_method',
},
-{ name => 'vacuum_cost_page_miss', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
- short_desc => 'Vacuum cost for a page not found in the buffer cache.',
- variable => 'VacuumCostPageMiss',
- boot_val => '2',
- min => '0',
- max => '10000',
-},
-
-{ name => 'vacuum_cost_page_dirty', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
- short_desc => 'Vacuum cost for a page dirtied by vacuum.',
- variable => 'VacuumCostPageDirty',
- boot_val => '20',
- min => '0',
- max => '10000',
-},
-
-{ name => 'vacuum_cost_limit', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
- short_desc => 'Vacuum cost amount available before napping.',
- variable => 'VacuumCostLimit',
- boot_val => '200',
+{ name => 'io_workers', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_IO',
+ short_desc => 'Number of IO worker processes, for io_method=worker.',
+ variable => 'io_workers',
+ boot_val => '3',
min => '1',
- max => '10000',
+ max => 'MAX_IO_WORKERS',
},
-{ name => 'autovacuum_vacuum_cost_limit', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Vacuum cost amount available before napping, for autovacuum.',
- long_desc => '-1 means use "vacuum_cost_limit".',
- variable => 'autovacuum_vac_cost_limit',
- boot_val => '-1',
- min => '-1',
- max => '10000',
+# Not for general use --- used by SET SESSION AUTHORIZATION and SET
+# ROLE
+{ name => 'is_superuser', type => 'bool', context => 'PGC_INTERNAL', group => 'UNGROUPED',
+ short_desc => 'Shows whether the current user is a superuser.',
+ flags => 'GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_ALLOW_IN_PARALLEL',
+ variable => 'current_role_is_superuser',
+ boot_val => 'false',
},
-{ name => 'max_files_per_process', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_KERNEL',
- short_desc => 'Sets the maximum number of files each server process is allowed to open simultaneously.',
- variable => 'max_files_per_process',
- boot_val => '1000',
- min => '64',
- max => 'INT_MAX',
+{ name => 'jit', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
+ short_desc => 'Allow JIT compilation.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'jit_enabled',
+ boot_val => 'true',
},
-# See also CheckRequiredParameterValues() if this parameter changes
-{ name => 'max_prepared_transactions', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the maximum number of simultaneously prepared transactions.',
- variable => 'max_prepared_xacts',
- boot_val => '0',
- min => '0',
- max => 'MAX_BACKENDS',
+{ name => 'jit_above_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Perform JIT compilation if query is more expensive.',
+ long_desc => '-1 disables JIT compilation.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'jit_above_cost',
+ boot_val => '100000',
+ min => '-1',
+ max => 'DBL_MAX',
},
-{ name => 'trace_lock_oidmin', type => 'int', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Sets the minimum OID of tables for tracking locks.',
- long_desc => 'Is used to avoid output on system tables.',
+# This is not guaranteed to be available, but given it's a developer
+# oriented option, it doesn't seem worth adding code checking
+# availability.
+{ name => 'jit_debugging_support', type => 'bool', context => 'PGC_SU_BACKEND', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Register JIT-compiled functions with debugger.',
flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Trace_lock_oidmin',
- boot_val => 'FirstNormalObjectId',
- min => '0',
- max => 'INT_MAX',
- ifdef => 'LOCK_DEBUG',
+ variable => 'jit_debugging_support',
+ boot_val => 'false',
},
-{ name => 'trace_lock_table', type => 'int', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Sets the OID of the table with unconditionally lock tracing.',
+{ name => 'jit_dump_bitcode', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Write out LLVM bitcode to facilitate JIT debugging.',
flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Trace_lock_table',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX',
- ifdef => 'LOCK_DEBUG',
-},
-
-{ name => 'statement_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the maximum allowed duration of any statement.',
- long_desc => '0 disables the timeout.',
- flags => 'GUC_UNIT_MS',
- variable => 'StatementTimeout',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX',
-},
-
-{ name => 'lock_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the maximum allowed duration of any wait for a lock.',
- long_desc => '0 disables the timeout.',
- flags => 'GUC_UNIT_MS',
- variable => 'LockTimeout',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX',
-},
-
-{ name => 'idle_in_transaction_session_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the maximum allowed idle time between queries, when in a transaction.',
- long_desc => '0 disables the timeout.',
- flags => 'GUC_UNIT_MS',
- variable => 'IdleInTransactionSessionTimeout',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX',
-},
-
-{ name => 'transaction_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the maximum allowed duration of any transaction within a session (not a prepared transaction).',
- long_desc => '0 disables the timeout.',
- flags => 'GUC_UNIT_MS',
- variable => 'TransactionTimeout',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX',
- assign_hook => 'assign_transaction_timeout',
-},
-
-{ name => 'idle_session_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the maximum allowed idle time between queries, when not in a transaction.',
- long_desc => '0 disables the timeout.',
- flags => 'GUC_UNIT_MS',
- variable => 'IdleSessionTimeout',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX',
-},
-
-{ name => 'vacuum_freeze_min_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
- short_desc => 'Minimum age at which VACUUM should freeze a table row.',
- variable => 'vacuum_freeze_min_age',
- boot_val => '50000000',
- min => '0',
- max => '1000000000',
-},
-
-{ name => 'vacuum_freeze_table_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
- short_desc => 'Age at which VACUUM should scan whole table to freeze tuples.',
- variable => 'vacuum_freeze_table_age',
- boot_val => '150000000',
- min => '0',
- max => '2000000000',
+ variable => 'jit_dump_bitcode',
+ boot_val => 'false',
},
-{ name => 'vacuum_multixact_freeze_min_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
- short_desc => 'Minimum age at which VACUUM should freeze a MultiXactId in a table row.',
- variable => 'vacuum_multixact_freeze_min_age',
- boot_val => '5000000',
- min => '0',
- max => '1000000000',
+{ name => 'jit_expressions', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Allow JIT compilation of expressions.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'jit_expressions',
+ boot_val => 'true',
},
-{ name => 'vacuum_multixact_freeze_table_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
- short_desc => 'Multixact age at which VACUUM should scan whole table to freeze tuples.',
- variable => 'vacuum_multixact_freeze_table_age',
- boot_val => '150000000',
- min => '0',
- max => '2000000000',
+{ name => 'jit_inline_above_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Perform JIT inlining if query is more expensive.',
+ long_desc => '-1 disables inlining.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'jit_inline_above_cost',
+ boot_val => '500000',
+ min => '-1',
+ max => 'DBL_MAX',
},
-{ name => 'vacuum_failsafe_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
- short_desc => 'Age at which VACUUM should trigger failsafe to avoid a wraparound outage.',
- variable => 'vacuum_failsafe_age',
- boot_val => '1600000000',
- min => '0',
- max => '2100000000',
+{ name => 'jit_optimize_above_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Optimize JIT-compiled functions if query is more expensive.',
+ long_desc => '-1 disables optimization.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'jit_optimize_above_cost',
+ boot_val => '500000',
+ min => '-1',
+ max => 'DBL_MAX',
},
-{ name => 'vacuum_multixact_failsafe_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
- short_desc => 'Multixact age at which VACUUM should trigger failsafe to avoid a wraparound outage.',
- variable => 'vacuum_multixact_failsafe_age',
- boot_val => '1600000000',
- min => '0',
- max => '2100000000',
+# This is not guaranteed to be available, but given it's a developer
+# oriented option, it doesn't seem worth adding code checking
+# availability.
+{ name => 'jit_profiling_support', type => 'bool', context => 'PGC_SU_BACKEND', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Register JIT-compiled functions with perf profiler.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'jit_profiling_support',
+ boot_val => 'false',
},
-# See also CheckRequiredParameterValues() if this parameter changes
-{ name => 'max_locks_per_transaction', type => 'int', context => 'PGC_POSTMASTER', group => 'LOCK_MANAGEMENT',
- short_desc => 'Sets the maximum number of locks per transaction.',
- long_desc => 'The shared lock table is sized on the assumption that at most "max_locks_per_transaction" objects per server process or prepared transaction will need to be locked at any one time.',
- variable => 'max_locks_per_xact',
- boot_val => '64',
- min => '10',
- max => 'INT_MAX',
+{ name => 'jit_provider', type => 'string', context => 'PGC_POSTMASTER', group => 'CLIENT_CONN_PRELOAD',
+ short_desc => 'JIT provider to use.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'jit_provider',
+ boot_val => '"llvmjit"',
},
-{ name => 'max_pred_locks_per_transaction', type => 'int', context => 'PGC_POSTMASTER', group => 'LOCK_MANAGEMENT',
- short_desc => 'Sets the maximum number of predicate locks per transaction.',
- long_desc => 'The shared predicate lock table is sized on the assumption that at most "max_pred_locks_per_transaction" objects per server process or prepared transaction will need to be locked at any one time.',
- variable => 'max_predicate_locks_per_xact',
- boot_val => '64',
- min => '10',
- max => 'INT_MAX',
+{ name => 'jit_tuple_deforming', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Allow JIT compilation of tuple deforming.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'jit_tuple_deforming',
+ boot_val => 'true',
},
-{ name => 'max_pred_locks_per_relation', type => 'int', context => 'PGC_SIGHUP', group => 'LOCK_MANAGEMENT',
- short_desc => 'Sets the maximum number of predicate-locked pages and tuples per relation.',
- long_desc => 'If more than this total of pages and tuples in the same relation are locked by a connection, those locks are replaced by a relation-level lock.',
- variable => 'max_predicate_locks_per_relation',
- boot_val => '-2',
- min => 'INT_MIN',
+{ name => 'join_collapse_limit', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
+ short_desc => 'Sets the FROM-list size beyond which JOIN constructs are not flattened.',
+ long_desc => 'The planner will flatten explicit JOIN constructs into lists of FROM items whenever a list of no more than this many items would result.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'join_collapse_limit',
+ boot_val => '8',
+ min => '1',
max => 'INT_MAX',
},
-{ name => 'max_pred_locks_per_page', type => 'int', context => 'PGC_SIGHUP', group => 'LOCK_MANAGEMENT',
- short_desc => 'Sets the maximum number of predicate-locked tuples per page.',
- long_desc => 'If more than this number of tuples on the same page are locked by a connection, those locks are replaced by a page-level lock.',
- variable => 'max_predicate_locks_per_page',
- boot_val => '2',
- min => '0',
- max => 'INT_MAX',
+{ name => 'krb_caseins_users', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
+ short_desc => 'Sets whether Kerberos and GSSAPI user names should be treated as case-insensitive.',
+ variable => 'pg_krb_caseins_users',
+ boot_val => 'false',
},
-{ name => 'authentication_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
- short_desc => 'Sets the maximum allowed time to complete client authentication.',
- flags => 'GUC_UNIT_S',
- variable => 'AuthenticationTimeout',
- boot_val => '60',
- min => '1',
- max => '600',
+{ name => 'krb_server_keyfile', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
+ short_desc => 'Sets the location of the Kerberos server key file.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'pg_krb_server_keyfile',
+ boot_val => 'PG_KRB_SRVTAB',
},
-# Not for general use
-{ name => 'pre_auth_delay', type => 'int', context => 'PGC_SIGHUP', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Sets the amount of time to wait before authentication on connection startup.',
- long_desc => 'This allows attaching a debugger to the process.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_UNIT_S',
- variable => 'PreAuthDelay',
- boot_val => '0',
- min => '0',
- max => '60',
+{ name => 'lc_messages', type => 'string', context => 'PGC_SUSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets the language in which messages are displayed.',
+ long_desc => 'An empty string means use the operating system setting.',
+ variable => 'locale_messages',
+ boot_val => '""',
+ check_hook => 'check_locale_messages',
+ assign_hook => 'assign_locale_messages',
},
-{ name => 'max_notify_queue_pages', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_DISK',
- short_desc => 'Sets the maximum number of allocated pages for NOTIFY / LISTEN queue.',
- variable => 'max_notify_queue_pages',
- boot_val => '1048576',
- min => '64',
- max => 'INT_MAX',
+{ name => 'lc_monetary', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets the locale for formatting monetary amounts.',
+ long_desc => 'An empty string means use the operating system setting.',
+ variable => 'locale_monetary',
+ boot_val => '"C"',
+ check_hook => 'check_locale_monetary',
+ assign_hook => 'assign_locale_monetary',
},
-{ name => 'wal_decode_buffer_size', type => 'int', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY',
- short_desc => 'Buffer size for reading ahead in the WAL during recovery.',
- long_desc => 'Maximum distance to read ahead in the WAL to prefetch referenced data blocks.',
- flags => 'GUC_UNIT_BYTE',
- variable => 'wal_decode_buffer_size',
- boot_val => '512 * 1024',
- min => '64 * 1024',
- max => 'MaxAllocSize',
+{ name => 'lc_numeric', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets the locale for formatting numbers.',
+ long_desc => 'An empty string means use the operating system setting.',
+ variable => 'locale_numeric',
+ boot_val => '"C"',
+ check_hook => 'check_locale_numeric',
+ assign_hook => 'assign_locale_numeric',
},
-{ name => 'wal_keep_size', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SENDING',
- short_desc => 'Sets the size of WAL files held for standby servers.',
- flags => 'GUC_UNIT_MB',
- variable => 'wal_keep_size_mb',
- boot_val => '0',
- min => '0',
- max => 'MAX_KILOBYTES',
+{ name => 'lc_time', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets the locale for formatting date and time values.',
+ long_desc => 'An empty string means use the operating system setting.',
+ variable => 'locale_time',
+ boot_val => '"C"',
+ check_hook => 'check_locale_time',
+ assign_hook => 'assign_locale_time',
},
-{ name => 'min_wal_size', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
- short_desc => 'Sets the minimum size to shrink the WAL to.',
- flags => 'GUC_UNIT_MB',
- variable => 'min_wal_size_mb',
- boot_val => 'DEFAULT_MIN_WAL_SEGS * (DEFAULT_XLOG_SEG_SIZE / (1024 * 1024))',
- min => '2',
- max => 'MAX_KILOBYTES',
+{ name => 'listen_addresses', type => 'string', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the host name or IP address(es) to listen to.',
+ flags => 'GUC_LIST_INPUT',
+ variable => 'ListenAddresses',
+ boot_val => '"localhost"',
},
-{ name => 'max_wal_size', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
- short_desc => 'Sets the WAL size that triggers a checkpoint.',
- flags => 'GUC_UNIT_MB',
- variable => 'max_wal_size_mb',
- boot_val => 'DEFAULT_MAX_WAL_SEGS * (DEFAULT_XLOG_SEG_SIZE / (1024 * 1024))',
- min => '2',
- max => 'MAX_KILOBYTES',
- assign_hook => 'assign_max_wal_size',
+{ name => 'lo_compat_privileges', type => 'bool', context => 'PGC_SUSET', group => 'COMPAT_OPTIONS_PREVIOUS',
+ short_desc => 'Enables backward compatibility mode for privilege checks on large objects.',
+ long_desc => 'Skips privilege checks when reading or modifying large objects, for compatibility with PostgreSQL releases prior to 9.0.',
+ variable => 'lo_compat_privileges',
+ boot_val => 'false',
},
-{ name => 'checkpoint_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
- short_desc => 'Sets the maximum time between automatic WAL checkpoints.',
- flags => 'GUC_UNIT_S',
- variable => 'CheckPointTimeout',
- boot_val => '300',
- min => '30',
- max => '86400',
+{ name => 'local_preload_libraries', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_PRELOAD',
+ short_desc => 'Lists unprivileged shared libraries to preload into each backend.',
+ flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE',
+ variable => 'local_preload_libraries_string',
+ boot_val => '""',
},
-{ name => 'checkpoint_warning', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
- short_desc => 'Sets the maximum time before warning if checkpoints triggered by WAL volume happen too frequently.',
- long_desc => 'Write a message to the server log if checkpoints caused by the filling of WAL segment files happen more frequently than this amount of time. 0 disables the warning.',
- flags => 'GUC_UNIT_S',
- variable => 'CheckPointWarning',
- boot_val => '30',
+{ name => 'lock_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the maximum allowed duration of any wait for a lock.',
+ long_desc => '0 disables the timeout.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'LockTimeout',
+ boot_val => '0',
min => '0',
max => 'INT_MAX',
},
-{ name => 'checkpoint_flush_after', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
- short_desc => 'Number of pages after which previously performed writes are flushed to disk.',
- long_desc => '0 disables forced writeback.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'checkpoint_flush_after',
- boot_val => 'DEFAULT_CHECKPOINT_FLUSH_AFTER',
- min => '0',
- max => 'WRITEBACK_MAX_PENDING_FLUSHES',
+{ name => 'log_autovacuum_min_duration', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
+ short_desc => 'Sets the minimum execution time above which autovacuum actions will be logged.',
+ long_desc => '-1 disables logging autovacuum actions. 0 means log all autovacuum actions.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'Log_autovacuum_min_duration',
+ boot_val => '600000',
+ min => '-1',
+ max => 'INT_MAX',
},
-{ name => 'wal_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'WAL_SETTINGS',
- short_desc => 'Sets the number of disk-page buffers in shared memory for WAL.',
- long_desc => '-1 means use a fraction of "shared_buffers".',
- flags => 'GUC_UNIT_XBLOCKS',
- variable => 'XLOGbuffers',
- boot_val => '-1',
- min => '-1',
- max => '(INT_MAX / XLOG_BLCKSZ)',
- check_hook => 'check_wal_buffers',
+{ name => 'log_btree_build_stats', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Logs system resource usage statistics (memory and CPU) on various B-tree operations.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'log_btree_build_stats',
+ boot_val => 'false',
+ ifdef => 'BTREE_BUILD_STATS',
},
-{ name => 'wal_writer_delay', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
- short_desc => 'Time between WAL flushes performed in the WAL writer.',
- flags => 'GUC_UNIT_MS',
- variable => 'WalWriterDelay',
- boot_val => '200',
- min => '1',
- max => '10000',
+{ name => 'log_checkpoints', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
+ short_desc => 'Logs each checkpoint.',
+ variable => 'log_checkpoints',
+ boot_val => 'true',
},
-{ name => 'wal_writer_flush_after', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
- short_desc => 'Amount of WAL written out by WAL writer that triggers a flush.',
- flags => 'GUC_UNIT_XBLOCKS',
- variable => 'WalWriterFlushAfter',
- boot_val => 'DEFAULT_WAL_WRITER_FLUSH_AFTER',
- min => '0',
- max => 'INT_MAX',
+{ name => 'log_connections', type => 'string', context => 'PGC_SU_BACKEND', group => 'LOGGING_WHAT',
+ short_desc => 'Logs specified aspects of connection establishment and setup.',
+ flags => 'GUC_LIST_INPUT',
+ variable => 'log_connections_string',
+ boot_val => '""',
+ check_hook => 'check_log_connections',
+ assign_hook => 'assign_log_connections',
},
-{ name => 'wal_skip_threshold', type => 'int', context => 'PGC_USERSET', group => 'WAL_SETTINGS',
- short_desc => 'Minimum size of new file to fsync instead of writing WAL.',
- flags => 'GUC_UNIT_KB',
- variable => 'wal_skip_threshold',
- boot_val => '2048',
- min => '0',
- max => 'MAX_KILOBYTES',
+{ name => 'log_destination', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the destination for server log output.',
+ long_desc => 'Valid values are combinations of "stderr", "syslog", "csvlog", "jsonlog", and "eventlog", depending on the platform.',
+ flags => 'GUC_LIST_INPUT',
+ variable => 'Log_destination_string',
+ boot_val => '"stderr"',
+ check_hook => 'check_log_destination',
+ assign_hook => 'assign_log_destination',
},
-{ name => 'max_wal_senders', type => 'int', context => 'PGC_POSTMASTER', group => 'REPLICATION_SENDING',
- short_desc => 'Sets the maximum number of simultaneously running WAL sender processes.',
- variable => 'max_wal_senders',
- boot_val => '10',
- min => '0',
- max => 'MAX_BACKENDS',
+{ name => 'log_directory', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the destination directory for log files.',
+ long_desc => 'Can be specified as relative to the data directory or as absolute path.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'Log_directory',
+ boot_val => '"log"',
+ check_hook => 'check_canonical_path',
},
-/* see max_wal_senders */
-{ name => 'max_replication_slots', type => 'int', context => 'PGC_POSTMASTER', group => 'REPLICATION_SENDING',
- short_desc => 'Sets the maximum number of simultaneously defined replication slots.',
- variable => 'max_replication_slots',
- boot_val => '10',
- min => '0',
- max => 'MAX_BACKENDS /* XXX? */',
+{ name => 'log_disconnections', type => 'bool', context => 'PGC_SU_BACKEND', group => 'LOGGING_WHAT',
+ short_desc => 'Logs end of a session, including duration.',
+ variable => 'Log_disconnections',
+ boot_val => 'false',
},
-{ name => 'max_slot_wal_keep_size', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SENDING',
- short_desc => 'Sets the maximum WAL size that can be reserved by replication slots.',
- long_desc => 'Replication slots will be marked as failed, and segments released for deletion or recycling, if this much space is occupied by WAL on disk. -1 means no maximum.',
- flags => 'GUC_UNIT_MB',
- variable => 'max_slot_wal_keep_size_mb',
- boot_val => '-1',
- min => '-1',
- max => 'MAX_KILOBYTES',
+{ name => 'log_duration', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
+ short_desc => 'Logs the duration of each completed SQL statement.',
+ variable => 'log_duration',
+ boot_val => 'false',
},
-{ name => 'wal_sender_timeout', type => 'int', context => 'PGC_USERSET', group => 'REPLICATION_SENDING',
- short_desc => 'Sets the maximum time to wait for WAL replication.',
- flags => 'GUC_UNIT_MS',
- variable => 'wal_sender_timeout',
- boot_val => '60 * 1000',
- min => '0',
- max => 'INT_MAX',
+{ name => 'log_error_verbosity', type => 'enum', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
+ short_desc => 'Sets the verbosity of logged messages.',
+ variable => 'Log_error_verbosity',
+ boot_val => 'PGERROR_DEFAULT',
+ options => 'log_error_verbosity_options',
},
-{ name => 'idle_replication_slot_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SENDING',
- short_desc => 'Sets the duration a replication slot can remain idle before it is invalidated.',
- flags => 'GUC_UNIT_S',
- variable => 'idle_replication_slot_timeout_secs',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX',
+{ name => 'log_executor_stats', type => 'bool', context => 'PGC_SUSET', group => 'STATS_MONITORING',
+ short_desc => 'Writes executor performance statistics to the server log.',
+ variable => 'log_executor_stats',
+ boot_val => 'false',
+ check_hook => 'check_stage_log_stats',
+},
+
+{ name => 'log_file_mode', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the file permissions for log files.',
+ long_desc => 'The parameter value is expected to be a numeric mode specification in the form accepted by the chmod and umask system calls. (To use the customary octal format the number must start with a 0 (zero).)',
+ variable => 'Log_file_mode',
+ boot_val => '0600',
+ min => '0000',
+ max => '0777',
+ show_hook => 'show_log_file_mode',
+},
+
+{ name => 'log_filename', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the file name pattern for log files.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'Log_filename',
+ boot_val => '"postgresql-%Y-%m-%d_%H%M%S.log"',
},
-# we have no microseconds designation, so can't supply units here
-{ name => 'commit_delay', type => 'int', context => 'PGC_SUSET', group => 'WAL_SETTINGS',
- short_desc => 'Sets the delay in microseconds between transaction commit and flushing WAL to disk.',
- variable => 'CommitDelay',
- boot_val => '0',
- min => '0',
- max => '100000',
+{ name => 'log_hostname', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
+ short_desc => 'Logs the host name in the connection logs.',
+ long_desc => 'By default, connection logs only show the IP address of the connecting host. If you want them to show the host name you can turn this on, but depending on your host name resolution setup it might impose a non-negligible performance penalty.',
+ variable => 'log_hostname',
+ boot_val => 'false',
},
-{ name => 'commit_siblings', type => 'int', context => 'PGC_USERSET', group => 'WAL_SETTINGS',
- short_desc => 'Sets the minimum number of concurrent open transactions required before performing "commit_delay".',
- variable => 'CommitSiblings',
- boot_val => '5',
- min => '0',
- max => '1000',
+{ name => 'log_line_prefix', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
+ short_desc => 'Controls information prefixed to each log line.',
+ long_desc => 'An empty string means no prefix.',
+ variable => 'Log_line_prefix',
+ boot_val => '"%m [%p] "',
},
-{ name => 'extra_float_digits', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets the number of digits displayed for floating-point values.',
- long_desc => 'This affects real, double precision, and geometric data types. A zero or negative parameter value is added to the standard number of digits (FLT_DIG or DBL_DIG as appropriate). Any value greater than zero selects precise output mode.',
- variable => 'extra_float_digits',
- boot_val => '1',
- min => '-15',
- max => '3',
+{ name => 'log_lock_failures', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
+ short_desc => 'Logs lock failures.',
+ variable => 'log_lock_failures',
+ boot_val => 'false',
+},
+
+{ name => 'log_lock_waits', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
+ short_desc => 'Logs long lock waits.',
+ variable => 'log_lock_waits',
+ boot_val => 'true',
},
{ name => 'log_min_duration_sample', type => 'int', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
@@ -1763,14 +1651,20 @@
max => 'INT_MAX',
},
-{ name => 'log_autovacuum_min_duration', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
- short_desc => 'Sets the minimum execution time above which autovacuum actions will be logged.',
- long_desc => '-1 disables logging autovacuum actions. 0 means log all autovacuum actions.',
- flags => 'GUC_UNIT_MS',
- variable => 'Log_autovacuum_min_duration',
- boot_val => '600000',
- min => '-1',
- max => 'INT_MAX',
+{ name => 'log_min_error_statement', type => 'enum', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
+ short_desc => 'Causes all statements generating error at or above this level to be logged.',
+ long_desc => 'Each level includes all the levels that follow it. The later the level, the fewer messages are sent.',
+ variable => 'log_min_error_statement',
+ boot_val => 'ERROR',
+ options => 'server_message_level_options',
+},
+
+{ name => 'log_min_messages', type => 'enum', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
+ short_desc => 'Sets the message levels that are logged.',
+ long_desc => 'Each level includes all the levels that follow it. The later the level, the fewer messages are sent.',
+ variable => 'log_min_messages',
+ boot_val => 'WARNING',
+ options => 'server_message_level_options',
},
{ name => 'log_parameter_max_length', type => 'int', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
@@ -1793,133 +1687,157 @@
max => 'INT_MAX / 2',
},
-{ name => 'bgwriter_delay', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_BGWRITER',
- short_desc => 'Background writer sleep time between rounds.',
- flags => 'GUC_UNIT_MS',
- variable => 'BgWriterDelay',
- boot_val => '200',
- min => '10',
- max => '10000',
+{ name => 'log_parser_stats', type => 'bool', context => 'PGC_SUSET', group => 'STATS_MONITORING',
+ short_desc => 'Writes parser performance statistics to the server log.',
+ variable => 'log_parser_stats',
+ boot_val => 'false',
+ check_hook => 'check_stage_log_stats',
},
-# Same upper limit as shared_buffers
-{ name => 'bgwriter_lru_maxpages', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_BGWRITER',
- short_desc => 'Background writer maximum number of LRU pages to flush per round.',
- long_desc => '0 disables background writing.',
- variable => 'bgwriter_lru_maxpages',
- boot_val => '100',
- min => '0',
- max => 'INT_MAX / 2',
+{ name => 'log_planner_stats', type => 'bool', context => 'PGC_SUSET', group => 'STATS_MONITORING',
+ short_desc => 'Writes planner performance statistics to the server log.',
+ variable => 'log_planner_stats',
+ boot_val => 'false',
+ check_hook => 'check_stage_log_stats',
},
-{ name => 'bgwriter_flush_after', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_BGWRITER',
- short_desc => 'Number of pages after which previously performed writes are flushed to disk.',
- long_desc => '0 disables forced writeback.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'bgwriter_flush_after',
- boot_val => 'DEFAULT_BGWRITER_FLUSH_AFTER',
+{ name => 'log_recovery_conflict_waits', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
+ short_desc => 'Logs standby recovery conflict waits.',
+ variable => 'log_recovery_conflict_waits',
+ boot_val => 'false',
+},
+
+{ name => 'log_replication_commands', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
+ short_desc => 'Logs each replication command.',
+ variable => 'log_replication_commands',
+ boot_val => 'false',
+},
+
+{ name => 'log_rotation_age', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the amount of time to wait before forcing log file rotation.',
+ long_desc => '0 disables time-based creation of new log files.',
+ flags => 'GUC_UNIT_MIN',
+ variable => 'Log_RotationAge',
+ boot_val => 'HOURS_PER_DAY * MINS_PER_HOUR',
min => '0',
- max => 'WRITEBACK_MAX_PENDING_FLUSHES',
+ max => 'INT_MAX / SECS_PER_MINUTE',
},
-{ name => 'effective_io_concurrency', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_IO',
- short_desc => 'Number of simultaneous requests that can be handled efficiently by the disk subsystem.',
- long_desc => '0 disables simultaneous requests.',
- flags => 'GUC_EXPLAIN',
- variable => 'effective_io_concurrency',
- boot_val => 'DEFAULT_EFFECTIVE_IO_CONCURRENCY',
+{ name => 'log_rotation_size', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the maximum size a log file can reach before being rotated.',
+ long_desc => '0 disables size-based creation of new log files.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'Log_RotationSize',
+ boot_val => '10 * 1024',
min => '0',
- max => 'MAX_IO_CONCURRENCY',
+ max => 'INT_MAX',
},
-{ name => 'maintenance_io_concurrency', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_IO',
- short_desc => 'A variant of "effective_io_concurrency" that is used for maintenance work.',
- long_desc => '0 disables simultaneous requests.',
- flags => 'GUC_EXPLAIN',
- variable => 'maintenance_io_concurrency',
- boot_val => 'DEFAULT_MAINTENANCE_IO_CONCURRENCY',
+{ name => 'log_startup_progress_interval', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHEN',
+ short_desc => 'Time between progress updates for long-running startup operations.',
+ long_desc => '0 disables progress updates.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'log_startup_progress_interval',
+ boot_val => '10000',
min => '0',
- max => 'MAX_IO_CONCURRENCY',
- assign_hook => 'assign_maintenance_io_concurrency',
+ max => 'INT_MAX',
},
-{ name => 'io_max_combine_limit', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_IO',
- short_desc => 'Server-wide limit that clamps io_combine_limit.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'io_max_combine_limit',
- boot_val => 'DEFAULT_IO_COMBINE_LIMIT',
- min => '1',
- max => 'MAX_IO_COMBINE_LIMIT',
- assign_hook => 'assign_io_max_combine_limit',
+{ name => 'log_statement', type => 'enum', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
+ short_desc => 'Sets the type of statements logged.',
+ variable => 'log_statement',
+ boot_val => 'LOGSTMT_NONE',
+ options => 'log_statement_options',
},
-{ name => 'io_combine_limit', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_IO',
- short_desc => 'Limit on the size of data reads and writes.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'io_combine_limit_guc',
- boot_val => 'DEFAULT_IO_COMBINE_LIMIT',
- min => '1',
- max => 'MAX_IO_COMBINE_LIMIT',
- assign_hook => 'assign_io_combine_limit',
+{ name => 'log_statement_sample_rate', type => 'real', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
+ short_desc => 'Fraction of statements exceeding "log_min_duration_sample" to be logged.',
+ long_desc => 'Use a value between 0.0 (never log) and 1.0 (always log).',
+ variable => 'log_statement_sample_rate',
+ boot_val => '1.0',
+ min => '0.0',
+ max => '1.0',
},
-{ name => 'io_max_concurrency', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_IO',
- short_desc => 'Max number of IOs that one process can execute simultaneously.',
- variable => 'io_max_concurrency',
+{ name => 'log_statement_stats', type => 'bool', context => 'PGC_SUSET', group => 'STATS_MONITORING',
+ short_desc => 'Writes cumulative performance statistics to the server log.',
+ variable => 'log_statement_stats',
+ boot_val => 'false',
+ check_hook => 'check_log_stats',
+},
+
+{ name => 'log_temp_files', type => 'int', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
+ short_desc => 'Log the use of temporary files larger than this number of kilobytes.',
+ long_desc => '-1 disables logging temporary files. 0 means log all temporary files.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'log_temp_files',
boot_val => '-1',
min => '-1',
- max => '1024',
- check_hook => 'check_io_max_concurrency',
+ max => 'INT_MAX',
},
-{ name => 'io_workers', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_IO',
- short_desc => 'Number of IO worker processes, for io_method=worker.',
- variable => 'io_workers',
- boot_val => '3',
- min => '1',
- max => 'MAX_IO_WORKERS',
+{ name => 'log_timezone', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
+ short_desc => 'Sets the time zone to use in log messages.',
+ variable => 'log_timezone_string',
+ boot_val => '"GMT"',
+ check_hook => 'check_log_timezone',
+ assign_hook => 'assign_log_timezone',
+ show_hook => 'show_log_timezone',
},
-{ name => 'backend_flush_after', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_IO',
- short_desc => 'Number of pages after which previously performed writes are flushed to disk.',
- long_desc => '0 disables forced writeback.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'backend_flush_after',
- boot_val => 'DEFAULT_BACKEND_FLUSH_AFTER',
- min => '0',
- max => 'WRITEBACK_MAX_PENDING_FLUSHES',
+{ name => 'log_transaction_sample_rate', type => 'real', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
+ short_desc => 'Sets the fraction of transactions from which to log all statements.',
+ long_desc => 'Use a value between 0.0 (never log) and 1.0 (log all statements for all transactions).',
+ variable => 'log_xact_sample_rate',
+ boot_val => '0.0',
+ min => '0.0',
+ max => '1.0',
},
-{ name => 'max_worker_processes', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_WORKER_PROCESSES',
- short_desc => 'Maximum number of concurrent worker processes.',
- variable => 'max_worker_processes',
- boot_val => '8',
- min => '0',
- max => 'MAX_BACKENDS',
+{ name => 'log_truncate_on_rotation', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Truncate existing log files of same name during log rotation.',
+ variable => 'Log_truncate_on_rotation',
+ boot_val => 'false',
},
-{ name => 'max_logical_replication_workers', type => 'int', context => 'PGC_POSTMASTER', group => 'REPLICATION_SUBSCRIBERS',
- short_desc => 'Maximum number of logical replication worker processes.',
- variable => 'max_logical_replication_workers',
- boot_val => '4',
- min => '0',
- max => 'MAX_BACKENDS',
+{ name => 'logging_collector', type => 'bool', context => 'PGC_POSTMASTER', group => 'LOGGING_WHERE',
+ short_desc => 'Start a subprocess to capture stderr, csvlog and/or jsonlog into log files.',
+ variable => 'Logging_collector',
+ boot_val => 'false',
},
-{ name => 'max_sync_workers_per_subscription', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SUBSCRIBERS',
- short_desc => 'Maximum number of table synchronization workers per subscription.',
- variable => 'max_sync_workers_per_subscription',
- boot_val => '2',
+{ name => 'logical_decoding_work_mem', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the maximum memory to be used for logical decoding.',
+ long_desc => 'This much memory can be used by each internal reorder buffer before spilling to disk.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'logical_decoding_work_mem',
+ boot_val => '65536',
+ min => '64',
+ max => 'MAX_KILOBYTES',
+},
+
+{ name => 'maintenance_io_concurrency', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_IO',
+ short_desc => 'A variant of "effective_io_concurrency" that is used for maintenance work.',
+ long_desc => '0 disables simultaneous requests.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'maintenance_io_concurrency',
+ boot_val => 'DEFAULT_MAINTENANCE_IO_CONCURRENCY',
min => '0',
- max => 'MAX_BACKENDS',
+ max => 'MAX_IO_CONCURRENCY',
+ assign_hook => 'assign_maintenance_io_concurrency',
},
-{ name => 'max_parallel_apply_workers_per_subscription', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SUBSCRIBERS',
- short_desc => 'Maximum number of parallel apply workers per subscription.',
- variable => 'max_parallel_apply_workers_per_subscription',
- boot_val => '2',
- min => '0',
- max => 'MAX_PARALLEL_WORKER_LIMIT',
+# Dynamic shared memory has a higher overhead than local memory
+# contexts, so when testing low-memory scenarios that could use shared
+# memory, the recommended minimum is 1MB.
+{ name => 'maintenance_work_mem', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the maximum memory to be used for maintenance operations.',
+ long_desc => 'This includes operations such as VACUUM and CREATE INDEX.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'maintenance_work_mem',
+ boot_val => '65536',
+ min => '64',
+ max => 'MAX_KILOBYTES',
},
{ name => 'max_active_replication_origins', type => 'int', context => 'PGC_POSTMASTER', group => 'REPLICATION_SUBSCRIBERS',
@@ -1930,23 +1848,19 @@
max => 'MAX_BACKENDS',
},
-{ name => 'log_rotation_age', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Sets the amount of time to wait before forcing log file rotation.',
- long_desc => '0 disables time-based creation of new log files.',
- flags => 'GUC_UNIT_MIN',
- variable => 'Log_RotationAge',
- boot_val => 'HOURS_PER_DAY * MINS_PER_HOUR',
- min => '0',
- max => 'INT_MAX / SECS_PER_MINUTE',
+{ name => 'max_connections', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the maximum number of concurrent connections.',
+ variable => 'MaxConnections',
+ boot_val => '100',
+ min => '1',
+ max => 'MAX_BACKENDS',
},
-{ name => 'log_rotation_size', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Sets the maximum size a log file can reach before being rotated.',
- long_desc => '0 disables size-based creation of new log files.',
- flags => 'GUC_UNIT_KB',
- variable => 'Log_RotationSize',
- boot_val => '10 * 1024',
- min => '0',
+{ name => 'max_files_per_process', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_KERNEL',
+ short_desc => 'Sets the maximum number of files each server process is allowed to open simultaneously.',
+ variable => 'max_files_per_process',
+ boot_val => '1000',
+ min => '64',
max => 'INT_MAX',
},
@@ -1959,15 +1873,6 @@
max => 'FUNC_MAX_ARGS',
},
-{ name => 'max_index_keys', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the maximum number of index keys.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'max_index_keys',
- boot_val => 'INDEX_MAX_KEYS',
- min => 'INDEX_MAX_KEYS',
- max => 'INDEX_MAX_KEYS',
-},
-
{ name => 'max_identifier_length', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
short_desc => 'Shows the maximum identifier length.',
flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
@@ -1977,139 +1882,47 @@
max => 'NAMEDATALEN - 1',
},
-{ name => 'block_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the size of a disk block.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'block_size',
- boot_val => 'BLCKSZ',
- min => 'BLCKSZ',
- max => 'BLCKSZ',
-},
-
-{ name => 'segment_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the number of pages per disk file.',
- flags => 'GUC_UNIT_BLOCKS | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'segment_size',
- boot_val => 'RELSEG_SIZE',
- min => 'RELSEG_SIZE',
- max => 'RELSEG_SIZE',
-},
-
-{ name => 'wal_block_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the block size in the write ahead log.',
+{ name => 'max_index_keys', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the maximum number of index keys.',
flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'wal_block_size',
- boot_val => 'XLOG_BLCKSZ',
- min => 'XLOG_BLCKSZ',
- max => 'XLOG_BLCKSZ',
+ variable => 'max_index_keys',
+ boot_val => 'INDEX_MAX_KEYS',
+ min => 'INDEX_MAX_KEYS',
+ max => 'INDEX_MAX_KEYS',
},
-{ name => 'wal_retrieve_retry_interval', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets the time to wait before retrying to retrieve WAL after a failed attempt.',
- flags => 'GUC_UNIT_MS',
- variable => 'wal_retrieve_retry_interval',
- boot_val => '5000',
- min => '1',
+# See also CheckRequiredParameterValues() if this parameter changes
+{ name => 'max_locks_per_transaction', type => 'int', context => 'PGC_POSTMASTER', group => 'LOCK_MANAGEMENT',
+ short_desc => 'Sets the maximum number of locks per transaction.',
+ long_desc => 'The shared lock table is sized on the assumption that at most "max_locks_per_transaction" objects per server process or prepared transaction will need to be locked at any one time.',
+ variable => 'max_locks_per_xact',
+ boot_val => '64',
+ min => '10',
max => 'INT_MAX',
},
-{ name => 'wal_segment_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the size of write ahead log segments.',
- flags => 'GUC_UNIT_BYTE | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
- variable => 'wal_segment_size',
- boot_val => 'DEFAULT_XLOG_SEG_SIZE',
- min => 'WalSegMinSize',
- max => 'WalSegMaxSize',
- check_hook => 'check_wal_segment_size',
-},
-
-{ name => 'wal_summary_keep_time', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_SUMMARIZATION',
- short_desc => 'Time for which WAL summary files should be kept.',
- long_desc => '0 disables automatic summary file deletion.',
- flags => 'GUC_UNIT_MIN',
- variable => 'wal_summary_keep_time',
- boot_val => '10 * HOURS_PER_DAY * MINS_PER_HOUR /* 10 days */',
- min => '0',
- max => 'INT_MAX / SECS_PER_MINUTE',
-},
-
-{ name => 'autovacuum_naptime', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Time to sleep between autovacuum runs.',
- flags => 'GUC_UNIT_S',
- variable => 'autovacuum_naptime',
- boot_val => '60',
- min => '1',
- max => 'INT_MAX / 1000',
-},
-
-{ name => 'autovacuum_vacuum_threshold', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Minimum number of tuple updates or deletes prior to vacuum.',
- variable => 'autovacuum_vac_thresh',
- boot_val => '50',
+{ name => 'max_logical_replication_workers', type => 'int', context => 'PGC_POSTMASTER', group => 'REPLICATION_SUBSCRIBERS',
+ short_desc => 'Maximum number of logical replication worker processes.',
+ variable => 'max_logical_replication_workers',
+ boot_val => '4',
min => '0',
- max => 'INT_MAX',
-},
-
-{ name => 'autovacuum_vacuum_max_threshold', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Maximum number of tuple updates or deletes prior to vacuum.',
- long_desc => '-1 disables the maximum threshold.',
- variable => 'autovacuum_vac_max_thresh',
- boot_val => '100000000',
- min => '-1',
- max => 'INT_MAX',
+ max => 'MAX_BACKENDS',
},
-{ name => 'autovacuum_vacuum_insert_threshold', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Minimum number of tuple inserts prior to vacuum.',
- long_desc => '-1 disables insert vacuums.',
- variable => 'autovacuum_vac_ins_thresh',
- boot_val => '1000',
- min => '-1',
+{ name => 'max_notify_queue_pages', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_DISK',
+ short_desc => 'Sets the maximum number of allocated pages for NOTIFY / LISTEN queue.',
+ variable => 'max_notify_queue_pages',
+ boot_val => '1048576',
+ min => '64',
max => 'INT_MAX',
},
-{ name => 'autovacuum_analyze_threshold', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Minimum number of tuple inserts, updates, or deletes prior to analyze.',
- variable => 'autovacuum_anl_thresh',
- boot_val => '50',
+{ name => 'max_parallel_apply_workers_per_subscription', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SUBSCRIBERS',
+ short_desc => 'Maximum number of parallel apply workers per subscription.',
+ variable => 'max_parallel_apply_workers_per_subscription',
+ boot_val => '2',
min => '0',
- max => 'INT_MAX',
-},
-
-# see varsup.c for why this is PGC_POSTMASTER not PGC_SIGHUP
-# see vacuum_failsafe_age if you change the upper-limit value.
-{ name => 'autovacuum_freeze_max_age', type => 'int', context => 'PGC_POSTMASTER', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Age at which to autovacuum a table to prevent transaction ID wraparound.',
- variable => 'autovacuum_freeze_max_age',
- boot_val => '200000000',
- min => '100000',
- max => '2000000000',
-},
-
-# see multixact.c for why this is PGC_POSTMASTER not PGC_SIGHUP
-{ name => 'autovacuum_multixact_freeze_max_age', type => 'int', context => 'PGC_POSTMASTER', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Multixact age at which to autovacuum a table to prevent multixact wraparound.',
- variable => 'autovacuum_multixact_freeze_max_age',
- boot_val => '400000000',
- min => '10000',
- max => '2000000000',
-},
-
-# see max_connections
-{ name => 'autovacuum_worker_slots', type => 'int', context => 'PGC_POSTMASTER', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Sets the number of backend slots to allocate for autovacuum workers.',
- variable => 'autovacuum_worker_slots',
- boot_val => '16',
- min => '1',
- max => 'MAX_BACKENDS',
-},
-
-{ name => 'autovacuum_max_workers', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Sets the maximum number of simultaneously running autovacuum worker processes.',
- variable => 'autovacuum_max_workers',
- boot_val => '3',
- min => '1',
- max => 'MAX_BACKENDS',
+ max => 'MAX_PARALLEL_WORKER_LIMIT',
},
{ name => 'max_parallel_maintenance_workers', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_WORKER_PROCESSES',
@@ -2120,6 +1933,15 @@
max => 'MAX_PARALLEL_WORKER_LIMIT',
},
+{ name => 'max_parallel_workers', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_WORKER_PROCESSES',
+ short_desc => 'Sets the maximum number of parallel workers that can be active at one time.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'max_parallel_workers',
+ boot_val => '8',
+ min => '0',
+ max => 'MAX_PARALLEL_WORKER_LIMIT',
+},
+
{ name => 'max_parallel_workers_per_gather', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_WORKER_PROCESSES',
short_desc => 'Sets the maximum number of parallel processes per executor node.',
flags => 'GUC_EXPLAIN',
@@ -2129,97 +1951,142 @@
max => 'MAX_PARALLEL_WORKER_LIMIT',
},
-{ name => 'max_parallel_workers', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_WORKER_PROCESSES',
- short_desc => 'Sets the maximum number of parallel workers that can be active at one time.',
- flags => 'GUC_EXPLAIN',
- variable => 'max_parallel_workers',
- boot_val => '8',
+{ name => 'max_pred_locks_per_page', type => 'int', context => 'PGC_SIGHUP', group => 'LOCK_MANAGEMENT',
+ short_desc => 'Sets the maximum number of predicate-locked tuples per page.',
+ long_desc => 'If more than this number of tuples on the same page are locked by a connection, those locks are replaced by a page-level lock.',
+ variable => 'max_predicate_locks_per_page',
+ boot_val => '2',
+ min => '0',
+ max => 'INT_MAX',
+},
+
+{ name => 'max_pred_locks_per_relation', type => 'int', context => 'PGC_SIGHUP', group => 'LOCK_MANAGEMENT',
+ short_desc => 'Sets the maximum number of predicate-locked pages and tuples per relation.',
+ long_desc => 'If more than this total of pages and tuples in the same relation are locked by a connection, those locks are replaced by a relation-level lock.',
+ variable => 'max_predicate_locks_per_relation',
+ boot_val => '-2',
+ min => 'INT_MIN',
+ max => 'INT_MAX',
+},
+
+{ name => 'max_pred_locks_per_transaction', type => 'int', context => 'PGC_POSTMASTER', group => 'LOCK_MANAGEMENT',
+ short_desc => 'Sets the maximum number of predicate locks per transaction.',
+ long_desc => 'The shared predicate lock table is sized on the assumption that at most "max_pred_locks_per_transaction" objects per server process or prepared transaction will need to be locked at any one time.',
+ variable => 'max_predicate_locks_per_xact',
+ boot_val => '64',
+ min => '10',
+ max => 'INT_MAX',
+},
+
+# See also CheckRequiredParameterValues() if this parameter changes
+{ name => 'max_prepared_transactions', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the maximum number of simultaneously prepared transactions.',
+ variable => 'max_prepared_xacts',
+ boot_val => '0',
+ min => '0',
+ max => 'MAX_BACKENDS',
+},
+
+/* see max_wal_senders */
+{ name => 'max_replication_slots', type => 'int', context => 'PGC_POSTMASTER', group => 'REPLICATION_SENDING',
+ short_desc => 'Sets the maximum number of simultaneously defined replication slots.',
+ variable => 'max_replication_slots',
+ boot_val => '10',
min => '0',
- max => 'MAX_PARALLEL_WORKER_LIMIT',
+ max => 'MAX_BACKENDS /* XXX? */',
},
-{ name => 'autovacuum_work_mem', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_MEM',
- short_desc => 'Sets the maximum memory to be used by each autovacuum worker process.',
- long_desc => '-1 means use "maintenance_work_mem".',
- flags => 'GUC_UNIT_KB',
- variable => 'autovacuum_work_mem',
+{ name => 'max_slot_wal_keep_size', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SENDING',
+ short_desc => 'Sets the maximum WAL size that can be reserved by replication slots.',
+ long_desc => 'Replication slots will be marked as failed, and segments released for deletion or recycling, if this much space is occupied by WAL on disk. -1 means no maximum.',
+ flags => 'GUC_UNIT_MB',
+ variable => 'max_slot_wal_keep_size_mb',
boot_val => '-1',
min => '-1',
max => 'MAX_KILOBYTES',
- check_hook => 'check_autovacuum_work_mem',
},
-{ name => 'tcp_keepalives_idle', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
- short_desc => 'Time between issuing TCP keepalives.',
- long_desc => '0 means use the system default.',
- flags => 'GUC_UNIT_S',
- variable => 'tcp_keepalives_idle',
- boot_val => '0',
- min => '0',
+# We use the hopefully-safely-small value of 100kB as the compiled-in
+# default for max_stack_depth. InitializeGUCOptions will increase it
+# if possible, depending on the actual platform-specific stack limit.
+{ name => 'max_stack_depth', type => 'int', context => 'PGC_SUSET', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the maximum stack depth, in kilobytes.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'max_stack_depth',
+ boot_val => '100',
+ min => '100',
+ max => 'MAX_KILOBYTES',
+ check_hook => 'check_max_stack_depth',
+ assign_hook => 'assign_max_stack_depth',
+},
+
+{ name => 'max_standby_archive_delay', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets the maximum delay before canceling queries when a hot standby server is processing archived WAL data.',
+ long_desc => '-1 means wait forever.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'max_standby_archive_delay',
+ boot_val => '30 * 1000',
+ min => '-1',
max => 'INT_MAX',
- assign_hook => 'assign_tcp_keepalives_idle',
- show_hook => 'show_tcp_keepalives_idle',
},
-{ name => 'tcp_keepalives_interval', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
- short_desc => 'Time between TCP keepalive retransmits.',
- long_desc => '0 means use the system default.',
- flags => 'GUC_UNIT_S',
- variable => 'tcp_keepalives_interval',
- boot_val => '0',
- min => '0',
+{ name => 'max_standby_streaming_delay', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets the maximum delay before canceling queries when a hot standby server is processing streamed WAL data.',
+ long_desc => '-1 means wait forever.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'max_standby_streaming_delay',
+ boot_val => '30 * 1000',
+ min => '-1',
max => 'INT_MAX',
- assign_hook => 'assign_tcp_keepalives_interval',
- show_hook => 'show_tcp_keepalives_interval',
},
-{ name => 'ssl_renegotiation_limit', type => 'int', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
- short_desc => 'SSL renegotiation is no longer supported; this can only be 0.',
- flags => 'GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'ssl_renegotiation_limit',
- boot_val => '0',
+{ name => 'max_sync_workers_per_subscription', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SUBSCRIBERS',
+ short_desc => 'Maximum number of table synchronization workers per subscription.',
+ variable => 'max_sync_workers_per_subscription',
+ boot_val => '2',
min => '0',
- max => '0',
+ max => 'MAX_BACKENDS',
},
-{ name => 'tcp_keepalives_count', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
- short_desc => 'Maximum number of TCP keepalive retransmits.',
- long_desc => 'Number of consecutive keepalive retransmits that can be lost before a connection is considered dead. 0 means use the system default.',
- variable => 'tcp_keepalives_count',
- boot_val => '0',
+{ name => 'max_wal_senders', type => 'int', context => 'PGC_POSTMASTER', group => 'REPLICATION_SENDING',
+ short_desc => 'Sets the maximum number of simultaneously running WAL sender processes.',
+ variable => 'max_wal_senders',
+ boot_val => '10',
min => '0',
- max => 'INT_MAX',
- assign_hook => 'assign_tcp_keepalives_count',
- show_hook => 'show_tcp_keepalives_count',
+ max => 'MAX_BACKENDS',
},
-{ name => 'gin_fuzzy_search_limit', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_OTHER',
- short_desc => 'Sets the maximum allowed result for exact search by GIN.',
- long_desc => '0 means no limit.',
- variable => 'GinFuzzySearchLimit',
- boot_val => '0',
+{ name => 'max_wal_size', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
+ short_desc => 'Sets the WAL size that triggers a checkpoint.',
+ flags => 'GUC_UNIT_MB',
+ variable => 'max_wal_size_mb',
+ boot_val => 'DEFAULT_MAX_WAL_SEGS * (DEFAULT_XLOG_SEG_SIZE / (1024 * 1024))',
+ min => '2',
+ max => 'MAX_KILOBYTES',
+ assign_hook => 'assign_max_wal_size',
+},
+
+{ name => 'max_worker_processes', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_WORKER_PROCESSES',
+ short_desc => 'Maximum number of concurrent worker processes.',
+ variable => 'max_worker_processes',
+ boot_val => '8',
min => '0',
- max => 'INT_MAX',
+ max => 'MAX_BACKENDS',
},
-{ name => 'effective_cache_size', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the planner\'s assumption about the total size of the data caches.',
- long_desc => 'That is, the total size of the caches (kernel cache and shared buffers) used for PostgreSQL data files. This is measured in disk pages, which are normally 8 kB each.',
- flags => 'GUC_UNIT_BLOCKS | GUC_EXPLAIN',
- variable => 'effective_cache_size',
- boot_val => 'DEFAULT_EFFECTIVE_CACHE_SIZE',
- min => '1',
- max => 'INT_MAX',
+{ name => 'md5_password_warnings', type => 'bool', context => 'PGC_USERSET', group => 'CONN_AUTH_AUTH',
+ short_desc => 'Enables deprecation warnings for MD5 passwords.',
+ variable => 'md5_password_warnings',
+ boot_val => 'true',
},
-{ name => 'min_parallel_table_scan_size', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the minimum amount of table data for a parallel scan.',
- long_desc => 'If the planner estimates that it will read a number of table pages too small to reach this limit, a parallel scan will not be considered.',
- flags => 'GUC_UNIT_BLOCKS | GUC_EXPLAIN',
- variable => 'min_parallel_table_scan_size',
- boot_val => '(8 * 1024 * 1024) / BLCKSZ',
+{ name => 'min_dynamic_shared_memory', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Amount of dynamic shared memory reserved at startup.',
+ flags => 'GUC_UNIT_MB',
+ variable => 'min_dynamic_shared_memory',
+ boot_val => '0',
min => '0',
- max => 'INT_MAX / 3',
+ max => '(int) Min((size_t) INT_MAX, SIZE_MAX / (1024 * 1024))',
},
{ name => 'min_parallel_index_scan_size', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
@@ -2232,115 +2099,169 @@
max => 'INT_MAX / 3',
},
-# Can't be set in postgresql.conf
-{ name => 'server_version_num', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the server version as an integer.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'server_version_num',
- boot_val => 'PG_VERSION_NUM',
- min => 'PG_VERSION_NUM',
- max => 'PG_VERSION_NUM',
+{ name => 'min_parallel_table_scan_size', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the minimum amount of table data for a parallel scan.',
+ long_desc => 'If the planner estimates that it will read a number of table pages too small to reach this limit, a parallel scan will not be considered.',
+ flags => 'GUC_UNIT_BLOCKS | GUC_EXPLAIN',
+ variable => 'min_parallel_table_scan_size',
+ boot_val => '(8 * 1024 * 1024) / BLCKSZ',
+ min => '0',
+ max => 'INT_MAX / 3',
},
-{ name => 'log_temp_files', type => 'int', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
- short_desc => 'Log the use of temporary files larger than this number of kilobytes.',
- long_desc => '-1 disables logging temporary files. 0 means log all temporary files.',
- flags => 'GUC_UNIT_KB',
- variable => 'log_temp_files',
- boot_val => '-1',
- min => '-1',
- max => 'INT_MAX',
+{ name => 'min_wal_size', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
+ short_desc => 'Sets the minimum size to shrink the WAL to.',
+ flags => 'GUC_UNIT_MB',
+ variable => 'min_wal_size_mb',
+ boot_val => 'DEFAULT_MIN_WAL_SEGS * (DEFAULT_XLOG_SEG_SIZE / (1024 * 1024))',
+ min => '2',
+ max => 'MAX_KILOBYTES',
},
-{ name => 'track_activity_query_size', type => 'int', context => 'PGC_POSTMASTER', group => 'STATS_CUMULATIVE',
- short_desc => 'Sets the size reserved for pg_stat_activity.query, in bytes.',
- flags => 'GUC_UNIT_BYTE',
- variable => 'pgstat_track_activity_query_size',
- boot_val => '1024',
- min => '100',
- max => '1048576',
+{ name => 'multixact_member_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the size of the dedicated buffer pool used for the MultiXact member cache.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'multixact_member_buffers',
+ boot_val => '32',
+ min => '16',
+ max => 'SLRU_MAX_ALLOWED_BUFFERS',
+ check_hook => 'check_multixact_member_buffers',
},
-{ name => 'gin_pending_list_limit', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the maximum size of the pending list for GIN index.',
- flags => 'GUC_UNIT_KB',
- variable => 'gin_pending_list_limit',
- boot_val => '4096',
- min => '64',
- max => 'MAX_KILOBYTES',
+{ name => 'multixact_offset_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the size of the dedicated buffer pool used for the MultiXact offset cache.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'multixact_offset_buffers',
+ boot_val => '16',
+ min => '16',
+ max => 'SLRU_MAX_ALLOWED_BUFFERS',
+ check_hook => 'check_multixact_offset_buffers',
},
-{ name => 'tcp_user_timeout', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
- short_desc => 'TCP user timeout.',
- long_desc => '0 means use the system default.',
- flags => 'GUC_UNIT_MS',
- variable => 'tcp_user_timeout',
+{ name => 'notify_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the size of the dedicated buffer pool used for the LISTEN/NOTIFY message cache.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'notify_buffers',
+ boot_val => '16',
+ min => '16',
+ max => 'SLRU_MAX_ALLOWED_BUFFERS',
+ check_hook => 'check_notify_buffers',
+},
+
+{ name => 'num_os_semaphores', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the number of semaphores required for the server.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
+ variable => 'num_os_semaphores',
boot_val => '0',
min => '0',
max => 'INT_MAX',
- assign_hook => 'assign_tcp_user_timeout',
- show_hook => 'show_tcp_user_timeout',
},
-{ name => 'huge_page_size', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'The size of huge page that should be requested.',
- long_desc => '0 means use the system default.',
- flags => 'GUC_UNIT_KB',
- variable => 'huge_page_size',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX',
- check_hook => 'check_huge_page_size',
+{ name => 'oauth_validator_libraries', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
+ short_desc => 'Lists libraries that may be called to validate OAuth v2 bearer tokens.',
+ flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY',
+ variable => 'oauth_validator_libraries_string',
+ boot_val => '""',
+},
+
+# this is undocumented because not exposed in a standard build
+{ name => 'optimize_bounded_sort', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables bounded sorting using heap sort.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_EXPLAIN',
+ variable => 'optimize_bounded_sort',
+ boot_val => 'true',
+ ifdef => 'DEBUG_BOUNDED_SORT',
+},
+
+{ name => 'parallel_leader_participation', type => 'bool', context => 'PGC_USERSET', group => 'RESOURCES_WORKER_PROCESSES',
+ short_desc => 'Controls whether Gather and Gather Merge also run subplans.',
+ long_desc => 'Should gather nodes also run subplans or just gather tuples?',
+ flags => 'GUC_EXPLAIN',
+ variable => 'parallel_leader_participation',
+ boot_val => 'true',
+},
+
+{ name => 'parallel_setup_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the planner\'s estimate of the cost of starting up worker processes for parallel query.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'parallel_setup_cost',
+ boot_val => 'DEFAULT_PARALLEL_SETUP_COST',
+ min => '0',
+ max => 'DBL_MAX',
+},
+
+{ name => 'parallel_tuple_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the planner\'s estimate of the cost of passing each tuple (row) from worker to leader backend.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'parallel_tuple_cost',
+ boot_val => 'DEFAULT_PARALLEL_TUPLE_COST',
+ min => '0',
+ max => 'DBL_MAX',
+},
+
+{ name => 'password_encryption', type => 'enum', context => 'PGC_USERSET', group => 'CONN_AUTH_AUTH',
+ short_desc => 'Chooses the algorithm for encrypting passwords.',
+ variable => 'Password_encryption',
+ boot_val => 'PASSWORD_TYPE_SCRAM_SHA_256',
+ options => 'password_encryption_options',
+},
+
+{ name => 'plan_cache_mode', type => 'enum', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
+ short_desc => 'Controls the planner\'s selection of custom or generic plan.',
+ long_desc => 'Prepared statements can have custom and generic plans, and the planner will attempt to choose which is better. This can be set to override the default behavior.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'plan_cache_mode',
+ boot_val => 'PLAN_CACHE_MODE_AUTO',
+ options => 'plan_cache_mode_options',
},
-{ name => 'debug_discard_caches', type => 'int', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Aggressively flush system caches for debugging purposes.',
- long_desc => '0 means use normal caching behavior.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'debug_discard_caches',
- boot_val => 'DEFAULT_DEBUG_DISCARD_CACHES',
- min => 'MIN_DEBUG_DISCARD_CACHES',
- max => 'MAX_DEBUG_DISCARD_CACHES',
+{ name => 'port', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the TCP port the server listens on.',
+ variable => 'PostPortNumber',
+ boot_val => 'DEF_PGPORT',
+ min => '1',
+ max => '65535',
},
-{ name => 'client_connection_check_interval', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
- short_desc => 'Sets the time interval between checks for disconnection while running queries.',
- long_desc => '0 disables connection checks.',
- flags => 'GUC_UNIT_MS',
- variable => 'client_connection_check_interval',
+{ name => 'post_auth_delay', type => 'int', context => 'PGC_BACKEND', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Sets the amount of time to wait after authentication on connection startup.',
+ long_desc => 'This allows attaching a debugger to the process.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_UNIT_S',
+ variable => 'PostAuthDelay',
boot_val => '0',
min => '0',
- max => 'INT_MAX',
- check_hook => 'check_client_connection_check_interval',
+ max => 'INT_MAX / 1000000',
},
-{ name => 'log_startup_progress_interval', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHEN',
- short_desc => 'Time between progress updates for long-running startup operations.',
- long_desc => '0 disables progress updates.',
- flags => 'GUC_UNIT_MS',
- variable => 'log_startup_progress_interval',
- boot_val => '10000',
+# Not for general use
+{ name => 'pre_auth_delay', type => 'int', context => 'PGC_SIGHUP', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Sets the amount of time to wait before authentication on connection startup.',
+ long_desc => 'This allows attaching a debugger to the process.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_UNIT_S',
+ variable => 'PreAuthDelay',
+ boot_val => '0',
min => '0',
- max => 'INT_MAX',
+ max => '60',
},
-{ name => 'scram_iterations', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_AUTH',
- short_desc => 'Sets the iteration count for SCRAM secret generation.',
- flags => 'GUC_REPORT',
- variable => 'scram_sha_256_iterations',
- boot_val => 'SCRAM_SHA_256_DEFAULT_ITERATIONS',
- min => '1',
- max => 'INT_MAX',
+{ name => 'primary_conninfo', type => 'string', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets the connection string to be used to connect to the sending server.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'PrimaryConnInfo',
+ boot_val => '""',
},
+{ name => 'primary_slot_name', type => 'string', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets the name of the replication slot to use on the sending server.',
+ variable => 'PrimarySlotName',
+ boot_val => '""',
+ check_hook => 'check_primary_slot_name',
+},
-{ name => 'seq_page_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the planner\'s estimate of the cost of a sequentially fetched disk page.',
- flags => 'GUC_EXPLAIN',
- variable => 'seq_page_cost',
- boot_val => 'DEFAULT_SEQ_PAGE_COST',
- min => '0',
- max => 'DBL_MAX',
+{ name => 'quote_all_identifiers', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
+ short_desc => 'When generating SQL fragments, quote all identifiers.',
+ variable => 'quote_all_identifiers',
+ boot_val => 'false',
},
{ name => 'random_page_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
@@ -2352,88 +2273,97 @@
max => 'DBL_MAX',
},
-{ name => 'cpu_tuple_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the planner\'s estimate of the cost of processing each tuple (row).',
- flags => 'GUC_EXPLAIN',
- variable => 'cpu_tuple_cost',
- boot_val => 'DEFAULT_CPU_TUPLE_COST',
- min => '0',
- max => 'DBL_MAX',
+{ name => 'recovery_end_command', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVE_RECOVERY',
+ short_desc => 'Sets the shell command that will be executed once at the end of recovery.',
+ variable => 'recoveryEndCommand',
+ boot_val => '""',
},
-{ name => 'cpu_index_tuple_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the planner\'s estimate of the cost of processing each index entry during an index scan.',
- flags => 'GUC_EXPLAIN',
- variable => 'cpu_index_tuple_cost',
- boot_val => 'DEFAULT_CPU_INDEX_TUPLE_COST',
- min => '0',
- max => 'DBL_MAX',
+{ name => 'recovery_init_sync_method', type => 'enum', context => 'PGC_SIGHUP', group => 'ERROR_HANDLING_OPTIONS',
+ short_desc => 'Sets the method for synchronizing the data directory before crash recovery.',
+ variable => 'recovery_init_sync_method',
+ boot_val => 'DATA_DIR_SYNC_METHOD_FSYNC',
+ options => 'recovery_init_sync_method_options',
},
-{ name => 'cpu_operator_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the planner\'s estimate of the cost of processing each operator or function call.',
- flags => 'GUC_EXPLAIN',
- variable => 'cpu_operator_cost',
- boot_val => 'DEFAULT_CPU_OPERATOR_COST',
+{ name => 'recovery_min_apply_delay', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets the minimum delay for applying changes during recovery.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'recovery_min_apply_delay',
+ boot_val => '0',
min => '0',
- max => 'DBL_MAX',
+ max => 'INT_MAX',
},
-{ name => 'parallel_tuple_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the planner\'s estimate of the cost of passing each tuple (row) from worker to leader backend.',
- flags => 'GUC_EXPLAIN',
- variable => 'parallel_tuple_cost',
- boot_val => 'DEFAULT_PARALLEL_TUPLE_COST',
- min => '0',
- max => 'DBL_MAX',
+{ name => 'recovery_prefetch', type => 'enum', context => 'PGC_SIGHUP', group => 'WAL_RECOVERY',
+ short_desc => 'Prefetch referenced blocks during recovery.',
+ long_desc => 'Look ahead in the WAL to find references to uncached data.',
+ variable => 'recovery_prefetch',
+ boot_val => 'RECOVERY_PREFETCH_TRY',
+ options => 'recovery_prefetch_options',
+ check_hook => 'check_recovery_prefetch',
+ assign_hook => 'assign_recovery_prefetch',
},
-{ name => 'parallel_setup_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the planner\'s estimate of the cost of starting up worker processes for parallel query.',
- flags => 'GUC_EXPLAIN',
- variable => 'parallel_setup_cost',
- boot_val => 'DEFAULT_PARALLEL_SETUP_COST',
- min => '0',
- max => 'DBL_MAX',
+{ name => 'recovery_target', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
+ short_desc => 'Set to "immediate" to end recovery as soon as a consistent state is reached.',
+ variable => 'recovery_target_string',
+ boot_val => '""',
+ check_hook => 'check_recovery_target',
+ assign_hook => 'assign_recovery_target',
},
-{ name => 'jit_above_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Perform JIT compilation if query is more expensive.',
- long_desc => '-1 disables JIT compilation.',
- flags => 'GUC_EXPLAIN',
- variable => 'jit_above_cost',
- boot_val => '100000',
- min => '-1',
- max => 'DBL_MAX',
+{ name => 'recovery_target_action', type => 'enum', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
+ short_desc => 'Sets the action to perform upon reaching the recovery target.',
+ variable => 'recoveryTargetAction',
+ boot_val => 'RECOVERY_TARGET_ACTION_PAUSE',
+ options => 'recovery_target_action_options',
},
-{ name => 'jit_optimize_above_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Optimize JIT-compiled functions if query is more expensive.',
- long_desc => '-1 disables optimization.',
- flags => 'GUC_EXPLAIN',
- variable => 'jit_optimize_above_cost',
- boot_val => '500000',
- min => '-1',
- max => 'DBL_MAX',
+{ name => 'recovery_target_inclusive', type => 'bool', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
+ short_desc => 'Sets whether to include or exclude transaction with recovery target.',
+ variable => 'recoveryTargetInclusive',
+ boot_val => 'true',
},
-{ name => 'jit_inline_above_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Perform JIT inlining if query is more expensive.',
- long_desc => '-1 disables inlining.',
- flags => 'GUC_EXPLAIN',
- variable => 'jit_inline_above_cost',
- boot_val => '500000',
- min => '-1',
- max => 'DBL_MAX',
+{ name => 'recovery_target_lsn', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
+ short_desc => 'Sets the LSN of the write-ahead log location up to which recovery will proceed.',
+ variable => 'recovery_target_lsn_string',
+ boot_val => '""',
+ check_hook => 'check_recovery_target_lsn',
+ assign_hook => 'assign_recovery_target_lsn',
},
-{ name => 'cursor_tuple_fraction', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
- short_desc => 'Sets the planner\'s estimate of the fraction of a cursor\'s rows that will be retrieved.',
- flags => 'GUC_EXPLAIN',
- variable => 'cursor_tuple_fraction',
- boot_val => 'DEFAULT_CURSOR_TUPLE_FRACTION',
- min => '0.0',
- max => '1.0',
+{ name => 'recovery_target_name', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
+ short_desc => 'Sets the named restore point up to which recovery will proceed.',
+ variable => 'recovery_target_name_string',
+ boot_val => '""',
+ check_hook => 'check_recovery_target_name',
+ assign_hook => 'assign_recovery_target_name',
+},
+
+{ name => 'recovery_target_time', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
+ short_desc => 'Sets the time stamp up to which recovery will proceed.',
+ variable => 'recovery_target_time_string',
+ boot_val => '""',
+ check_hook => 'check_recovery_target_time',
+ assign_hook => 'assign_recovery_target_time',
+},
+
+{ name => 'recovery_target_timeline', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
+ short_desc => 'Specifies the timeline to recover into.',
+ variable => 'recovery_target_timeline_string',
+ boot_val => '"latest"',
+ check_hook => 'check_recovery_target_timeline',
+ assign_hook => 'assign_recovery_target_timeline',
+},
+
+{ name => 'recovery_target_xid', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
+ short_desc => 'Sets the transaction ID up to which recovery will proceed.',
+ variable => 'recovery_target_xid_string',
+ boot_val => '""',
+ check_hook => 'check_recovery_target_xid',
+ assign_hook => 'assign_recovery_target_xid',
},
{ name => 'recursive_worktable_factor', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
@@ -2445,39 +2375,76 @@
max => '1000000.0',
},
-{ name => 'geqo_selection_bias', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
- short_desc => 'GEQO: selective pressure within the population.',
- flags => 'GUC_EXPLAIN',
- variable => 'Geqo_selection_bias',
- boot_val => 'DEFAULT_GEQO_SELECTION_BIAS',
- min => 'MIN_GEQO_SELECTION_BIAS',
- max => 'MAX_GEQO_SELECTION_BIAS',
+{ name => 'remove_temp_files_after_crash', type => 'bool', context => 'PGC_SIGHUP', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Remove temporary files after backend crash.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'remove_temp_files_after_crash',
+ boot_val => 'true',
+},
+
+{ name => 'reserved_connections', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the number of connection slots reserved for roles with privileges of pg_use_reserved_connections.',
+ variable => 'ReservedConnections',
+ boot_val => '0',
+ min => '0',
+ max => 'MAX_BACKENDS',
+},
+
+{ name => 'restart_after_crash', type => 'bool', context => 'PGC_SIGHUP', group => 'ERROR_HANDLING_OPTIONS',
+ short_desc => 'Reinitialize server after backend crash.',
+ variable => 'restart_after_crash',
+ boot_val => 'true',
+},
+
+{ name => 'restore_command', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVE_RECOVERY',
+ short_desc => 'Sets the shell command that will be called to retrieve an archived WAL file.',
+ variable => 'recoveryRestoreCommand',
+ boot_val => '""',
+},
+
+{ name => 'restrict_nonsystem_relation_kind', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Prohibits access to non-system relations of specified kinds.',
+ flags => 'GUC_LIST_INPUT | GUC_NOT_IN_SAMPLE',
+ variable => 'restrict_nonsystem_relation_kind_string',
+ boot_val => '""',
+ check_hook => 'check_restrict_nonsystem_relation_kind',
+ assign_hook => 'assign_restrict_nonsystem_relation_kind',
},
-{ name => 'geqo_seed', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
- short_desc => 'GEQO: seed for random path selection.',
- flags => 'GUC_EXPLAIN',
- variable => 'Geqo_seed',
- boot_val => '0.0',
- min => '0.0',
- max => '1.0',
+# Not for general use --- used by SET ROLE
+{ name => 'role', type => 'string', context => 'PGC_USERSET', group => 'UNGROUPED',
+ short_desc => 'Sets the current role.',
+ flags => 'GUC_IS_NAME | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_NOT_WHILE_SEC_REST',
+ variable => 'role_string',
+ boot_val => '"none"',
+ check_hook => 'check_role',
+ assign_hook => 'assign_role',
+ show_hook => 'show_role',
},
-{ name => 'hash_mem_multiplier', type => 'real', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
- short_desc => 'Multiple of "work_mem" to use for hash tables.',
- flags => 'GUC_EXPLAIN',
- variable => 'hash_mem_multiplier',
- boot_val => '2.0',
- min => '1.0',
- max => '1000.0',
+{ name => 'row_security', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Enables row security.',
+ long_desc => 'When enabled, row security will be applied to all users.',
+ variable => 'row_security',
+ boot_val => 'true',
},
-{ name => 'bgwriter_lru_multiplier', type => 'real', context => 'PGC_SIGHUP', group => 'RESOURCES_BGWRITER',
- short_desc => 'Multiple of the average buffer usage to free per round.',
- variable => 'bgwriter_lru_multiplier',
- boot_val => '2.0',
- min => '0.0',
- max => '10.0',
+{ name => 'scram_iterations', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_AUTH',
+ short_desc => 'Sets the iteration count for SCRAM secret generation.',
+ flags => 'GUC_REPORT',
+ variable => 'scram_sha_256_iterations',
+ boot_val => 'SCRAM_SHA_256_DEFAULT_ITERATIONS',
+ min => '1',
+ max => 'INT_MAX',
+},
+
+{ name => 'search_path', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the schema search order for names that are not schema-qualified.',
+ flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_EXPLAIN | GUC_REPORT',
+ variable => 'namespace_search_path',
+ boot_val => '"\"$user\", public"',
+ check_hook => 'check_search_path',
+ assign_hook => 'assign_search_path',
},
{ name => 'seed', type => 'real', context => 'PGC_USERSET', group => 'UNGROUPED',
@@ -2492,423 +2459,456 @@
show_hook => 'show_random_seed',
},
-{ name => 'vacuum_cost_delay', type => 'real', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
- short_desc => 'Vacuum cost delay in milliseconds.',
- flags => 'GUC_UNIT_MS',
- variable => 'VacuumCostDelay',
- boot_val => '0',
- min => '0',
- max => '100',
+{ name => 'segment_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the number of pages per disk file.',
+ flags => 'GUC_UNIT_BLOCKS | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'segment_size',
+ boot_val => 'RELSEG_SIZE',
+ min => 'RELSEG_SIZE',
+ max => 'RELSEG_SIZE',
},
-{ name => 'autovacuum_vacuum_cost_delay', type => 'real', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Vacuum cost delay in milliseconds, for autovacuum.',
- long_desc => '-1 means use "vacuum_cost_delay".',
- flags => 'GUC_UNIT_MS',
- variable => 'autovacuum_vac_cost_delay',
- boot_val => '2',
- min => '-1',
- max => '100',
+{ name => 'send_abort_for_crash', type => 'bool', context => 'PGC_SIGHUP', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Send SIGABRT not SIGQUIT to child processes after backend crash.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'send_abort_for_crash',
+ boot_val => 'false',
},
-{ name => 'autovacuum_vacuum_scale_factor', type => 'real', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Number of tuple updates or deletes prior to vacuum as a fraction of reltuples.',
- variable => 'autovacuum_vac_scale',
- boot_val => '0.2',
- min => '0.0',
- max => '100.0',
+{ name => 'send_abort_for_kill', type => 'bool', context => 'PGC_SIGHUP', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Send SIGABRT not SIGKILL to stuck child processes.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'send_abort_for_kill',
+ boot_val => 'false',
},
-{ name => 'autovacuum_vacuum_insert_scale_factor', type => 'real', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Number of tuple inserts prior to vacuum as a fraction of reltuples.',
- variable => 'autovacuum_vac_ins_scale',
- boot_val => '0.2',
- min => '0.0',
- max => '100.0',
-},
-{ name => 'autovacuum_analyze_scale_factor', type => 'real', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Number of tuple inserts, updates, or deletes prior to analyze as a fraction of reltuples.',
- variable => 'autovacuum_anl_scale',
- boot_val => '0.1',
- min => '0.0',
- max => '100.0',
+{ name => 'seq_page_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the planner\'s estimate of the cost of a sequentially fetched disk page.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'seq_page_cost',
+ boot_val => 'DEFAULT_SEQ_PAGE_COST',
+ min => '0',
+ max => 'DBL_MAX',
},
-{ name => 'checkpoint_completion_target', type => 'real', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
- short_desc => 'Time spent flushing dirty buffers during checkpoint, as fraction of checkpoint interval.',
- variable => 'CheckPointCompletionTarget',
- boot_val => '0.9',
- min => '0.0',
- max => '1.0',
- assign_hook => 'assign_checkpoint_completion_target',
+{ name => 'serializable_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the size of the dedicated buffer pool used for the serializable transaction cache.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'serializable_buffers',
+ boot_val => '32',
+ min => '16',
+ max => 'SLRU_MAX_ALLOWED_BUFFERS',
+ check_hook => 'check_serial_buffers',
},
-{ name => 'log_statement_sample_rate', type => 'real', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
- short_desc => 'Fraction of statements exceeding "log_min_duration_sample" to be logged.',
- long_desc => 'Use a value between 0.0 (never log) and 1.0 (always log).',
- variable => 'log_statement_sample_rate',
- boot_val => '1.0',
- min => '0.0',
- max => '1.0',
+# Can't be set in postgresql.conf
+{ name => 'server_encoding', type => 'string', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the server (database) character set encoding.',
+ flags => 'GUC_IS_NAME | GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'server_encoding_string',
+ boot_val => '"SQL_ASCII"',
},
-{ name => 'log_transaction_sample_rate', type => 'real', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
- short_desc => 'Sets the fraction of transactions from which to log all statements.',
- long_desc => 'Use a value between 0.0 (never log) and 1.0 (log all statements for all transactions).',
- variable => 'log_xact_sample_rate',
- boot_val => '0.0',
- min => '0.0',
- max => '1.0',
+# Can't be set in postgresql.conf
+{ name => 'server_version', type => 'string', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the server version.',
+ flags => 'GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'server_version_string',
+ boot_val => 'PG_VERSION',
},
-{ name => 'vacuum_max_eager_freeze_failure_rate', type => 'real', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
- short_desc => 'Fraction of pages in a relation vacuum can scan and fail to freeze before disabling eager scanning.',
- long_desc => 'A value of 0.0 disables eager scanning and a value of 1.0 will eagerly scan up to 100 percent of the all-visible pages in the relation. If vacuum successfully freezes these pages, the cap is lower than 100 percent, because the goal is to amortize page freezing across multiple vacuums.',
- variable => 'vacuum_max_eager_freeze_failure_rate',
- boot_val => '0.03',
- min => '0.0',
- max => '1.0',
+# Can't be set in postgresql.conf
+{ name => 'server_version_num', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the server version as an integer.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'server_version_num',
+ boot_val => 'PG_VERSION_NUM',
+ min => 'PG_VERSION_NUM',
+ max => 'PG_VERSION_NUM',
},
+# Not for general use --- used by SET SESSION AUTHORIZATION
+{ name => 'session_authorization', type => 'string', context => 'PGC_USERSET', group => 'UNGROUPED',
+ short_desc => 'Sets the session user name.',
+ flags => 'GUC_IS_NAME | GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_NOT_WHILE_SEC_REST',
+ variable => 'session_authorization_string',
+ boot_val => 'NULL',
+ check_hook => 'check_session_authorization',
+ assign_hook => 'assign_session_authorization',
+},
-{ name => 'archive_command', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVING',
- short_desc => 'Sets the shell command that will be called to archive a WAL file.',
- long_desc => 'An empty string means use "archive_library".',
- variable => 'XLogArchiveCommand',
+{ name => 'session_preload_libraries', type => 'string', context => 'PGC_SUSET', group => 'CLIENT_CONN_PRELOAD',
+ short_desc => 'Lists shared libraries to preload into each backend.',
+ flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY',
+ variable => 'session_preload_libraries_string',
boot_val => '""',
- show_hook => 'show_archive_command',
},
-{ name => 'archive_library', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVING',
- short_desc => 'Sets the library that will be called to archive a WAL file.',
- long_desc => 'An empty string means use "archive_command".',
- variable => 'XLogArchiveLibrary',
- boot_val => '""',
+{ name => 'session_replication_role', type => 'enum', context => 'PGC_SUSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the session\'s behavior for triggers and rewrite rules.',
+ variable => 'SessionReplicationRole',
+ boot_val => 'SESSION_REPLICATION_ROLE_ORIGIN',
+ options => 'session_replication_role_options',
+ assign_hook => 'assign_session_replication_role',
},
-{ name => 'restore_command', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVE_RECOVERY',
- short_desc => 'Sets the shell command that will be called to retrieve an archived WAL file.',
- variable => 'recoveryRestoreCommand',
- boot_val => '""',
+# We sometimes multiply the number of shared buffers by two without
+# checking for overflow, so we mustn't allow more than INT_MAX / 2.
+{ name => 'shared_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the number of shared memory buffers used by the server.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'NBuffers',
+ boot_val => '16384',
+ min => '16',
+ max => 'INT_MAX / 2',
},
-{ name => 'archive_cleanup_command', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVE_RECOVERY',
- short_desc => 'Sets the shell command that will be executed at every restart point.',
- variable => 'archiveCleanupCommand',
+{ name => 'shared_memory_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the size of the server\'s main shared memory area (rounded up to the nearest MB).',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_UNIT_MB | GUC_RUNTIME_COMPUTED',
+ variable => 'shared_memory_size_mb',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
+},
+
+{ name => 'shared_memory_size_in_huge_pages', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the number of huge pages needed for the main shared memory area.',
+ long_desc => '-1 means huge pages are not supported.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
+ variable => 'shared_memory_size_in_huge_pages',
+ boot_val => '-1',
+ min => '-1',
+ max => 'INT_MAX',
+},
+
+{ name => 'shared_memory_type', type => 'enum', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Selects the shared memory implementation used for the main shared memory region.',
+ variable => 'shared_memory_type',
+ boot_val => 'DEFAULT_SHARED_MEMORY_TYPE',
+ options => 'shared_memory_options',
+},
+
+{ name => 'shared_preload_libraries', type => 'string', context => 'PGC_POSTMASTER', group => 'CLIENT_CONN_PRELOAD',
+ short_desc => 'Lists shared libraries to preload into server.',
+ flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY',
+ variable => 'shared_preload_libraries_string',
boot_val => '""',
},
-{ name => 'recovery_end_command', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVE_RECOVERY',
- short_desc => 'Sets the shell command that will be executed once at the end of recovery.',
- variable => 'recoveryEndCommand',
- boot_val => '""',
+{ name => 'ssl', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Enables SSL connections.',
+ variable => 'EnableSSL',
+ boot_val => 'false',
+ check_hook => 'check_ssl',
},
-{ name => 'recovery_target_timeline', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
- short_desc => 'Specifies the timeline to recover into.',
- variable => 'recovery_target_timeline_string',
- boot_val => '"latest"',
- check_hook => 'check_recovery_target_timeline',
- assign_hook => 'assign_recovery_target_timeline',
+{ name => 'ssl_ca_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Location of the SSL certificate authority file.',
+ variable => 'ssl_ca_file',
+ boot_val => '""',
},
-{ name => 'recovery_target', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
- short_desc => 'Set to "immediate" to end recovery as soon as a consistent state is reached.',
- variable => 'recovery_target_string',
- boot_val => '""',
- check_hook => 'check_recovery_target',
- assign_hook => 'assign_recovery_target',
+{ name => 'ssl_cert_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Location of the SSL server certificate file.',
+ variable => 'ssl_cert_file',
+ boot_val => '"server.crt"',
},
-{ name => 'recovery_target_xid', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
- short_desc => 'Sets the transaction ID up to which recovery will proceed.',
- variable => 'recovery_target_xid_string',
- boot_val => '""',
- check_hook => 'check_recovery_target_xid',
- assign_hook => 'assign_recovery_target_xid',
+{ name => 'ssl_ciphers', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Sets the list of allowed TLSv1.2 (and lower) ciphers.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'SSLCipherList',
+ boot_val => 'DEFAULT_SSL_CIPHERS',
},
-{ name => 'recovery_target_time', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
- short_desc => 'Sets the time stamp up to which recovery will proceed.',
- variable => 'recovery_target_time_string',
+{ name => 'ssl_crl_dir', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Location of the SSL certificate revocation list directory.',
+ variable => 'ssl_crl_dir',
boot_val => '""',
- check_hook => 'check_recovery_target_time',
- assign_hook => 'assign_recovery_target_time',
},
-{ name => 'recovery_target_name', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
- short_desc => 'Sets the named restore point up to which recovery will proceed.',
- variable => 'recovery_target_name_string',
+{ name => 'ssl_crl_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Location of the SSL certificate revocation list file.',
+ variable => 'ssl_crl_file',
boot_val => '""',
- check_hook => 'check_recovery_target_name',
- assign_hook => 'assign_recovery_target_name',
},
-{ name => 'recovery_target_lsn', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
- short_desc => 'Sets the LSN of the write-ahead log location up to which recovery will proceed.',
- variable => 'recovery_target_lsn_string',
+{ name => 'ssl_dh_params_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Location of the SSL DH parameters file.',
+ long_desc => 'An empty string means use compiled-in default parameters.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'ssl_dh_params_file',
boot_val => '""',
- check_hook => 'check_recovery_target_lsn',
- assign_hook => 'assign_recovery_target_lsn',
},
-{ name => 'primary_conninfo', type => 'string', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets the connection string to be used to connect to the sending server.',
+{ name => 'ssl_groups', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Sets the group(s) to use for Diffie-Hellman key exchange.',
+ long_desc => 'Multiple groups can be specified using a colon-separated list.',
flags => 'GUC_SUPERUSER_ONLY',
- variable => 'PrimaryConnInfo',
- boot_val => '""',
+ variable => 'SSLECDHCurve',
+ boot_val => 'DEFAULT_SSL_GROUPS',
},
-{ name => 'primary_slot_name', type => 'string', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets the name of the replication slot to use on the sending server.',
- variable => 'PrimarySlotName',
- boot_val => '""',
- check_hook => 'check_primary_slot_name',
+{ name => 'ssl_key_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Location of the SSL server private key file.',
+ variable => 'ssl_key_file',
+ boot_val => '"server.key"',
},
-{ name => 'client_encoding', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets the client\'s character set encoding.',
- flags => 'GUC_IS_NAME | GUC_REPORT',
- variable => 'client_encoding_string',
- boot_val => '"SQL_ASCII"',
- check_hook => 'check_client_encoding',
- assign_hook => 'assign_client_encoding',
+{ name => 'ssl_library', type => 'string', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the name of the SSL library.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'ssl_library',
+ boot_val => 'SSL_LIBRARY',
},
-{ name => 'log_line_prefix', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
- short_desc => 'Controls information prefixed to each log line.',
- long_desc => 'An empty string means no prefix.',
- variable => 'Log_line_prefix',
- boot_val => '"%m [%p] "',
+{ name => 'ssl_max_protocol_version', type => 'enum', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Sets the maximum SSL/TLS protocol version to use.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'ssl_max_protocol_version',
+ boot_val => 'PG_TLS_ANY',
+ options => 'ssl_protocol_versions_info',
},
-{ name => 'log_timezone', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
- short_desc => 'Sets the time zone to use in log messages.',
- variable => 'log_timezone_string',
- boot_val => '"GMT"',
- check_hook => 'check_log_timezone',
- assign_hook => 'assign_log_timezone',
- show_hook => 'show_log_timezone',
+{ name => 'ssl_min_protocol_version', type => 'enum', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Sets the minimum SSL/TLS protocol version to use.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'ssl_min_protocol_version',
+ boot_val => 'PG_TLS1_2_VERSION',
+ options => 'ssl_protocol_versions_info + 1', # don't allow PG_TLS_ANY
},
-{ name => 'DateStyle', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets the display format for date and time values.',
- long_desc => 'Also controls interpretation of ambiguous date inputs.',
- flags => 'GUC_LIST_INPUT | GUC_REPORT',
- variable => 'datestyle_string',
- boot_val => '"ISO, MDY"',
- check_hook => 'check_datestyle',
- assign_hook => 'assign_datestyle',
+{ name => 'ssl_passphrase_command', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Command to obtain passphrases for SSL.',
+ long_desc => 'An empty string means use the built-in prompting mechanism.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'ssl_passphrase_command',
+ boot_val => '""',
},
-{ name => 'default_table_access_method', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the default table access method for new tables.',
- flags => 'GUC_IS_NAME',
- variable => 'default_table_access_method',
- boot_val => 'DEFAULT_TABLE_ACCESS_METHOD',
- check_hook => 'check_default_table_access_method',
+{ name => 'ssl_passphrase_command_supports_reload', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Controls whether "ssl_passphrase_command" is called during server reload.',
+ variable => 'ssl_passphrase_command_supports_reload',
+ boot_val => 'false',
},
-{ name => 'default_tablespace', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the default tablespace to create tables and indexes in.',
- long_desc => 'An empty string means use the database\'s default tablespace.',
- flags => 'GUC_IS_NAME',
- variable => 'default_tablespace',
- boot_val => '""',
- check_hook => 'check_default_tablespace',
+{ name => 'ssl_prefer_server_ciphers', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Give priority to server ciphersuite order.',
+ variable => 'SSLPreferServerCiphers',
+ boot_val => 'true',
},
-{ name => 'temp_tablespaces', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the tablespace(s) to use for temporary tables and sort files.',
- long_desc => 'An empty string means use the database\'s default tablespace.',
- flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE',
- variable => 'temp_tablespaces',
- boot_val => '""',
- check_hook => 'check_temp_tablespaces',
- assign_hook => 'assign_temp_tablespaces',
+{ name => 'ssl_renegotiation_limit', type => 'int', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
+ short_desc => 'SSL renegotiation is no longer supported; this can only be 0.',
+ flags => 'GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'ssl_renegotiation_limit',
+ boot_val => '0',
+ min => '0',
+ max => '0',
},
-{ name => 'createrole_self_grant', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets whether a CREATEROLE user automatically grants the role to themselves, and with which options.',
- long_desc => 'An empty string disables automatic self grants.',
- flags => 'GUC_LIST_INPUT',
- variable => 'createrole_self_grant',
+{ name => 'ssl_tls13_ciphers', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Sets the list of allowed TLSv1.3 cipher suites.',
+ long_desc => 'An empty string means use the default cipher suites.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'SSLCipherSuites',
boot_val => '""',
- check_hook => 'check_createrole_self_grant',
- assign_hook => 'assign_createrole_self_grant',
},
-{ name => 'dynamic_library_path', type => 'string', context => 'PGC_SUSET', group => 'CLIENT_CONN_OTHER',
- short_desc => 'Sets the path for dynamically loadable modules.',
- long_desc => 'If a dynamically loadable module needs to be opened and the specified name does not have a directory component (i.e., the name does not contain a slash), the system will search this path for the specified file.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'Dynamic_library_path',
- boot_val => '"$libdir"',
+{ name => 'standard_conforming_strings', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
+ short_desc => 'Causes \'...\' strings to treat backslashes literally.',
+ flags => 'GUC_REPORT',
+ variable => 'standard_conforming_strings',
+ boot_val => 'true',
},
-{ name => 'extension_control_path', type => 'string', context => 'PGC_SUSET', group => 'CLIENT_CONN_OTHER',
- short_desc => 'Sets the path for extension control files.',
- long_desc => 'The remaining extension script and secondary control files are then loaded from the same directory where the primary control file was found.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'Extension_control_path',
- boot_val => '"$system"',
+{ name => 'statement_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the maximum allowed duration of any statement.',
+ long_desc => '0 disables the timeout.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'StatementTimeout',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
},
-{ name => 'krb_server_keyfile', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
- short_desc => 'Sets the location of the Kerberos server key file.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'pg_krb_server_keyfile',
- boot_val => 'PG_KRB_SRVTAB',
+{ name => 'stats_fetch_consistency', type => 'enum', context => 'PGC_USERSET', group => 'STATS_CUMULATIVE',
+ short_desc => 'Sets the consistency of accesses to statistics data.',
+ variable => 'pgstat_fetch_consistency',
+ boot_val => 'PGSTAT_FETCH_CONSISTENCY_CACHE',
+ options => 'stats_fetch_consistency',
+ assign_hook => 'assign_stats_fetch_consistency',
},
-{ name => 'bonjour_name', type => 'string', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the Bonjour service name.',
- long_desc => 'An empty string means use the computer name.',
- variable => 'bonjour_name',
- boot_val => '""',
+{ name => 'subtransaction_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the size of the dedicated buffer pool used for the subtransaction cache.',
+ long_desc => '0 means use a fraction of "shared_buffers".',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'subtransaction_buffers',
+ boot_val => '0',
+ min => '0',
+ max => 'SLRU_MAX_ALLOWED_BUFFERS',
+ check_hook => 'check_subtrans_buffers',
},
-{ name => 'lc_messages', type => 'string', context => 'PGC_SUSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets the language in which messages are displayed.',
- long_desc => 'An empty string means use the operating system setting.',
- variable => 'locale_messages',
- boot_val => '""',
- check_hook => 'check_locale_messages',
- assign_hook => 'assign_locale_messages',
+{ name => 'summarize_wal', type => 'bool', context => 'PGC_SIGHUP', group => 'WAL_SUMMARIZATION',
+ short_desc => 'Starts the WAL summarizer process to enable incremental backup.',
+ variable => 'summarize_wal',
+ boot_val => 'false',
},
-{ name => 'lc_monetary', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets the locale for formatting monetary amounts.',
- long_desc => 'An empty string means use the operating system setting.',
- variable => 'locale_monetary',
- boot_val => '"C"',
- check_hook => 'check_locale_monetary',
- assign_hook => 'assign_locale_monetary',
+# see max_connections
+{ name => 'superuser_reserved_connections', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the number of connection slots reserved for superusers.',
+ variable => 'SuperuserReservedConnections',
+ boot_val => '3',
+ min => '0',
+ max => 'MAX_BACKENDS',
},
-{ name => 'lc_numeric', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets the locale for formatting numbers.',
- long_desc => 'An empty string means use the operating system setting.',
- variable => 'locale_numeric',
- boot_val => '"C"',
- check_hook => 'check_locale_numeric',
- assign_hook => 'assign_locale_numeric',
+{ name => 'sync_replication_slots', type => 'bool', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Enables a physical standby to synchronize logical failover replication slots from the primary server.',
+ variable => 'sync_replication_slots',
+ boot_val => 'false',
},
-{ name => 'lc_time', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets the locale for formatting date and time values.',
- long_desc => 'An empty string means use the operating system setting.',
- variable => 'locale_time',
- boot_val => '"C"',
- check_hook => 'check_locale_time',
- assign_hook => 'assign_locale_time',
+{ name => 'synchronize_seqscans', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
+ short_desc => 'Enables synchronized sequential scans.',
+ variable => 'synchronize_seqscans',
+ boot_val => 'true',
},
-{ name => 'session_preload_libraries', type => 'string', context => 'PGC_SUSET', group => 'CLIENT_CONN_PRELOAD',
- short_desc => 'Lists shared libraries to preload into each backend.',
- flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY',
- variable => 'session_preload_libraries_string',
+{ name => 'synchronized_standby_slots', type => 'string', context => 'PGC_SIGHUP', group => 'REPLICATION_PRIMARY',
+ short_desc => 'Lists streaming replication standby server replication slot names that logical WAL sender processes will wait for.',
+ long_desc => 'Logical WAL sender processes will send decoded changes to output plugins only after the specified replication slots have confirmed receiving WAL.',
+ flags => 'GUC_LIST_INPUT',
+ variable => 'synchronized_standby_slots',
boot_val => '""',
+ check_hook => 'check_synchronized_standby_slots',
+ assign_hook => 'assign_synchronized_standby_slots',
},
-{ name => 'shared_preload_libraries', type => 'string', context => 'PGC_POSTMASTER', group => 'CLIENT_CONN_PRELOAD',
- short_desc => 'Lists shared libraries to preload into server.',
- flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY',
- variable => 'shared_preload_libraries_string',
- boot_val => '""',
+{ name => 'synchronous_commit', type => 'enum', context => 'PGC_USERSET', group => 'WAL_SETTINGS',
+ short_desc => 'Sets the current transaction\'s synchronization level.',
+ variable => 'synchronous_commit',
+ boot_val => 'SYNCHRONOUS_COMMIT_ON',
+ options => 'synchronous_commit_options',
+ assign_hook => 'assign_synchronous_commit',
},
-{ name => 'local_preload_libraries', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_PRELOAD',
- short_desc => 'Lists unprivileged shared libraries to preload into each backend.',
- flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE',
- variable => 'local_preload_libraries_string',
+{ name => 'synchronous_standby_names', type => 'string', context => 'PGC_SIGHUP', group => 'REPLICATION_PRIMARY',
+ short_desc => 'Number of synchronous standbys and list of names of potential synchronous ones.',
+ flags => 'GUC_LIST_INPUT',
+ variable => 'SyncRepStandbyNames',
boot_val => '""',
+ check_hook => 'check_synchronous_standby_names',
+ assign_hook => 'assign_synchronous_standby_names',
},
-{ name => 'search_path', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the schema search order for names that are not schema-qualified.',
- flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_EXPLAIN | GUC_REPORT',
- variable => 'namespace_search_path',
- boot_val => '"\"$user\", public"',
- check_hook => 'check_search_path',
- assign_hook => 'assign_search_path',
+{ name => 'syslog_facility', type => 'enum', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the syslog "facility" to be used when syslog enabled.',
+ variable => 'syslog_facility',
+ boot_val => 'DEFAULT_SYSLOG_FACILITY',
+ options => 'syslog_facility_options',
+ assign_hook => 'assign_syslog_facility',
},
-# Can't be set in postgresql.conf
-{ name => 'server_encoding', type => 'string', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the server (database) character set encoding.',
- flags => 'GUC_IS_NAME | GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'server_encoding_string',
- boot_val => '"SQL_ASCII"',
+{ name => 'syslog_ident', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the program name used to identify PostgreSQL messages in syslog.',
+ variable => 'syslog_ident_str',
+ boot_val => '"postgres"',
+ assign_hook => 'assign_syslog_ident',
},
-# Can't be set in postgresql.conf
-{ name => 'server_version', type => 'string', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the server version.',
- flags => 'GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'server_version_string',
- boot_val => 'PG_VERSION',
+{ name => 'syslog_sequence_numbers', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Add sequence number to syslog messages to avoid duplicate suppression.',
+ variable => 'syslog_sequence_numbers',
+ boot_val => 'true',
},
-# Not for general use --- used by SET ROLE
-{ name => 'role', type => 'string', context => 'PGC_USERSET', group => 'UNGROUPED',
- short_desc => 'Sets the current role.',
- flags => 'GUC_IS_NAME | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_NOT_WHILE_SEC_REST',
- variable => 'role_string',
- boot_val => '"none"',
- check_hook => 'check_role',
- assign_hook => 'assign_role',
- show_hook => 'show_role',
+{ name => 'syslog_split_messages', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Split messages sent to syslog by lines and to fit into 1024 bytes.',
+ variable => 'syslog_split_messages',
+ boot_val => 'true',
},
-# Not for general use --- used by SET SESSION AUTHORIZATION
-{ name => 'session_authorization', type => 'string', context => 'PGC_USERSET', group => 'UNGROUPED',
- short_desc => 'Sets the session user name.',
- flags => 'GUC_IS_NAME | GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_NOT_WHILE_SEC_REST',
- variable => 'session_authorization_string',
- boot_val => 'NULL',
- check_hook => 'check_session_authorization',
- assign_hook => 'assign_session_authorization',
+{ name => 'tcp_keepalives_count', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
+ short_desc => 'Maximum number of TCP keepalive retransmits.',
+ long_desc => 'Number of consecutive keepalive retransmits that can be lost before a connection is considered dead. 0 means use the system default.',
+ variable => 'tcp_keepalives_count',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
+ assign_hook => 'assign_tcp_keepalives_count',
+ show_hook => 'show_tcp_keepalives_count',
},
-{ name => 'log_destination', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Sets the destination for server log output.',
- long_desc => 'Valid values are combinations of "stderr", "syslog", "csvlog", "jsonlog", and "eventlog", depending on the platform.',
- flags => 'GUC_LIST_INPUT',
- variable => 'Log_destination_string',
- boot_val => '"stderr"',
- check_hook => 'check_log_destination',
- assign_hook => 'assign_log_destination',
+{ name => 'tcp_keepalives_idle', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
+ short_desc => 'Time between issuing TCP keepalives.',
+ long_desc => '0 means use the system default.',
+ flags => 'GUC_UNIT_S',
+ variable => 'tcp_keepalives_idle',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
+ assign_hook => 'assign_tcp_keepalives_idle',
+ show_hook => 'show_tcp_keepalives_idle',
},
-{ name => 'log_directory', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Sets the destination directory for log files.',
- long_desc => 'Can be specified as relative to the data directory or as absolute path.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'Log_directory',
- boot_val => '"log"',
- check_hook => 'check_canonical_path',
+{ name => 'tcp_keepalives_interval', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
+ short_desc => 'Time between TCP keepalive retransmits.',
+ long_desc => '0 means use the system default.',
+ flags => 'GUC_UNIT_S',
+ variable => 'tcp_keepalives_interval',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
+ assign_hook => 'assign_tcp_keepalives_interval',
+ show_hook => 'show_tcp_keepalives_interval',
},
-{ name => 'log_filename', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Sets the file name pattern for log files.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'Log_filename',
- boot_val => '"postgresql-%Y-%m-%d_%H%M%S.log"',
+{ name => 'tcp_user_timeout', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
+ short_desc => 'TCP user timeout.',
+ long_desc => '0 means use the system default.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'tcp_user_timeout',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
+ assign_hook => 'assign_tcp_user_timeout',
+ show_hook => 'show_tcp_user_timeout',
},
-{ name => 'syslog_ident', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Sets the program name used to identify PostgreSQL messages in syslog.',
- variable => 'syslog_ident_str',
- boot_val => '"postgres"',
- assign_hook => 'assign_syslog_ident',
+{ name => 'temp_buffers', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the maximum number of temporary buffers used by each session.',
+ flags => 'GUC_UNIT_BLOCKS | GUC_EXPLAIN',
+ variable => 'num_temp_buffers',
+ boot_val => '1024',
+ min => '100',
+ max => 'INT_MAX / 2',
+ check_hook => 'check_temp_buffers',
},
-{ name => 'event_source', type => 'string', context => 'PGC_POSTMASTER', group => 'LOGGING_WHERE',
- short_desc => 'Sets the application name used to identify PostgreSQL messages in the event log.',
- variable => 'event_source',
- boot_val => 'DEFAULT_EVENT_SOURCE',
+{ name => 'temp_file_limit', type => 'int', context => 'PGC_SUSET', group => 'RESOURCES_DISK',
+ short_desc => 'Limits the total size of all temporary files used by each process.',
+ long_desc => '-1 means no limit.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'temp_file_limit',
+ boot_val => '-1',
+ min => '-1',
+ max => 'INT_MAX',
+},
+
+{ name => 'temp_tablespaces', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the tablespace(s) to use for temporary tables and sort files.',
+ long_desc => 'An empty string means use the database\'s default tablespace.',
+ flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE',
+ variable => 'temp_tablespaces',
+ boot_val => '""',
+ check_hook => 'check_temp_tablespaces',
+ assign_hook => 'assign_temp_tablespaces',
},
{ name => 'TimeZone', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
@@ -2929,410 +2929,401 @@
assign_hook => 'assign_timezone_abbreviations',
},
-{ name => 'unix_socket_group', type => 'string', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the owning group of the Unix-domain socket.',
- long_desc => 'The owning user of the socket is always the user that starts the server. An empty string means use the user\'s default group.',
- variable => 'Unix_socket_group',
- boot_val => '""',
-},
-
-{ name => 'unix_socket_directories', type => 'string', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the directories where Unix-domain sockets will be created.',
- flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY',
- variable => 'Unix_socket_directories',
- boot_val => 'DEFAULT_PGSOCKET_DIR',
-},
-
-{ name => 'listen_addresses', type => 'string', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the host name or IP address(es) to listen to.',
- flags => 'GUC_LIST_INPUT',
- variable => 'ListenAddresses',
- boot_val => '"localhost"',
-},
-
-# Can't be set by ALTER SYSTEM as it can lead to recursive definition
-# of data_directory.
-{ name => 'data_directory', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
- short_desc => 'Sets the server\'s data directory.',
- flags => 'GUC_SUPERUSER_ONLY | GUC_DISALLOW_IN_AUTO_FILE',
- variable => 'data_directory',
- boot_val => 'NULL',
-},
-
-{ name => 'config_file', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
- short_desc => 'Sets the server\'s main configuration file.',
- flags => 'GUC_DISALLOW_IN_FILE | GUC_SUPERUSER_ONLY',
- variable => 'ConfigFileName',
- boot_val => 'NULL',
-},
-
-{ name => 'hba_file', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
- short_desc => 'Sets the server\'s "hba" configuration file.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'HbaFileName',
- boot_val => 'NULL',
-},
-
-{ name => 'ident_file', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
- short_desc => 'Sets the server\'s "ident" configuration file.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'IdentFileName',
- boot_val => 'NULL',
+{ name => 'trace_connection_negotiation', type => 'bool', context => 'PGC_POSTMASTER', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Logs details of pre-authentication connection handshake.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Trace_connection_negotiation',
+ boot_val => 'false',
},
-{ name => 'external_pid_file', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
- short_desc => 'Writes the postmaster PID to the specified file.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'external_pid_file',
- boot_val => 'NULL',
- check_hook => 'check_canonical_path',
+{ name => 'trace_lock_oidmin', type => 'int', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Sets the minimum OID of tables for tracking locks.',
+ long_desc => 'Is used to avoid output on system tables.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Trace_lock_oidmin',
+ boot_val => 'FirstNormalObjectId',
+ min => '0',
+ max => 'INT_MAX',
+ ifdef => 'LOCK_DEBUG',
},
-{ name => 'ssl_library', type => 'string', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the name of the SSL library.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'ssl_library',
- boot_val => 'SSL_LIBRARY',
+{ name => 'trace_lock_table', type => 'int', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Sets the OID of the table with unconditionally lock tracing.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Trace_lock_table',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
+ ifdef => 'LOCK_DEBUG',
},
-{ name => 'ssl_cert_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Location of the SSL server certificate file.',
- variable => 'ssl_cert_file',
- boot_val => '"server.crt"',
+{ name => 'trace_locks', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Emits information about lock usage.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Trace_locks',
+ boot_val => 'false',
+ ifdef => 'LOCK_DEBUG',
},
-{ name => 'ssl_key_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Location of the SSL server private key file.',
- variable => 'ssl_key_file',
- boot_val => '"server.key"',
+{ name => 'trace_lwlocks', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Emits information about lightweight lock usage.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Trace_lwlocks',
+ boot_val => 'false',
+ ifdef => 'LOCK_DEBUG',
},
-{ name => 'ssl_ca_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Location of the SSL certificate authority file.',
- variable => 'ssl_ca_file',
- boot_val => '""',
+{ name => 'trace_notify', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Generates debugging output for LISTEN and NOTIFY.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Trace_notify',
+ boot_val => 'false',
},
-{ name => 'ssl_crl_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Location of the SSL certificate revocation list file.',
- variable => 'ssl_crl_file',
- boot_val => '""',
+{ name => 'trace_sort', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Emit information about resource usage in sorting.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'trace_sort',
+ boot_val => 'false',
},
-{ name => 'ssl_crl_dir', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Location of the SSL certificate revocation list directory.',
- variable => 'ssl_crl_dir',
- boot_val => '""',
+# this is undocumented because not exposed in a standard build
+{ name => 'trace_syncscan', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Generate debugging output for synchronized scanning.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'trace_syncscan',
+ boot_val => 'false',
+ ifdef => 'TRACE_SYNCSCAN',
},
-{ name => 'synchronous_standby_names', type => 'string', context => 'PGC_SIGHUP', group => 'REPLICATION_PRIMARY',
- short_desc => 'Number of synchronous standbys and list of names of potential synchronous ones.',
- flags => 'GUC_LIST_INPUT',
- variable => 'SyncRepStandbyNames',
- boot_val => '""',
- check_hook => 'check_synchronous_standby_names',
- assign_hook => 'assign_synchronous_standby_names',
+{ name => 'trace_userlocks', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Emits information about user lock usage.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Trace_userlocks',
+ boot_val => 'false',
+ ifdef => 'LOCK_DEBUG',
},
-{ name => 'default_text_search_config', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets default text search configuration.',
- variable => 'TSCurrentConfig',
- boot_val => '"pg_catalog.simple"',
- check_hook => 'check_default_text_search_config',
- assign_hook => 'assign_default_text_search_config',
+{ name => 'track_activities', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
+ short_desc => 'Collects information about executing commands.',
+ long_desc => 'Enables the collection of information on the currently executing command of each session, along with the time at which that command began execution.',
+ variable => 'pgstat_track_activities',
+ boot_val => 'true',
},
-{ name => 'ssl_tls13_ciphers', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Sets the list of allowed TLSv1.3 cipher suites.',
- long_desc => 'An empty string means use the default cipher suites.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'SSLCipherSuites',
- boot_val => '""',
+{ name => 'track_activity_query_size', type => 'int', context => 'PGC_POSTMASTER', group => 'STATS_CUMULATIVE',
+ short_desc => 'Sets the size reserved for pg_stat_activity.query, in bytes.',
+ flags => 'GUC_UNIT_BYTE',
+ variable => 'pgstat_track_activity_query_size',
+ boot_val => '1024',
+ min => '100',
+ max => '1048576',
},
-{ name => 'ssl_ciphers', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Sets the list of allowed TLSv1.2 (and lower) ciphers.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'SSLCipherList',
- boot_val => 'DEFAULT_SSL_CIPHERS',
+{ name => 'track_commit_timestamp', type => 'bool', context => 'PGC_POSTMASTER', group => 'REPLICATION_SENDING',
+ short_desc => 'Collects transaction commit time.',
+ variable => 'track_commit_timestamp',
+ boot_val => 'false',
},
-{ name => 'ssl_groups', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Sets the group(s) to use for Diffie-Hellman key exchange.',
- long_desc => 'Multiple groups can be specified using a colon-separated list.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'SSLECDHCurve',
- boot_val => 'DEFAULT_SSL_GROUPS',
+{ name => 'track_cost_delay_timing', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
+ short_desc => 'Collects timing statistics for cost-based vacuum delay.',
+ variable => 'track_cost_delay_timing',
+ boot_val => 'false',
},
-{ name => 'ssl_dh_params_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Location of the SSL DH parameters file.',
- long_desc => 'An empty string means use compiled-in default parameters.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'ssl_dh_params_file',
- boot_val => '""',
+{ name => 'track_counts', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
+ short_desc => 'Collects statistics on database activity.',
+ variable => 'pgstat_track_counts',
+ boot_val => 'true',
},
-{ name => 'ssl_passphrase_command', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Command to obtain passphrases for SSL.',
- long_desc => 'An empty string means use the built-in prompting mechanism.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'ssl_passphrase_command',
- boot_val => '""',
+{ name => 'track_functions', type => 'enum', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
+ short_desc => 'Collects function-level statistics on database activity.',
+ variable => 'pgstat_track_functions',
+ boot_val => 'TRACK_FUNC_OFF',
+ options => 'track_function_options',
},
-{ name => 'application_name', type => 'string', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
- short_desc => 'Sets the application name to be reported in statistics and logs.',
- flags => 'GUC_IS_NAME | GUC_REPORT | GUC_NOT_IN_SAMPLE',
- variable => 'application_name',
- boot_val => '""',
- check_hook => 'check_application_name',
- assign_hook => 'assign_application_name',
+{ name => 'track_io_timing', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
+ short_desc => 'Collects timing statistics for database I/O activity.',
+ variable => 'track_io_timing',
+ boot_val => 'false',
},
-{ name => 'cluster_name', type => 'string', context => 'PGC_POSTMASTER', group => 'PROCESS_TITLE',
- short_desc => 'Sets the name of the cluster, which is included in the process title.',
- flags => 'GUC_IS_NAME',
- variable => 'cluster_name',
- boot_val => '""',
- check_hook => 'check_cluster_name',
+{ name => 'track_wal_io_timing', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
+ short_desc => 'Collects timing statistics for WAL I/O activity.',
+ variable => 'track_wal_io_timing',
+ boot_val => 'false',
},
-{ name => 'wal_consistency_checking', type => 'string', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Sets the WAL resource managers for which WAL consistency checks are done.',
- long_desc => 'Full-page images will be logged for all data blocks and cross-checked against the results of WAL replay.',
- flags => 'GUC_LIST_INPUT | GUC_NOT_IN_SAMPLE',
- variable => 'wal_consistency_checking_string',
- boot_val => '""',
- check_hook => 'check_wal_consistency_checking',
- assign_hook => 'assign_wal_consistency_checking',
+{ name => 'transaction_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the size of the dedicated buffer pool used for the transaction status cache.',
+ long_desc => '0 means use a fraction of "shared_buffers".',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'transaction_buffers',
+ boot_val => '0',
+ min => '0',
+ max => 'SLRU_MAX_ALLOWED_BUFFERS',
+ check_hook => 'check_transaction_buffers',
},
-{ name => 'jit_provider', type => 'string', context => 'PGC_POSTMASTER', group => 'CLIENT_CONN_PRELOAD',
- short_desc => 'JIT provider to use.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'jit_provider',
- boot_val => '"llvmjit"',
+{ name => 'transaction_deferrable', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Whether to defer a read-only serializable transaction until it can be executed with no possible serialization failures.',
+ flags => 'GUC_NO_RESET | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'XactDeferrable',
+ boot_val => 'false',
+ check_hook => 'check_transaction_deferrable',
},
-{ name => 'backtrace_functions', type => 'string', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Log backtrace for errors in these functions.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'backtrace_functions',
- boot_val => '""',
- check_hook => 'check_backtrace_functions',
- assign_hook => 'assign_backtrace_functions',
+{ name => 'transaction_isolation', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the current transaction\'s isolation level.',
+ flags => 'GUC_NO_RESET | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'XactIsoLevel',
+ boot_val => 'XACT_READ_COMMITTED',
+ options => 'isolation_level_options',
+ check_hook => 'check_transaction_isolation',
},
-{ name => 'debug_io_direct', type => 'string', context => 'PGC_POSTMASTER', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Use direct I/O for file access.',
- long_desc => 'An empty string disables direct I/O.',
- flags => 'GUC_LIST_INPUT | GUC_NOT_IN_SAMPLE',
- variable => 'debug_io_direct_string',
- boot_val => '""',
- check_hook => 'check_debug_io_direct',
- assign_hook => 'assign_debug_io_direct',
+{ name => 'transaction_read_only', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the current transaction\'s read-only status.',
+ flags => 'GUC_NO_RESET | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'XactReadOnly',
+ boot_val => 'false',
+ check_hook => 'check_transaction_read_only',
},
-{ name => 'synchronized_standby_slots', type => 'string', context => 'PGC_SIGHUP', group => 'REPLICATION_PRIMARY',
- short_desc => 'Lists streaming replication standby server replication slot names that logical WAL sender processes will wait for.',
- long_desc => 'Logical WAL sender processes will send decoded changes to output plugins only after the specified replication slots have confirmed receiving WAL.',
- flags => 'GUC_LIST_INPUT',
- variable => 'synchronized_standby_slots',
- boot_val => '""',
- check_hook => 'check_synchronized_standby_slots',
- assign_hook => 'assign_synchronized_standby_slots',
+{ name => 'transaction_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the maximum allowed duration of any transaction within a session (not a prepared transaction).',
+ long_desc => '0 disables the timeout.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'TransactionTimeout',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
+ assign_hook => 'assign_transaction_timeout',
+},
+
+{ name => 'transform_null_equals', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_OTHER',
+ short_desc => 'Treats "expr=NULL" as "expr IS NULL".',
+ long_desc => 'When turned on, expressions of the form expr = NULL (or NULL = expr) are treated as expr IS NULL, that is, they return true if expr evaluates to the null value, and false otherwise. The correct behavior of expr = NULL is to always return null (unknown).',
+ variable => 'Transform_null_equals',
+ boot_val => 'false',
},
-{ name => 'restrict_nonsystem_relation_kind', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Prohibits access to non-system relations of specified kinds.',
- flags => 'GUC_LIST_INPUT | GUC_NOT_IN_SAMPLE',
- variable => 'restrict_nonsystem_relation_kind_string',
- boot_val => '""',
- check_hook => 'check_restrict_nonsystem_relation_kind',
- assign_hook => 'assign_restrict_nonsystem_relation_kind',
+{ name => 'unix_socket_directories', type => 'string', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the directories where Unix-domain sockets will be created.',
+ flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY',
+ variable => 'Unix_socket_directories',
+ boot_val => 'DEFAULT_PGSOCKET_DIR',
},
-{ name => 'oauth_validator_libraries', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
- short_desc => 'Lists libraries that may be called to validate OAuth v2 bearer tokens.',
- flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY',
- variable => 'oauth_validator_libraries_string',
+{ name => 'unix_socket_group', type => 'string', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the owning group of the Unix-domain socket.',
+ long_desc => 'The owning user of the socket is always the user that starts the server. An empty string means use the user\'s default group.',
+ variable => 'Unix_socket_group',
boot_val => '""',
},
-{ name => 'log_connections', type => 'string', context => 'PGC_SU_BACKEND', group => 'LOGGING_WHAT',
- short_desc => 'Logs specified aspects of connection establishment and setup.',
- flags => 'GUC_LIST_INPUT',
- variable => 'log_connections_string',
- boot_val => '""',
- check_hook => 'check_log_connections',
- assign_hook => 'assign_log_connections',
+{ name => 'unix_socket_permissions', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the access permissions of the Unix-domain socket.',
+ long_desc => 'Unix-domain sockets use the usual Unix file system permission set. The parameter value is expected to be a numeric mode specification in the form accepted by the chmod and umask system calls. (To use the customary octal format the number must start with a 0 (zero).)',
+ variable => 'Unix_socket_permissions',
+ boot_val => '0777',
+ min => '0000',
+ max => '0777',
+ show_hook => 'show_unix_socket_permissions',
},
-{ name => 'backslash_quote', type => 'enum', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
- short_desc => 'Sets whether "\\\\\'" is allowed in string literals.',
- variable => 'backslash_quote',
- boot_val => 'BACKSLASH_QUOTE_SAFE_ENCODING',
- options => 'backslash_quote_options',
+{ name => 'update_process_title', type => 'bool', context => 'PGC_SUSET', group => 'PROCESS_TITLE',
+ short_desc => 'Updates the process title to show the active SQL command.',
+ long_desc => 'Enables updating of the process title every time a new SQL command is received by the server.',
+ variable => 'update_process_title',
+ boot_val => 'DEFAULT_UPDATE_PROCESS_TITLE',
},
-{ name => 'bytea_output', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the output format for bytea.',
- variable => 'bytea_output',
- boot_val => 'BYTEA_OUTPUT_HEX',
- options => 'bytea_output_options',
+{ name => 'vacuum_buffer_usage_limit', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the buffer pool size for VACUUM, ANALYZE, and autovacuum.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'VacuumBufferUsageLimit',
+ boot_val => '2048',
+ min => '0',
+ max => 'MAX_BAS_VAC_RING_SIZE_KB',
+ check_hook => 'check_vacuum_buffer_usage_limit',
},
-{ name => 'client_min_messages', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the message levels that are sent to the client.',
- long_desc => 'Each level includes all the levels that follow it. The later the level, the fewer messages are sent.',
- variable => 'client_min_messages',
- boot_val => 'NOTICE',
- options => 'client_message_level_options',
+{ name => 'vacuum_cost_delay', type => 'real', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
+ short_desc => 'Vacuum cost delay in milliseconds.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'VacuumCostDelay',
+ boot_val => '0',
+ min => '0',
+ max => '100',
},
-{ name => 'compute_query_id', type => 'enum', context => 'PGC_SUSET', group => 'STATS_MONITORING',
- short_desc => 'Enables in-core computation of query identifiers.',
- variable => 'compute_query_id',
- boot_val => 'COMPUTE_QUERY_ID_AUTO',
- options => 'compute_query_id_options',
+{ name => 'vacuum_cost_limit', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
+ short_desc => 'Vacuum cost amount available before napping.',
+ variable => 'VacuumCostLimit',
+ boot_val => '200',
+ min => '1',
+ max => '10000',
},
-{ name => 'constraint_exclusion', type => 'enum', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
- short_desc => 'Enables the planner to use constraints to optimize queries.',
- long_desc => 'Table scans will be skipped if their constraints guarantee that no rows match the query.',
- flags => 'GUC_EXPLAIN',
- variable => 'constraint_exclusion',
- boot_val => 'CONSTRAINT_EXCLUSION_PARTITION',
- options => 'constraint_exclusion_options',
+{ name => 'vacuum_cost_page_dirty', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
+ short_desc => 'Vacuum cost for a page dirtied by vacuum.',
+ variable => 'VacuumCostPageDirty',
+ boot_val => '20',
+ min => '0',
+ max => '10000',
},
-{ name => 'default_toast_compression', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the default compression method for compressible values.',
- variable => 'default_toast_compression',
- boot_val => 'TOAST_PGLZ_COMPRESSION',
- options => 'default_toast_compression_options',
+{ name => 'vacuum_cost_page_hit', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
+ short_desc => 'Vacuum cost for a page found in the buffer cache.',
+ variable => 'VacuumCostPageHit',
+ boot_val => '1',
+ min => '0',
+ max => '10000',
},
-{ name => 'default_transaction_isolation', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the transaction isolation level of each new transaction.',
- variable => 'DefaultXactIsoLevel',
- boot_val => 'XACT_READ_COMMITTED',
- options => 'isolation_level_options',
+{ name => 'vacuum_cost_page_miss', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
+ short_desc => 'Vacuum cost for a page not found in the buffer cache.',
+ variable => 'VacuumCostPageMiss',
+ boot_val => '2',
+ min => '0',
+ max => '10000',
},
-{ name => 'transaction_isolation', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the current transaction\'s isolation level.',
- flags => 'GUC_NO_RESET | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'XactIsoLevel',
- boot_val => 'XACT_READ_COMMITTED',
- options => 'isolation_level_options',
- check_hook => 'check_transaction_isolation',
+{ name => 'vacuum_failsafe_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
+ short_desc => 'Age at which VACUUM should trigger failsafe to avoid a wraparound outage.',
+ variable => 'vacuum_failsafe_age',
+ boot_val => '1600000000',
+ min => '0',
+ max => '2100000000',
},
-{ name => 'IntervalStyle', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets the display format for interval values.',
- flags => 'GUC_REPORT',
- variable => 'IntervalStyle',
- boot_val => 'INTSTYLE_POSTGRES',
- options => 'intervalstyle_options',
+{ name => 'vacuum_freeze_min_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
+ short_desc => 'Minimum age at which VACUUM should freeze a table row.',
+ variable => 'vacuum_freeze_min_age',
+ boot_val => '50000000',
+ min => '0',
+ max => '1000000000',
},
-{ name => 'icu_validation_level', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Log level for reporting invalid ICU locale strings.',
- variable => 'icu_validation_level',
- boot_val => 'WARNING',
- options => 'icu_validation_level_options',
+{ name => 'vacuum_freeze_table_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
+ short_desc => 'Age at which VACUUM should scan whole table to freeze tuples.',
+ variable => 'vacuum_freeze_table_age',
+ boot_val => '150000000',
+ min => '0',
+ max => '2000000000',
},
-{ name => 'log_error_verbosity', type => 'enum', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
- short_desc => 'Sets the verbosity of logged messages.',
- variable => 'Log_error_verbosity',
- boot_val => 'PGERROR_DEFAULT',
- options => 'log_error_verbosity_options',
+{ name => 'vacuum_max_eager_freeze_failure_rate', type => 'real', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
+ short_desc => 'Fraction of pages in a relation vacuum can scan and fail to freeze before disabling eager scanning.',
+ long_desc => 'A value of 0.0 disables eager scanning and a value of 1.0 will eagerly scan up to 100 percent of the all-visible pages in the relation. If vacuum successfully freezes these pages, the cap is lower than 100 percent, because the goal is to amortize page freezing across multiple vacuums.',
+ variable => 'vacuum_max_eager_freeze_failure_rate',
+ boot_val => '0.03',
+ min => '0.0',
+ max => '1.0',
},
-{ name => 'log_min_messages', type => 'enum', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
- short_desc => 'Sets the message levels that are logged.',
- long_desc => 'Each level includes all the levels that follow it. The later the level, the fewer messages are sent.',
- variable => 'log_min_messages',
- boot_val => 'WARNING',
- options => 'server_message_level_options',
+{ name => 'vacuum_multixact_failsafe_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
+ short_desc => 'Multixact age at which VACUUM should trigger failsafe to avoid a wraparound outage.',
+ variable => 'vacuum_multixact_failsafe_age',
+ boot_val => '1600000000',
+ min => '0',
+ max => '2100000000',
},
-{ name => 'log_min_error_statement', type => 'enum', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
- short_desc => 'Causes all statements generating error at or above this level to be logged.',
- long_desc => 'Each level includes all the levels that follow it. The later the level, the fewer messages are sent.',
- variable => 'log_min_error_statement',
- boot_val => 'ERROR',
- options => 'server_message_level_options',
+{ name => 'vacuum_multixact_freeze_min_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
+ short_desc => 'Minimum age at which VACUUM should freeze a MultiXactId in a table row.',
+ variable => 'vacuum_multixact_freeze_min_age',
+ boot_val => '5000000',
+ min => '0',
+ max => '1000000000',
},
-{ name => 'log_statement', type => 'enum', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
- short_desc => 'Sets the type of statements logged.',
- variable => 'log_statement',
- boot_val => 'LOGSTMT_NONE',
- options => 'log_statement_options',
+{ name => 'vacuum_multixact_freeze_table_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
+ short_desc => 'Multixact age at which VACUUM should scan whole table to freeze tuples.',
+ variable => 'vacuum_multixact_freeze_table_age',
+ boot_val => '150000000',
+ min => '0',
+ max => '2000000000',
},
-{ name => 'syslog_facility', type => 'enum', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Sets the syslog "facility" to be used when syslog enabled.',
- variable => 'syslog_facility',
- boot_val => 'DEFAULT_SYSLOG_FACILITY',
- options => 'syslog_facility_options',
- assign_hook => 'assign_syslog_facility',
+{ name => 'vacuum_truncate', type => 'bool', context => 'PGC_USERSET', group => 'VACUUM_DEFAULT',
+ short_desc => 'Enables vacuum to truncate empty pages at the end of the table.',
+ variable => 'vacuum_truncate',
+ boot_val => 'true',
},
-{ name => 'session_replication_role', type => 'enum', context => 'PGC_SUSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the session\'s behavior for triggers and rewrite rules.',
- variable => 'SessionReplicationRole',
- boot_val => 'SESSION_REPLICATION_ROLE_ORIGIN',
- options => 'session_replication_role_options',
- assign_hook => 'assign_session_replication_role',
+{ name => 'wal_block_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the block size in the write ahead log.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'wal_block_size',
+ boot_val => 'XLOG_BLCKSZ',
+ min => 'XLOG_BLCKSZ',
+ max => 'XLOG_BLCKSZ',
},
-{ name => 'synchronous_commit', type => 'enum', context => 'PGC_USERSET', group => 'WAL_SETTINGS',
- short_desc => 'Sets the current transaction\'s synchronization level.',
- variable => 'synchronous_commit',
- boot_val => 'SYNCHRONOUS_COMMIT_ON',
- options => 'synchronous_commit_options',
- assign_hook => 'assign_synchronous_commit',
+{ name => 'wal_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'WAL_SETTINGS',
+ short_desc => 'Sets the number of disk-page buffers in shared memory for WAL.',
+ long_desc => '-1 means use a fraction of "shared_buffers".',
+ flags => 'GUC_UNIT_XBLOCKS',
+ variable => 'XLOGbuffers',
+ boot_val => '-1',
+ min => '-1',
+ max => '(INT_MAX / XLOG_BLCKSZ)',
+ check_hook => 'check_wal_buffers',
},
-{ name => 'archive_mode', type => 'enum', context => 'PGC_POSTMASTER', group => 'WAL_ARCHIVING',
- short_desc => 'Allows archiving of WAL files using "archive_command".',
- variable => 'XLogArchiveMode',
- boot_val => 'ARCHIVE_MODE_OFF',
- options => 'archive_mode_options',
+{ name => 'wal_compression', type => 'enum', context => 'PGC_SUSET', group => 'WAL_SETTINGS',
+ short_desc => 'Compresses full-page writes written in WAL file with specified method.',
+ variable => 'wal_compression',
+ boot_val => 'WAL_COMPRESSION_NONE',
+ options => 'wal_compression_options',
+},
+
+{ name => 'wal_consistency_checking', type => 'string', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Sets the WAL resource managers for which WAL consistency checks are done.',
+ long_desc => 'Full-page images will be logged for all data blocks and cross-checked against the results of WAL replay.',
+ flags => 'GUC_LIST_INPUT | GUC_NOT_IN_SAMPLE',
+ variable => 'wal_consistency_checking_string',
+ boot_val => '""',
+ check_hook => 'check_wal_consistency_checking',
+ assign_hook => 'assign_wal_consistency_checking',
},
-{ name => 'recovery_target_action', type => 'enum', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
- short_desc => 'Sets the action to perform upon reaching the recovery target.',
- variable => 'recoveryTargetAction',
- boot_val => 'RECOVERY_TARGET_ACTION_PAUSE',
- options => 'recovery_target_action_options',
+{ name => 'wal_debug', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Emit WAL-related debugging output.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'XLOG_DEBUG',
+ boot_val => 'false',
+ ifdef => 'WAL_DEBUG',
},
-{ name => 'track_functions', type => 'enum', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
- short_desc => 'Collects function-level statistics on database activity.',
- variable => 'pgstat_track_functions',
- boot_val => 'TRACK_FUNC_OFF',
- options => 'track_function_options',
+{ name => 'wal_decode_buffer_size', type => 'int', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY',
+ short_desc => 'Buffer size for reading ahead in the WAL during recovery.',
+ long_desc => 'Maximum distance to read ahead in the WAL to prefetch referenced data blocks.',
+ flags => 'GUC_UNIT_BYTE',
+ variable => 'wal_decode_buffer_size',
+ boot_val => '512 * 1024',
+ min => '64 * 1024',
+ max => 'MaxAllocSize',
},
-{ name => 'stats_fetch_consistency', type => 'enum', context => 'PGC_USERSET', group => 'STATS_CUMULATIVE',
- short_desc => 'Sets the consistency of accesses to statistics data.',
- variable => 'pgstat_fetch_consistency',
- boot_val => 'PGSTAT_FETCH_CONSISTENCY_CACHE',
- options => 'stats_fetch_consistency',
- assign_hook => 'assign_stats_fetch_consistency',
+{ name => 'wal_init_zero', type => 'bool', context => 'PGC_SUSET', group => 'WAL_SETTINGS',
+ short_desc => 'Writes zeroes to new WAL files before first use.',
+ variable => 'wal_init_zero',
+ boot_val => 'true',
},
-{ name => 'wal_compression', type => 'enum', context => 'PGC_SUSET', group => 'WAL_SETTINGS',
- short_desc => 'Compresses full-page writes written in WAL file with specified method.',
- variable => 'wal_compression',
- boot_val => 'WAL_COMPRESSION_NONE',
- options => 'wal_compression_options',
+{ name => 'wal_keep_size', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SENDING',
+ short_desc => 'Sets the size of WAL files held for standby servers.',
+ flags => 'GUC_UNIT_MB',
+ variable => 'wal_keep_size_mb',
+ boot_val => '0',
+ min => '0',
+ max => 'MAX_KILOBYTES',
},
{ name => 'wal_level', type => 'enum', context => 'PGC_POSTMASTER', group => 'WAL_SETTINGS',
@@ -3342,137 +3333,146 @@
options => 'wal_level_options',
},
-{ name => 'dynamic_shared_memory_type', type => 'enum', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Selects the dynamic shared memory implementation used.',
- variable => 'dynamic_shared_memory_type',
- boot_val => 'DEFAULT_DYNAMIC_SHARED_MEMORY_TYPE',
- options => 'dynamic_shared_memory_options',
+{ name => 'wal_log_hints', type => 'bool', context => 'PGC_POSTMASTER', group => 'WAL_SETTINGS',
+ short_desc => 'Writes full pages to WAL when first modified after a checkpoint, even for a non-critical modification.',
+ variable => 'wal_log_hints',
+ boot_val => 'false',
},
-{ name => 'shared_memory_type', type => 'enum', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Selects the shared memory implementation used for the main shared memory region.',
- variable => 'shared_memory_type',
- boot_val => 'DEFAULT_SHARED_MEMORY_TYPE',
- options => 'shared_memory_options',
+{ name => 'wal_receiver_create_temp_slot', type => 'bool', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets whether a WAL receiver should create a temporary replication slot if no permanent slot is configured.',
+ variable => 'wal_receiver_create_temp_slot',
+ boot_val => 'false',
},
-{ name => 'file_copy_method', type => 'enum', context => 'PGC_USERSET', group => 'RESOURCES_DISK',
- short_desc => 'Selects the file copy method.',
- variable => 'file_copy_method',
- boot_val => 'FILE_COPY_METHOD_COPY',
- options => 'file_copy_method_options',
+{ name => 'wal_receiver_status_interval', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets the maximum interval between WAL receiver status reports to the sending server.',
+ flags => 'GUC_UNIT_S',
+ variable => 'wal_receiver_status_interval',
+ boot_val => '10',
+ min => '0',
+ max => 'INT_MAX / 1000',
},
-{ name => 'wal_sync_method', type => 'enum', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
- short_desc => 'Selects the method used for forcing WAL updates to disk.',
- variable => 'wal_sync_method',
- boot_val => 'DEFAULT_WAL_SYNC_METHOD',
- options => 'wal_sync_method_options',
- assign_hook => 'assign_wal_sync_method',
+{ name => 'wal_receiver_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets the maximum wait time to receive data from the sending server.',
+ long_desc => '0 disables the timeout.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'wal_receiver_timeout',
+ boot_val => '60 * 1000',
+ min => '0',
+ max => 'INT_MAX',
},
-{ name => 'xmlbinary', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets how binary values are to be encoded in XML.',
- variable => 'xmlbinary',
- boot_val => 'XMLBINARY_BASE64',
- options => 'xmlbinary_options',
+{ name => 'wal_recycle', type => 'bool', context => 'PGC_SUSET', group => 'WAL_SETTINGS',
+ short_desc => 'Recycles WAL files by renaming them.',
+ variable => 'wal_recycle',
+ boot_val => 'true',
},
-{ name => 'xmloption', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets whether XML data in implicit parsing and serialization operations is to be considered as documents or content fragments.',
- variable => 'xmloption',
- boot_val => 'XMLOPTION_CONTENT',
- options => 'xmloption_options',
+{ name => 'wal_retrieve_retry_interval', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets the time to wait before retrying to retrieve WAL after a failed attempt.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'wal_retrieve_retry_interval',
+ boot_val => '5000',
+ min => '1',
+ max => 'INT_MAX',
},
-{ name => 'huge_pages', type => 'enum', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Use of huge pages on Linux or Windows.',
- variable => 'huge_pages',
- boot_val => 'HUGE_PAGES_TRY',
- options => 'huge_pages_options',
+{ name => 'wal_segment_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the size of write ahead log segments.',
+ flags => 'GUC_UNIT_BYTE | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
+ variable => 'wal_segment_size',
+ boot_val => 'DEFAULT_XLOG_SEG_SIZE',
+ min => 'WalSegMinSize',
+ max => 'WalSegMaxSize',
+ check_hook => 'check_wal_segment_size',
},
-{ name => 'huge_pages_status', type => 'enum', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Indicates the status of huge pages.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'huge_pages_status',
- boot_val => 'HUGE_PAGES_UNKNOWN',
- options => 'huge_pages_status_options',
+{ name => 'wal_sender_timeout', type => 'int', context => 'PGC_USERSET', group => 'REPLICATION_SENDING',
+ short_desc => 'Sets the maximum time to wait for WAL replication.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'wal_sender_timeout',
+ boot_val => '60 * 1000',
+ min => '0',
+ max => 'INT_MAX',
},
-{ name => 'recovery_prefetch', type => 'enum', context => 'PGC_SIGHUP', group => 'WAL_RECOVERY',
- short_desc => 'Prefetch referenced blocks during recovery.',
- long_desc => 'Look ahead in the WAL to find references to uncached data.',
- variable => 'recovery_prefetch',
- boot_val => 'RECOVERY_PREFETCH_TRY',
- options => 'recovery_prefetch_options',
- check_hook => 'check_recovery_prefetch',
- assign_hook => 'assign_recovery_prefetch',
+{ name => 'wal_skip_threshold', type => 'int', context => 'PGC_USERSET', group => 'WAL_SETTINGS',
+ short_desc => 'Minimum size of new file to fsync instead of writing WAL.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'wal_skip_threshold',
+ boot_val => '2048',
+ min => '0',
+ max => 'MAX_KILOBYTES',
},
-{ name => 'debug_parallel_query', type => 'enum', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Forces the planner\'s use parallel query nodes.',
- long_desc => 'This can be useful for testing the parallel query infrastructure by forcing the planner to generate plans that contain nodes that perform tuple communication between workers and the main process.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_EXPLAIN',
- variable => 'debug_parallel_query',
- boot_val => 'DEBUG_PARALLEL_OFF',
- options => 'debug_parallel_query_options',
+{ name => 'wal_summary_keep_time', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_SUMMARIZATION',
+ short_desc => 'Time for which WAL summary files should be kept.',
+ long_desc => '0 disables automatic summary file deletion.',
+ flags => 'GUC_UNIT_MIN',
+ variable => 'wal_summary_keep_time',
+ boot_val => '10 * HOURS_PER_DAY * MINS_PER_HOUR /* 10 days */',
+ min => '0',
+ max => 'INT_MAX / SECS_PER_MINUTE',
},
-{ name => 'password_encryption', type => 'enum', context => 'PGC_USERSET', group => 'CONN_AUTH_AUTH',
- short_desc => 'Chooses the algorithm for encrypting passwords.',
- variable => 'Password_encryption',
- boot_val => 'PASSWORD_TYPE_SCRAM_SHA_256',
- options => 'password_encryption_options',
+{ name => 'wal_sync_method', type => 'enum', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
+ short_desc => 'Selects the method used for forcing WAL updates to disk.',
+ variable => 'wal_sync_method',
+ boot_val => 'DEFAULT_WAL_SYNC_METHOD',
+ options => 'wal_sync_method_options',
+ assign_hook => 'assign_wal_sync_method',
},
-{ name => 'plan_cache_mode', type => 'enum', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
- short_desc => 'Controls the planner\'s selection of custom or generic plan.',
- long_desc => 'Prepared statements can have custom and generic plans, and the planner will attempt to choose which is better. This can be set to override the default behavior.',
- flags => 'GUC_EXPLAIN',
- variable => 'plan_cache_mode',
- boot_val => 'PLAN_CACHE_MODE_AUTO',
- options => 'plan_cache_mode_options',
+{ name => 'wal_writer_delay', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
+ short_desc => 'Time between WAL flushes performed in the WAL writer.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'WalWriterDelay',
+ boot_val => '200',
+ min => '1',
+ max => '10000',
},
-{ name => 'ssl_min_protocol_version', type => 'enum', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Sets the minimum SSL/TLS protocol version to use.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'ssl_min_protocol_version',
- boot_val => 'PG_TLS1_2_VERSION',
- options => 'ssl_protocol_versions_info + 1', # don't allow PG_TLS_ANY
+{ name => 'wal_writer_flush_after', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
+ short_desc => 'Amount of WAL written out by WAL writer that triggers a flush.',
+ flags => 'GUC_UNIT_XBLOCKS',
+ variable => 'WalWriterFlushAfter',
+ boot_val => 'DEFAULT_WAL_WRITER_FLUSH_AFTER',
+ min => '0',
+ max => 'INT_MAX',
},
-{ name => 'ssl_max_protocol_version', type => 'enum', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Sets the maximum SSL/TLS protocol version to use.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'ssl_max_protocol_version',
- boot_val => 'PG_TLS_ANY',
- options => 'ssl_protocol_versions_info',
+{ name => 'work_mem', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the maximum memory to be used for query workspaces.',
+ long_desc => 'This much memory can be used by each internal sort operation and hash table before switching to temporary disk files.',
+ flags => 'GUC_UNIT_KB | GUC_EXPLAIN',
+ variable => 'work_mem',
+ boot_val => '4096',
+ min => '64',
+ max => 'MAX_KILOBYTES',
},
-{ name => 'recovery_init_sync_method', type => 'enum', context => 'PGC_SIGHUP', group => 'ERROR_HANDLING_OPTIONS',
- short_desc => 'Sets the method for synchronizing the data directory before crash recovery.',
- variable => 'recovery_init_sync_method',
- boot_val => 'DATA_DIR_SYNC_METHOD_FSYNC',
- options => 'recovery_init_sync_method_options',
+{ name => 'xmlbinary', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets how binary values are to be encoded in XML.',
+ variable => 'xmlbinary',
+ boot_val => 'XMLBINARY_BASE64',
+ options => 'xmlbinary_options',
},
-{ name => 'debug_logical_replication_streaming', type => 'enum', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Forces immediate streaming or serialization of changes in large transactions.',
- long_desc => 'On the publisher, it allows streaming or serializing each change in logical decoding. On the subscriber, it allows serialization of all changes to files and notifies the parallel apply workers to read and apply them at the end of the transaction.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'debug_logical_replication_streaming',
- boot_val => 'DEBUG_LOGICAL_REP_STREAMING_BUFFERED',
- options => 'debug_logical_replication_streaming_options',
+{ name => 'xmloption', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets whether XML data in implicit parsing and serialization operations is to be considered as documents or content fragments.',
+ variable => 'xmloption',
+ boot_val => 'XMLOPTION_CONTENT',
+ options => 'xmloption_options',
},
-{ name => 'io_method', type => 'enum', context => 'PGC_POSTMASTER', group => 'RESOURCES_IO',
- short_desc => 'Selects the method for executing asynchronous I/O.',
- variable => 'io_method',
- boot_val => 'DEFAULT_IO_METHOD',
- options => 'io_method_options',
- assign_hook => 'assign_io_method',
+{ name => 'zero_damaged_pages', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Continues processing past damaged page headers.',
+ long_desc => 'Detection of a damaged page header normally causes PostgreSQL to report an error, aborting the current transaction. Setting "zero_damaged_pages" to true causes the system to instead report a warning, zero out the damaged page, and continue processing. This behavior will destroy data, namely all the rows on the damaged page.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'zero_damaged_pages',
+ boot_val => 'false',
},
]
--
2.51.0
v1-0008-Enforce-alphabetical-order-in-guc_parameters.dat.patchtext/plain; charset=UTF-8; name=v1-0008-Enforce-alphabetical-order-in-guc_parameters.dat.patchDownload
From 1da67d974261b855ce1f10e1f9aecda06b57a09e Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 3 Oct 2025 08:27:18 +0200
Subject: [PATCH v1 8/8] Enforce alphabetical order in guc_parameters.dat
The order in these lists was previously pretty random and had grown
organically over time. This made it unnecessarily cumbersome to
maintain these lists, as there was no clear guidelines about where to
put new entries. Also, after the merger of the type-specific GUC
structs, the list still reflected the previous type-specific
super-order.
By enforcing alphabetical order, the place for new entries becomes
clear, and often related entries will be listed close together.
Note: The order is actually checked after lower-casing, to handle the
likes of "DateStyle".
---
src/backend/utils/misc/gen_guc_tables.pl | 8 ++++++++
src/backend/utils/misc/guc_parameters.dat | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/backend/utils/misc/gen_guc_tables.pl b/src/backend/utils/misc/gen_guc_tables.pl
index 0823e2e552c..05d1daea56b 100644
--- a/src/backend/utils/misc/gen_guc_tables.pl
+++ b/src/backend/utils/misc/gen_guc_tables.pl
@@ -42,6 +42,7 @@ sub dquote
sub print_table
{
my ($ofh) = @_;
+ my $prev_name = undef;
print $ofh "\n\n";
print $ofh "struct config_generic ConfigureNames[] =\n";
@@ -49,6 +50,11 @@ sub print_table
foreach my $entry (@{$parse})
{
+ if (defined($prev_name) && lc($prev_name) ge lc($entry->{name}))
+ {
+ die sprintf("entries are not in alphabetical order: \"%s\", \"%s\"\n", $prev_name, $entry->{name});
+ }
+
print $ofh "#ifdef $entry->{ifdef}\n" if $entry->{ifdef};
print $ofh "\t{\n";
printf $ofh "\t\t.name = %s,\n", dquote($entry->{name});
@@ -71,6 +77,8 @@ sub print_table
print $ofh "\t},\n";
print $ofh "#endif\n" if $entry->{ifdef};
print $ofh "\n";
+
+ $prev_name = $entry->{name};
}
print $ofh "\t/* End-of-list marker */\n";
diff --git a/src/backend/utils/misc/guc_parameters.dat b/src/backend/utils/misc/guc_parameters.dat
index d54c65ee9c3..dffcde73e92 100644
--- a/src/backend/utils/misc/guc_parameters.dat
+++ b/src/backend/utils/misc/guc_parameters.dat
@@ -23,7 +23,7 @@
# 3. Decide on a name, a default value, upper and lower bounds (if
# applicable), etc.
#
-# 4. Add a record below.
+# 4. Add a record below (in alphabetical order).
#
# 5. Add it to src/backend/utils/misc/postgresql.conf.sample, if
# appropriate.
--
2.51.0
On Oct 3, 2025, at 14:55, Peter Eisentraut <peter@eisentraut.org> wrote:
The patches in the series are arranged so that they can be considered and applied incrementally.
<v1-0001-Modernize-some-for-loops.patch><v1-0002-Add-some-const-qualifiers.patch><v1-0003-Change-reset_extra-into-a-config_generic-common-f.patch><v1-0004-Use-designated-initializers-for-guc_tables.patch><v1-0005-Change-config_generic.vartype-to-be-initialized-a.patch><v1-0006-Reorganize-GUC-structs.patch><v1-0007-Sort-guc_parameters.dat-alphabetically-by-name.patch><v1-0008-Enforce-alphabetical-order-in-guc_parameters.dat.patch>
0001 - looks good to me. Basically it only moves for loop’s loop variable type definition into for(), it isn’t tied to rest commits, I guess it can be pushed independently.
0002 - also looks good. It just add “const” where possible. I think it can be pushed together with 0001.
0003 - also looks good. It moves “reset_extra” from individual typed config structure to “config_generic”, which dramatically eliminates unnecessary switch-cases. Just a small comment:
```
@@ -6244,29 +6217,11 @@ RestoreGUCState(void *gucstate)
switch (gconf->vartype)
{
case PGC_BOOL:
- {
- struct config_bool *conf = (struct config_bool *) gconf;
-
- if (conf->reset_extra && conf->reset_extra != gconf->extra)
- guc_free(conf->reset_extra);
- break;
- }
case PGC_INT:
- {
- struct config_int *conf = (struct config_int *) gconf;
-
- if (conf->reset_extra && conf->reset_extra != gconf->extra)
- guc_free(conf->reset_extra);
- break;
- }
case PGC_REAL:
- {
- struct config_real *conf = (struct config_real *) gconf;
-
- if (conf->reset_extra && conf->reset_extra != gconf->extra)
- guc_free(conf->reset_extra);
- break;
- }
+ case PGC_ENUM:
+ /* no need to do anything */
+ break;
case PGC_STRING:
{
struct config_string *conf = (struct config_string *) gconf;
@@ -6274,19 +6229,11 @@ RestoreGUCState(void *gucstate)
guc_free(*conf->variable);
if (conf->reset_val && conf->reset_val != *conf->variable)
guc_free(conf->reset_val);
- if (conf->reset_extra && conf->reset_extra != gconf->extra)
- guc_free(conf->reset_extra);
- break;
- }
- case PGC_ENUM:
- {
- struct config_enum *conf = (struct config_enum *) gconf;
-
- if (conf->reset_extra && conf->reset_extra != gconf->extra)
- guc_free(conf->reset_extra);
break;
}
}
```
Do we still need this switch-case? As only PGC_STRING needs to do something, why not just do:
```
If (gconf-vartype == PGC_STRING)
{
…
}
if (gconf->reset_extra && gconf->reset_extra != gconf->extra)
guc_free(gconf->reset_extra);
```
0004 - Also looks good to me. But I am not an expert of perl programming, so I cannot comment much.
0005 - Also looks good to me. This is a small change. It updates the perl script to set vartype so that vartype gets set at compile time, which further simplifies the c code.
0006 - Comes to the most interesting part of this patch. It moves all typed config into “config_generic” as a unnamed union, then replaces typed config with config_generic everywhere. Though this commit touches a lot of lines of code, but all changes are straightforward. Also looks good to me.
0007 needs a rebase. I guess you may split 0007 and 0008 to a separate patch once 0001-0006 are pushed. As they only re-order GUC variables without real logic change, so they can be quickly reviewed and pushed, otherwise it would be painful where every commit the touches GUC would lead to a rebase.
0008 - I don’t review it as 0007 needs a rebase.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
On Fri, Oct 3, 2025 at 1:55 PM Peter Eisentraut <peter@eisentraut.org> wrote:
Additionally, I have sorted guc_parameters.dat alphabetically by name,
and have added code to enforce the sort order going forward. (Note: The
That makes sense by default. Another possibility would be to keep them
in the same order as postgresql.conf.sample. You mentioned earlier it
may be possible to generate the latter, although it's not yet clear if
that could be done easily. If not, then keeping them in sync would be
extra work.
--
John Naylor
Amazon Web Services
On 2025-Oct-13, John Naylor wrote:
On Fri, Oct 3, 2025 at 1:55 PM Peter Eisentraut <peter@eisentraut.org> wrote:
Additionally, I have sorted guc_parameters.dat alphabetically by name,
and have added code to enforce the sort order going forward.That makes sense by default. Another possibility would be to keep them
in the same order as postgresql.conf.sample. You mentioned earlier it
may be possible to generate the latter, although it's not yet clear if
that could be done easily. If not, then keeping them in sync would be
extra work.
I agree that keeping the guc_parameters.dat file alphabetically sorted
by default would keep the maintenance cost lowest, because we won't have
to make any subjective decisions for new entries. However, automatically
generating the .sample file sounds impractical, considering the
free-form comments that we currently have there. For instance
#max_prepared_transactions = 0 # zero disables the feature
# (change requires restart)
# Caution: it is not advisable to set max_prepared_transactions nonzero unless
# you actively intend to use prepared transactions.
We'd have to store the comments together in the guc_parameters.dat table
so that the sample file knows where and how to put them, and it would
IMO look worse.
Also, the order of entries in postgresql.conf.sample was at some point
carefully considered. Messing that up (by making the entries match
alphabetical order, even within each section) would also be worse IMO.
So we'd have to add values for the sorting to know where in the file
each section goes, what its opening comment is, and where each entry
goes within each section.
I think instead of that mess, maybe we can simply keep the sample file
as-is, cross-check that a line for each non-hidden GUC variable exists,
and perhaps that the commented-out default value matches the data file.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
Al principio era UNIX, y UNIX habló y dijo: "Hello world\n".
No dijo "Hello New Jersey\n", ni "Hello USA\n".
On 13.10.25 13:39, Álvaro Herrera wrote:
I agree that keeping the guc_parameters.dat file alphabetically sorted
by default would keep the maintenance cost lowest, because we won't have
to make any subjective decisions for new entries. However, automatically
generating the .sample file sounds impractical, considering the
free-form comments that we currently have there.
Yes, I'm not sure if it's practical in the fullest extent. But there
were at various points discussions about alternative layouts and
contents for postgresql.conf.sample, with a lot of opinions. With this
new framework, I think it might be interesting to experiment. Which is
why I mentioned it.
I think instead of that mess, maybe we can simply keep the sample file
as-is, cross-check that a line for each non-hidden GUC variable exists,
and perhaps that the commented-out default value matches the data file.
Those would certainly be reasonable near-term steps.
On 09.10.25 09:15, Chao Li wrote:
0001 - looks good to me. Basically it only moves for loop’s loop
variable type definition into for(), it isn’t tied to rest commits, I
guess it can be pushed independently.0002 - also looks good. It just add “const” where possible. I think it
can be pushed together with 0001.0003 - also looks good. It moves “reset_extra” from individual typed
config structure to “config_generic”, which dramatically eliminates
unnecessary switch-cases.
I have committed these first three. Attached is the rest of the patch
series rebased.
It looks like we have consensus in principle on the remaining changes,
but I'll leave them out here a while longer in case there are any
further thoughts.
Regarding ...
Just a small comment:
``` @@ -6244,29 +6217,11 @@ RestoreGUCState(void *gucstate) switch (gconf->vartype) { case PGC_BOOL: -{ -struct config_bool *conf = (struct config_bool *) gconf; - -if (conf->reset_extra && conf->reset_extra != gconf->extra) -guc_free(conf->reset_extra); -break; -} case PGC_INT: -{ -struct config_int *conf = (struct config_int *) gconf; - -if (conf->reset_extra && conf->reset_extra != gconf->extra) -guc_free(conf->reset_extra); -break; -} case PGC_REAL: -{ -struct config_real *conf = (struct config_real *) gconf; - -if (conf->reset_extra && conf->reset_extra != gconf->extra) -guc_free(conf->reset_extra); -break; -} +case PGC_ENUM: +/* no need to do anything */ +break; case PGC_STRING: { struct config_string *conf = (struct config_string *) gconf; @@ -6274,19 +6229,11 @@ RestoreGUCState(void *gucstate) guc_free(*conf->variable); if (conf->reset_val && conf->reset_val != *conf->variable) guc_free(conf->reset_val); -if (conf->reset_extra && conf->reset_extra != gconf->extra) -guc_free(conf->reset_extra); -break; -} -case PGC_ENUM: -{ -struct config_enum *conf = (struct config_enum *) gconf; - -if (conf->reset_extra && conf->reset_extra != gconf->extra) -guc_free(conf->reset_extra); break; } } ```Do we still need this switch-case? As only PGC_STRING needs to do
something, why not just do:```
If (gconf-vartype == PGC_STRING)
{
…
}
if (gconf->reset_extra && gconf->reset_extra != gconf->extra)
guc_free(gconf->reset_extra);
```
I initially had it like that, but there are a couple of other places in
the existing code that have a switch with only actual code for
PGC_STRING, so I ended up following that pattern.
Attachments:
v2-0001-Use-designated-initializers-for-guc_tables.patchtext/plain; charset=UTF-8; name=v2-0001-Use-designated-initializers-for-guc_tables.patchDownload
From 82e3d62bf220f2c6b171d5c949caab06da26a50a Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 3 Oct 2025 08:27:18 +0200
Subject: [PATCH v2 1/5] Use designated initializers for guc_tables
This makes the generating script simpler and the output easier to
read. In the future, it will make it easier to reorder and rearrange
the underlying C structures.
Discussion: https://www.postgresql.org/message-id/flat/8fdfb91e-60fb-44fa-8df6-f5dea47353c9@eisentraut.org
---
src/backend/utils/misc/gen_guc_tables.pl | 53 ++++++++++--------------
1 file changed, 22 insertions(+), 31 deletions(-)
diff --git a/src/backend/utils/misc/gen_guc_tables.pl b/src/backend/utils/misc/gen_guc_tables.pl
index bc8233f2d39..a48a9ebd0eb 100644
--- a/src/backend/utils/misc/gen_guc_tables.pl
+++ b/src/backend/utils/misc/gen_guc_tables.pl
@@ -57,41 +57,32 @@ sub print_one_table
print $ofh "#ifdef $entry->{ifdef}\n" if $entry->{ifdef};
print $ofh "\t{\n";
- printf $ofh "\t\t{%s, %s, %s,\n",
- dquote($entry->{name}),
- $entry->{context},
- $entry->{group};
- printf $ofh "\t\t\tgettext_noop(%s),\n", dquote($entry->{short_desc});
- if ($entry->{long_desc})
- {
- printf $ofh "\t\t\tgettext_noop(%s)", dquote($entry->{long_desc});
- }
- else
- {
- print $ofh "\t\t\tNULL";
- }
- if ($entry->{flags})
- {
- print $ofh ",\n\t\t\t$entry->{flags}\n";
- }
- else
- {
- print $ofh "\n";
- }
+ print $ofh "\t\t{\n";
+ printf $ofh "\t\t\t.name = %s,\n", dquote($entry->{name});
+ printf $ofh "\t\t\t.context = %s,\n", $entry->{context};
+ printf $ofh "\t\t\t.group = %s,\n", $entry->{group};
+ printf $ofh "\t\t\t.short_desc = gettext_noop(%s),\n",
+ dquote($entry->{short_desc});
+ printf $ofh "\t\t\t.long_desc = gettext_noop(%s),\n",
+ dquote($entry->{long_desc})
+ if $entry->{long_desc};
+ printf $ofh "\t\t\t.flags = %s,\n", $entry->{flags}
+ if $entry->{flags};
print $ofh "\t\t},\n";
- print $ofh "\t\t&$entry->{variable},\n";
- print $ofh "\t\t$entry->{boot_val},";
- print $ofh " $entry->{min},"
+ printf $ofh "\t\t.variable = &%s,\n", $entry->{variable};
+ printf $ofh "\t\t.boot_val = %s,\n", $entry->{boot_val};
+ printf $ofh "\t\t.min = %s,\n", $entry->{min}
if $entry->{type} eq 'int' || $entry->{type} eq 'real';
- print $ofh " $entry->{max},"
+ printf $ofh "\t\t.max = %s,\n", $entry->{max}
if $entry->{type} eq 'int' || $entry->{type} eq 'real';
- print $ofh " $entry->{options},"
+ printf $ofh "\t\t.options = %s,\n", $entry->{options}
if $entry->{type} eq 'enum';
- print $ofh "\n";
- printf $ofh "\t\t%s, %s, %s\n",
- ($entry->{check_hook} || 'NULL'),
- ($entry->{assign_hook} || 'NULL'),
- ($entry->{show_hook} || 'NULL');
+ printf $ofh "\t\t.check_hook = %s,\n", $entry->{check_hook}
+ if $entry->{check_hook};
+ printf $ofh "\t\t.assign_hook = %s,\n", $entry->{assign_hook}
+ if $entry->{assign_hook};
+ printf $ofh "\t\t.show_hook = %s,\n", $entry->{show_hook}
+ if $entry->{show_hook};
print $ofh "\t},\n";
print $ofh "#endif\n" if $entry->{ifdef};
print $ofh "\n";
base-commit: 5f4c3b33a97688174dfff44bdbc9ac228095714a
--
2.51.0
v2-0002-Change-config_generic.vartype-to-be-initialized-a.patchtext/plain; charset=UTF-8; name=v2-0002-Change-config_generic.vartype-to-be-initialized-a.patchDownload
From f4c24d5b87dbbbd1af5740ec12a5d42bd8f1349d Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 3 Oct 2025 08:27:18 +0200
Subject: [PATCH v2 2/5] Change config_generic.vartype to be initialized at
compile time
Previously, this was initialized at run time so that it did not have
to be maintained by hand in guc_tables.c, but since that table is now
generated anyway, we might as well generate this bit as well.
Discussion: https://www.postgresql.org/message-id/flat/8fdfb91e-60fb-44fa-8df6-f5dea47353c9@eisentraut.org
---
src/backend/utils/misc/gen_guc_tables.pl | 1 +
src/backend/utils/misc/guc.c | 28 +-----------------------
src/include/utils/guc_tables.h | 2 +-
3 files changed, 3 insertions(+), 28 deletions(-)
diff --git a/src/backend/utils/misc/gen_guc_tables.pl b/src/backend/utils/misc/gen_guc_tables.pl
index a48a9ebd0eb..b187259bf1e 100644
--- a/src/backend/utils/misc/gen_guc_tables.pl
+++ b/src/backend/utils/misc/gen_guc_tables.pl
@@ -68,6 +68,7 @@ sub print_one_table
if $entry->{long_desc};
printf $ofh "\t\t\t.flags = %s,\n", $entry->{flags}
if $entry->{flags};
+ printf $ofh "\t\t\t.vartype = %s,\n", ('PGC_' . uc($type));
print $ofh "\t\t},\n";
printf $ofh "\t\t.variable = &%s,\n", $entry->{variable};
printf $ofh "\t\t.boot_val = %s,\n", $entry->{boot_val};
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index a64427ac979..a82286cc98a 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -890,48 +890,22 @@ build_guc_variables(void)
ALLOCSET_DEFAULT_SIZES);
/*
- * Count all the built-in variables, and set their vartypes correctly.
+ * Count all the built-in variables.
*/
for (int i = 0; ConfigureNamesBool[i].gen.name; i++)
- {
- struct config_bool *conf = &ConfigureNamesBool[i];
-
- /* Rather than requiring vartype to be filled in by hand, do this: */
- conf->gen.vartype = PGC_BOOL;
num_vars++;
- }
for (int i = 0; ConfigureNamesInt[i].gen.name; i++)
- {
- struct config_int *conf = &ConfigureNamesInt[i];
-
- conf->gen.vartype = PGC_INT;
num_vars++;
- }
for (int i = 0; ConfigureNamesReal[i].gen.name; i++)
- {
- struct config_real *conf = &ConfigureNamesReal[i];
-
- conf->gen.vartype = PGC_REAL;
num_vars++;
- }
for (int i = 0; ConfigureNamesString[i].gen.name; i++)
- {
- struct config_string *conf = &ConfigureNamesString[i];
-
- conf->gen.vartype = PGC_STRING;
num_vars++;
- }
for (int i = 0; ConfigureNamesEnum[i].gen.name; i++)
- {
- struct config_enum *conf = &ConfigureNamesEnum[i];
-
- conf->gen.vartype = PGC_ENUM;
num_vars++;
- }
/*
* Create hash table with 20% slack
diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h
index c5776be029b..3de3d809545 100644
--- a/src/include/utils/guc_tables.h
+++ b/src/include/utils/guc_tables.h
@@ -177,8 +177,8 @@ struct config_generic
const char *short_desc; /* short desc. of this variable's purpose */
const char *long_desc; /* long desc. of this variable's purpose */
int flags; /* flag bits, see guc.h */
+ enum config_type vartype; /* type of variable */
/* variable fields, initialized at runtime: */
- enum config_type vartype; /* type of variable (set only at startup) */
int status; /* status bits, see below */
GucSource source; /* source of the current actual value */
GucSource reset_source; /* source of the reset_value */
--
2.51.0
v2-0003-Reorganize-GUC-structs.patchtext/plain; charset=UTF-8; name=v2-0003-Reorganize-GUC-structs.patchDownload
From 0288082963be99f75d5dc04f198ac2fcbaba8d51 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 3 Oct 2025 08:27:18 +0200
Subject: [PATCH v2 3/5] Reorganize GUC structs
Instead of having five separate structs, one for each type, with the
generic part contained in each of them, flip it around and have one
common struct, with the type-specific part has a subfield.
The very original GUC design had type-specific structs and
type-specific lists, and the membership in one of the lists defined
the type. But now the structs themselves know the type (from the
.vartype field), and they are all loaded into a common hash table at
run time, this original separation no longer makes sense. It creates
a bunch of inconsistencies in the code about whether the type-specific
or the generic struct is the primary struct, and a lot of casting in
between, which makes certain assumptions about the struct layouts.
After the change, all these casts are gone and all the data is
accessed via normal field references. Also, various code is
simplified because only one kind of struct needs to be processed.
Discussion: https://www.postgresql.org/message-id/flat/8fdfb91e-60fb-44fa-8df6-f5dea47353c9@eisentraut.org
---
src/backend/utils/misc/gen_guc_tables.pl | 53 +-
src/backend/utils/misc/guc.c | 847 ++++++++++-------------
src/backend/utils/misc/guc_funcs.c | 14 +-
src/backend/utils/misc/help_config.c | 59 +-
src/include/utils/guc_tables.h | 180 ++---
src/tools/pgindent/typedefs.list | 1 -
6 files changed, 525 insertions(+), 629 deletions(-)
diff --git a/src/backend/utils/misc/gen_guc_tables.pl b/src/backend/utils/misc/gen_guc_tables.pl
index b187259bf1e..3efde02bab8 100644
--- a/src/backend/utils/misc/gen_guc_tables.pl
+++ b/src/backend/utils/misc/gen_guc_tables.pl
@@ -25,10 +25,7 @@
open my $ofh, '>', $output_fname or die;
print_boilerplate($ofh, $output_fname, 'GUC tables');
-foreach my $type (qw(bool int real string enum))
-{
- print_one_table($ofh, $type);
-}
+print_table($ofh);
close $ofh;
@@ -41,56 +38,52 @@ sub dquote
return q{"} . $s =~ s/"/\\"/gr . q{"};
}
-# Print GUC table for one type.
-sub print_one_table
+# Print GUC table.
+sub print_table
{
- my ($ofh, $type) = @_;
- my $Type = ucfirst $type;
+ my ($ofh) = @_;
print $ofh "\n\n";
- print $ofh "struct config_${type} ConfigureNames${Type}[] =\n";
+ print $ofh "struct config_generic ConfigureNames[] =\n";
print $ofh "{\n";
foreach my $entry (@{$parse})
{
- next if $entry->{type} ne $type;
-
print $ofh "#ifdef $entry->{ifdef}\n" if $entry->{ifdef};
print $ofh "\t{\n";
- print $ofh "\t\t{\n";
- printf $ofh "\t\t\t.name = %s,\n", dquote($entry->{name});
- printf $ofh "\t\t\t.context = %s,\n", $entry->{context};
- printf $ofh "\t\t\t.group = %s,\n", $entry->{group};
- printf $ofh "\t\t\t.short_desc = gettext_noop(%s),\n",
+ printf $ofh "\t\t.name = %s,\n", dquote($entry->{name});
+ printf $ofh "\t\t.context = %s,\n", $entry->{context};
+ printf $ofh "\t\t.group = %s,\n", $entry->{group};
+ printf $ofh "\t\t.short_desc = gettext_noop(%s),\n",
dquote($entry->{short_desc});
- printf $ofh "\t\t\t.long_desc = gettext_noop(%s),\n",
+ printf $ofh "\t\t.long_desc = gettext_noop(%s),\n",
dquote($entry->{long_desc})
if $entry->{long_desc};
- printf $ofh "\t\t\t.flags = %s,\n", $entry->{flags}
- if $entry->{flags};
- printf $ofh "\t\t\t.vartype = %s,\n", ('PGC_' . uc($type));
- print $ofh "\t\t},\n";
- printf $ofh "\t\t.variable = &%s,\n", $entry->{variable};
- printf $ofh "\t\t.boot_val = %s,\n", $entry->{boot_val};
- printf $ofh "\t\t.min = %s,\n", $entry->{min}
+ printf $ofh "\t\t.flags = %s,\n", $entry->{flags} if $entry->{flags};
+ printf $ofh "\t\t.vartype = %s,\n", ('PGC_' . uc($entry->{type}));
+ printf $ofh "\t\t._%s = {\n", $entry->{type};
+ printf $ofh "\t\t\t.variable = &%s,\n", $entry->{variable};
+ printf $ofh "\t\t\t.boot_val = %s,\n", $entry->{boot_val};
+ printf $ofh "\t\t\t.min = %s,\n", $entry->{min}
if $entry->{type} eq 'int' || $entry->{type} eq 'real';
- printf $ofh "\t\t.max = %s,\n", $entry->{max}
+ printf $ofh "\t\t\t.max = %s,\n", $entry->{max}
if $entry->{type} eq 'int' || $entry->{type} eq 'real';
- printf $ofh "\t\t.options = %s,\n", $entry->{options}
+ printf $ofh "\t\t\t.options = %s,\n", $entry->{options}
if $entry->{type} eq 'enum';
- printf $ofh "\t\t.check_hook = %s,\n", $entry->{check_hook}
+ printf $ofh "\t\t\t.check_hook = %s,\n", $entry->{check_hook}
if $entry->{check_hook};
- printf $ofh "\t\t.assign_hook = %s,\n", $entry->{assign_hook}
+ printf $ofh "\t\t\t.assign_hook = %s,\n", $entry->{assign_hook}
if $entry->{assign_hook};
- printf $ofh "\t\t.show_hook = %s,\n", $entry->{show_hook}
+ printf $ofh "\t\t\t.show_hook = %s,\n", $entry->{show_hook}
if $entry->{show_hook};
+ print $ofh "\t\t},\n";
print $ofh "\t},\n";
print $ofh "#endif\n" if $entry->{ifdef};
print $ofh "\n";
}
print $ofh "\t/* End-of-list marker */\n";
- print $ofh "\t{{0}}\n";
+ print $ofh "\t{0}\n";
print $ofh "};\n";
return;
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index a82286cc98a..679846da42c 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -245,12 +245,12 @@ static void ReportGUCOption(struct config_generic *record);
static void set_config_sourcefile(const char *name, char *sourcefile,
int sourceline);
static void reapply_stacked_values(struct config_generic *variable,
- struct config_string *pHolder,
+ struct config_generic *pHolder,
GucStack *stack,
const char *curvalue,
GucContext curscontext, GucSource cursource,
Oid cursrole);
-static void free_placeholder(struct config_string *pHolder);
+static void free_placeholder(struct config_generic *pHolder);
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);
@@ -261,15 +261,15 @@ static bool assignable_custom_variable_name(const char *name, bool skip_errors,
int elevel);
static void do_serialize(char **destptr, Size *maxbytes,
const char *fmt,...) pg_attribute_printf(3, 4);
-static bool call_bool_check_hook(const struct config_bool *conf, bool *newval,
+static bool call_bool_check_hook(const struct config_generic *conf, bool *newval,
void **extra, GucSource source, int elevel);
-static bool call_int_check_hook(const struct config_int *conf, int *newval,
+static bool call_int_check_hook(const struct config_generic *conf, int *newval,
void **extra, GucSource source, int elevel);
-static bool call_real_check_hook(const struct config_real *conf, double *newval,
+static bool call_real_check_hook(const struct config_generic *conf, double *newval,
void **extra, GucSource source, int elevel);
-static bool call_string_check_hook(const struct config_string *conf, char **newval,
+static bool call_string_check_hook(const struct config_generic *conf, char **newval,
void **extra, GucSource source, int elevel);
-static bool call_enum_check_hook(const struct config_enum *conf, int *newval,
+static bool call_enum_check_hook(const struct config_generic *conf, int *newval,
void **extra, GucSource source, int elevel);
@@ -703,13 +703,13 @@ guc_free(void *ptr)
* Detect whether strval is referenced anywhere in a GUC string item
*/
static bool
-string_field_used(struct config_string *conf, char *strval)
+string_field_used(struct config_generic *conf, char *strval)
{
- if (strval == *(conf->variable) ||
- strval == conf->reset_val ||
- strval == conf->boot_val)
+ if (strval == *(conf->_string.variable) ||
+ strval == conf->_string.reset_val ||
+ strval == conf->_string.boot_val)
return true;
- for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = conf->stack; stack; stack = stack->prev)
{
if (strval == stack->prior.val.stringval ||
strval == stack->masked.val.stringval)
@@ -724,7 +724,7 @@ string_field_used(struct config_string *conf, char *strval)
* states).
*/
static void
-set_string_field(struct config_string *conf, char **field, char *newval)
+set_string_field(struct config_generic *conf, char **field, char *newval)
{
char *oldval = *field;
@@ -787,25 +787,19 @@ set_stack_value(struct config_generic *gconf, config_var_value *val)
switch (gconf->vartype)
{
case PGC_BOOL:
- val->val.boolval =
- *((struct config_bool *) gconf)->variable;
+ val->val.boolval = *gconf->_bool.variable;
break;
case PGC_INT:
- val->val.intval =
- *((struct config_int *) gconf)->variable;
+ val->val.intval = *gconf->_int.variable;
break;
case PGC_REAL:
- val->val.realval =
- *((struct config_real *) gconf)->variable;
+ val->val.realval = *gconf->_real.variable;
break;
case PGC_STRING:
- set_string_field((struct config_string *) gconf,
- &(val->val.stringval),
- *((struct config_string *) gconf)->variable);
+ set_string_field(gconf, &(val->val.stringval), *gconf->_string.variable);
break;
case PGC_ENUM:
- val->val.enumval =
- *((struct config_enum *) gconf)->variable;
+ val->val.enumval = *gconf->_enum.variable;
break;
}
set_extra_field(gconf, &(val->extra), gconf->extra);
@@ -827,7 +821,7 @@ discard_stack_value(struct config_generic *gconf, config_var_value *val)
/* no need to do anything */
break;
case PGC_STRING:
- set_string_field((struct config_string *) gconf,
+ set_string_field(gconf,
&(val->val.stringval),
NULL);
break;
@@ -892,19 +886,7 @@ build_guc_variables(void)
/*
* Count all the built-in variables.
*/
- for (int i = 0; ConfigureNamesBool[i].gen.name; i++)
- num_vars++;
-
- for (int i = 0; ConfigureNamesInt[i].gen.name; i++)
- num_vars++;
-
- for (int i = 0; ConfigureNamesReal[i].gen.name; i++)
- num_vars++;
-
- for (int i = 0; ConfigureNamesString[i].gen.name; i++)
- num_vars++;
-
- for (int i = 0; ConfigureNamesEnum[i].gen.name; i++)
+ for (int i = 0; ConfigureNames[i].name; i++)
num_vars++;
/*
@@ -922,57 +904,9 @@ build_guc_variables(void)
&hash_ctl,
HASH_ELEM | HASH_FUNCTION | HASH_COMPARE | HASH_CONTEXT);
- for (int i = 0; ConfigureNamesBool[i].gen.name; i++)
- {
- struct config_generic *gucvar = &ConfigureNamesBool[i].gen;
-
- hentry = (GUCHashEntry *) hash_search(guc_hashtab,
- &gucvar->name,
- HASH_ENTER,
- &found);
- Assert(!found);
- hentry->gucvar = gucvar;
- }
-
- for (int i = 0; ConfigureNamesInt[i].gen.name; i++)
- {
- struct config_generic *gucvar = &ConfigureNamesInt[i].gen;
-
- hentry = (GUCHashEntry *) hash_search(guc_hashtab,
- &gucvar->name,
- HASH_ENTER,
- &found);
- Assert(!found);
- hentry->gucvar = gucvar;
- }
-
- for (int i = 0; ConfigureNamesReal[i].gen.name; i++)
- {
- struct config_generic *gucvar = &ConfigureNamesReal[i].gen;
-
- hentry = (GUCHashEntry *) hash_search(guc_hashtab,
- &gucvar->name,
- HASH_ENTER,
- &found);
- Assert(!found);
- hentry->gucvar = gucvar;
- }
-
- for (int i = 0; ConfigureNamesString[i].gen.name; i++)
- {
- struct config_generic *gucvar = &ConfigureNamesString[i].gen;
-
- hentry = (GUCHashEntry *) hash_search(guc_hashtab,
- &gucvar->name,
- HASH_ENTER,
- &found);
- Assert(!found);
- hentry->gucvar = gucvar;
- }
-
- for (int i = 0; ConfigureNamesEnum[i].gen.name; i++)
+ for (int i = 0; ConfigureNames[i].name; i++)
{
- struct config_generic *gucvar = &ConfigureNamesEnum[i].gen;
+ struct config_generic *gucvar = &ConfigureNames[i];
hentry = (GUCHashEntry *) hash_search(guc_hashtab,
&gucvar->name,
@@ -1122,44 +1056,42 @@ assignable_custom_variable_name(const char *name, bool skip_errors, int elevel)
static struct config_generic *
add_placeholder_variable(const char *name, int elevel)
{
- size_t sz = sizeof(struct config_string) + sizeof(char *);
- struct config_string *var;
- struct config_generic *gen;
+ size_t sz = sizeof(struct config_generic) + sizeof(char *);
+ struct config_generic *var;
- var = (struct config_string *) guc_malloc(elevel, sz);
+ var = (struct config_generic *) guc_malloc(elevel, sz);
if (var == NULL)
return NULL;
memset(var, 0, sz);
- gen = &var->gen;
- gen->name = guc_strdup(elevel, name);
- if (gen->name == NULL)
+ var->name = guc_strdup(elevel, name);
+ if (var->name == NULL)
{
guc_free(var);
return NULL;
}
- gen->context = PGC_USERSET;
- gen->group = CUSTOM_OPTIONS;
- gen->short_desc = "GUC placeholder variable";
- gen->flags = GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_CUSTOM_PLACEHOLDER;
- gen->vartype = PGC_STRING;
+ var->context = PGC_USERSET;
+ var->group = CUSTOM_OPTIONS;
+ var->short_desc = "GUC placeholder variable";
+ var->flags = GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_CUSTOM_PLACEHOLDER;
+ var->vartype = PGC_STRING;
/*
* The char* is allocated at the end of the struct since we have no
* 'static' place to point to. Note that the current value, as well as
* the boot and reset values, start out NULL.
*/
- var->variable = (char **) (var + 1);
+ var->_string.variable = (char **) (var + 1);
- if (!add_guc_variable((struct config_generic *) var, elevel))
+ if (!add_guc_variable(var, elevel))
{
- guc_free(unconstify(char *, gen->name));
+ guc_free(unconstify(char *, var->name));
guc_free(var);
return NULL;
}
- return gen;
+ return var;
}
/*
@@ -1385,62 +1317,62 @@ check_GUC_init(const struct config_generic *gconf)
{
case PGC_BOOL:
{
- const struct config_bool *conf = (const struct config_bool *) gconf;
+ const struct config_bool *conf = &gconf->_bool;
if (*conf->variable && !conf->boot_val)
{
elog(LOG, "GUC (PGC_BOOL) %s, boot_val=%d, C-var=%d",
- conf->gen.name, conf->boot_val, *conf->variable);
+ gconf->name, conf->boot_val, *conf->variable);
return false;
}
break;
}
case PGC_INT:
{
- const struct config_int *conf = (const struct config_int *) gconf;
+ const struct config_int *conf = &gconf->_int;
if (*conf->variable != 0 && *conf->variable != conf->boot_val)
{
elog(LOG, "GUC (PGC_INT) %s, boot_val=%d, C-var=%d",
- conf->gen.name, conf->boot_val, *conf->variable);
+ gconf->name, conf->boot_val, *conf->variable);
return false;
}
break;
}
case PGC_REAL:
{
- const struct config_real *conf = (const struct config_real *) gconf;
+ const struct config_real *conf = &gconf->_real;
if (*conf->variable != 0.0 && *conf->variable != conf->boot_val)
{
elog(LOG, "GUC (PGC_REAL) %s, boot_val=%g, C-var=%g",
- conf->gen.name, conf->boot_val, *conf->variable);
+ gconf->name, conf->boot_val, *conf->variable);
return false;
}
break;
}
case PGC_STRING:
{
- const struct config_string *conf = (const struct config_string *) gconf;
+ const struct config_string *conf = &gconf->_string;
if (*conf->variable != NULL &&
(conf->boot_val == NULL ||
strcmp(*conf->variable, conf->boot_val) != 0))
{
elog(LOG, "GUC (PGC_STRING) %s, boot_val=%s, C-var=%s",
- conf->gen.name, conf->boot_val ? conf->boot_val : "<null>", *conf->variable);
+ gconf->name, conf->boot_val ? conf->boot_val : "<null>", *conf->variable);
return false;
}
break;
}
case PGC_ENUM:
{
- const struct config_enum *conf = (const struct config_enum *) gconf;
+ const struct config_enum *conf = &gconf->_enum;
if (*conf->variable != conf->boot_val)
{
elog(LOG, "GUC (PGC_ENUM) %s, boot_val=%d, C-var=%d",
- conf->gen.name, conf->boot_val, *conf->variable);
+ gconf->name, conf->boot_val, *conf->variable);
return false;
}
break;
@@ -1607,13 +1539,13 @@ InitializeOneGUCOption(struct config_generic *gconf)
{
case PGC_BOOL:
{
- struct config_bool *conf = (struct config_bool *) gconf;
+ struct config_bool *conf = &gconf->_bool;
bool newval = conf->boot_val;
- if (!call_bool_check_hook(conf, &newval, &extra,
+ if (!call_bool_check_hook(gconf, &newval, &extra,
PGC_S_DEFAULT, LOG))
elog(FATAL, "failed to initialize %s to %d",
- conf->gen.name, (int) newval);
+ gconf->name, (int) newval);
if (conf->assign_hook)
conf->assign_hook(newval, extra);
*conf->variable = conf->reset_val = newval;
@@ -1621,15 +1553,15 @@ InitializeOneGUCOption(struct config_generic *gconf)
}
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) gconf;
+ struct config_int *conf = &gconf->_int;
int newval = conf->boot_val;
Assert(newval >= conf->min);
Assert(newval <= conf->max);
- if (!call_int_check_hook(conf, &newval, &extra,
+ if (!call_int_check_hook(gconf, &newval, &extra,
PGC_S_DEFAULT, LOG))
elog(FATAL, "failed to initialize %s to %d",
- conf->gen.name, newval);
+ gconf->name, newval);
if (conf->assign_hook)
conf->assign_hook(newval, extra);
*conf->variable = conf->reset_val = newval;
@@ -1637,15 +1569,15 @@ InitializeOneGUCOption(struct config_generic *gconf)
}
case PGC_REAL:
{
- struct config_real *conf = (struct config_real *) gconf;
+ struct config_real *conf = &gconf->_real;
double newval = conf->boot_val;
Assert(newval >= conf->min);
Assert(newval <= conf->max);
- if (!call_real_check_hook(conf, &newval, &extra,
+ if (!call_real_check_hook(gconf, &newval, &extra,
PGC_S_DEFAULT, LOG))
elog(FATAL, "failed to initialize %s to %g",
- conf->gen.name, newval);
+ gconf->name, newval);
if (conf->assign_hook)
conf->assign_hook(newval, extra);
*conf->variable = conf->reset_val = newval;
@@ -1653,7 +1585,7 @@ InitializeOneGUCOption(struct config_generic *gconf)
}
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) gconf;
+ struct config_string *conf = &gconf->_string;
char *newval;
/* non-NULL boot_val must always get strdup'd */
@@ -1662,10 +1594,10 @@ InitializeOneGUCOption(struct config_generic *gconf)
else
newval = NULL;
- if (!call_string_check_hook(conf, &newval, &extra,
+ if (!call_string_check_hook(gconf, &newval, &extra,
PGC_S_DEFAULT, LOG))
elog(FATAL, "failed to initialize %s to \"%s\"",
- conf->gen.name, newval ? newval : "");
+ gconf->name, newval ? newval : "");
if (conf->assign_hook)
conf->assign_hook(newval, extra);
*conf->variable = conf->reset_val = newval;
@@ -1673,13 +1605,13 @@ InitializeOneGUCOption(struct config_generic *gconf)
}
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) gconf;
+ struct config_enum *conf = &gconf->_enum;
int newval = conf->boot_val;
- if (!call_enum_check_hook(conf, &newval, &extra,
+ if (!call_enum_check_hook(gconf, &newval, &extra,
PGC_S_DEFAULT, LOG))
elog(FATAL, "failed to initialize %s to %d",
- conf->gen.name, newval);
+ gconf->name, newval);
if (conf->assign_hook)
conf->assign_hook(newval, extra);
*conf->variable = conf->reset_val = newval;
@@ -1726,7 +1658,7 @@ SelectConfigFiles(const char *userDoption, const char *progname)
char *fname;
bool fname_is_malloced;
struct stat stat_buf;
- struct config_string *data_directory_rec;
+ struct config_generic *data_directory_rec;
/* configdir is -D option, or $PGDATA if no -D */
if (userDoption)
@@ -1806,10 +1738,10 @@ SelectConfigFiles(const char *userDoption, const char *progname)
* Note: SetDataDir will copy and absolute-ize its argument, so we don't
* have to.
*/
- data_directory_rec = (struct config_string *)
+ data_directory_rec =
find_option("data_directory", false, false, PANIC);
- if (*data_directory_rec->variable)
- SetDataDir(*data_directory_rec->variable);
+ if (*data_directory_rec->_string.variable)
+ SetDataDir(*data_directory_rec->_string.variable);
else if (configdir)
SetDataDir(configdir);
else
@@ -1971,62 +1903,62 @@ ResetAllOptions(void)
{
case PGC_BOOL:
{
- struct config_bool *conf = (struct config_bool *) gconf;
+ struct config_bool *conf = &gconf->_bool;
if (conf->assign_hook)
conf->assign_hook(conf->reset_val,
- conf->gen.reset_extra);
+ gconf->reset_extra);
*conf->variable = conf->reset_val;
- set_extra_field(&conf->gen, &conf->gen.extra,
- conf->gen.reset_extra);
+ set_extra_field(gconf, &gconf->extra,
+ gconf->reset_extra);
break;
}
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) gconf;
+ struct config_int *conf = &gconf->_int;
if (conf->assign_hook)
conf->assign_hook(conf->reset_val,
- conf->gen.reset_extra);
+ gconf->reset_extra);
*conf->variable = conf->reset_val;
- set_extra_field(&conf->gen, &conf->gen.extra,
- conf->gen.reset_extra);
+ set_extra_field(gconf, &gconf->extra,
+ gconf->reset_extra);
break;
}
case PGC_REAL:
{
- struct config_real *conf = (struct config_real *) gconf;
+ struct config_real *conf = &gconf->_real;
if (conf->assign_hook)
conf->assign_hook(conf->reset_val,
- conf->gen.reset_extra);
+ gconf->reset_extra);
*conf->variable = conf->reset_val;
- set_extra_field(&conf->gen, &conf->gen.extra,
- conf->gen.reset_extra);
+ set_extra_field(gconf, &gconf->extra,
+ gconf->reset_extra);
break;
}
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) gconf;
+ struct config_string *conf = &gconf->_string;
if (conf->assign_hook)
conf->assign_hook(conf->reset_val,
- conf->gen.reset_extra);
- set_string_field(conf, conf->variable, conf->reset_val);
- set_extra_field(&conf->gen, &conf->gen.extra,
- conf->gen.reset_extra);
+ gconf->reset_extra);
+ set_string_field(gconf, conf->variable, conf->reset_val);
+ set_extra_field(gconf, &gconf->extra,
+ gconf->reset_extra);
break;
}
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) gconf;
+ struct config_enum *conf = &gconf->_enum;
if (conf->assign_hook)
conf->assign_hook(conf->reset_val,
- conf->gen.reset_extra);
+ gconf->reset_extra);
*conf->variable = conf->reset_val;
- set_extra_field(&conf->gen, &conf->gen.extra,
- conf->gen.reset_extra);
+ set_extra_field(gconf, &gconf->extra,
+ gconf->reset_extra);
break;
}
}
@@ -2346,17 +2278,17 @@ AtEOXact_GUC(bool isCommit, int nestLevel)
{
case PGC_BOOL:
{
- struct config_bool *conf = (struct config_bool *) gconf;
+ struct config_bool *conf = &gconf->_bool;
bool newval = newvalue.val.boolval;
void *newextra = newvalue.extra;
if (*conf->variable != newval ||
- conf->gen.extra != newextra)
+ gconf->extra != newextra)
{
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
*conf->variable = newval;
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_extra_field(gconf, &gconf->extra,
newextra);
changed = true;
}
@@ -2364,17 +2296,17 @@ AtEOXact_GUC(bool isCommit, int nestLevel)
}
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) gconf;
+ struct config_int *conf = &gconf->_int;
int newval = newvalue.val.intval;
void *newextra = newvalue.extra;
if (*conf->variable != newval ||
- conf->gen.extra != newextra)
+ gconf->extra != newextra)
{
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
*conf->variable = newval;
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_extra_field(gconf, &gconf->extra,
newextra);
changed = true;
}
@@ -2382,17 +2314,17 @@ AtEOXact_GUC(bool isCommit, int nestLevel)
}
case PGC_REAL:
{
- struct config_real *conf = (struct config_real *) gconf;
+ struct config_real *conf = &gconf->_real;
double newval = newvalue.val.realval;
void *newextra = newvalue.extra;
if (*conf->variable != newval ||
- conf->gen.extra != newextra)
+ gconf->extra != newextra)
{
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
*conf->variable = newval;
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_extra_field(gconf, &gconf->extra,
newextra);
changed = true;
}
@@ -2400,17 +2332,17 @@ AtEOXact_GUC(bool isCommit, int nestLevel)
}
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) gconf;
+ struct config_string *conf = &gconf->_string;
char *newval = newvalue.val.stringval;
void *newextra = newvalue.extra;
if (*conf->variable != newval ||
- conf->gen.extra != newextra)
+ gconf->extra != newextra)
{
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
- set_string_field(conf, conf->variable, newval);
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_string_field(gconf, conf->variable, newval);
+ set_extra_field(gconf, &gconf->extra,
newextra);
changed = true;
}
@@ -2421,23 +2353,23 @@ AtEOXact_GUC(bool isCommit, int nestLevel)
* we have type-specific code anyway, might as
* well inline it.
*/
- set_string_field(conf, &stack->prior.val.stringval, NULL);
- set_string_field(conf, &stack->masked.val.stringval, NULL);
+ set_string_field(gconf, &stack->prior.val.stringval, NULL);
+ set_string_field(gconf, &stack->masked.val.stringval, NULL);
break;
}
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) gconf;
+ struct config_enum *conf = &gconf->_enum;
int newval = newvalue.val.enumval;
void *newextra = newvalue.extra;
if (*conf->variable != newval ||
- conf->gen.extra != newextra)
+ gconf->extra != newextra)
{
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
*conf->variable = newval;
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_extra_field(gconf, &gconf->extra,
newextra);
changed = true;
}
@@ -2960,16 +2892,16 @@ parse_real(const char *value, double *result, int flags, const char **hintmsg)
* allocated for modification.
*/
const char *
-config_enum_lookup_by_value(const struct config_enum *record, int val)
+config_enum_lookup_by_value(const struct config_generic *record, int val)
{
- for (const struct config_enum_entry *entry = record->options; entry && entry->name; entry++)
+ for (const struct config_enum_entry *entry = record->_enum.options; entry && entry->name; entry++)
{
if (entry->val == val)
return entry->name;
}
elog(ERROR, "could not find enum option %d for %s",
- val, record->gen.name);
+ val, record->name);
return NULL; /* silence compiler */
}
@@ -3070,41 +3002,39 @@ parse_and_validate_value(const struct config_generic *record,
{
case PGC_BOOL:
{
- const struct config_bool *conf = (const struct config_bool *) record;
-
if (!parse_bool(value, &newval->boolval))
{
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("parameter \"%s\" requires a Boolean value",
- conf->gen.name)));
+ record->name)));
return false;
}
- if (!call_bool_check_hook(conf, &newval->boolval, newextra,
+ if (!call_bool_check_hook(record, &newval->boolval, newextra,
source, elevel))
return false;
}
break;
case PGC_INT:
{
- const struct config_int *conf = (const struct config_int *) record;
+ const struct config_int *conf = &record->_int;
const char *hintmsg;
if (!parse_int(value, &newval->intval,
- conf->gen.flags, &hintmsg))
+ record->flags, &hintmsg))
{
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid value for parameter \"%s\": \"%s\"",
- conf->gen.name, value),
+ record->name, value),
hintmsg ? errhint("%s", _(hintmsg)) : 0));
return false;
}
if (newval->intval < conf->min || newval->intval > conf->max)
{
- const char *unit = get_config_unit_name(conf->gen.flags);
+ const char *unit = get_config_unit_name(record->flags);
const char *unitspace;
if (unit)
@@ -3116,36 +3046,36 @@ parse_and_validate_value(const struct config_generic *record,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("%d%s%s is outside the valid range for parameter \"%s\" (%d%s%s .. %d%s%s)",
newval->intval, unitspace, unit,
- conf->gen.name,
+ record->name,
conf->min, unitspace, unit,
conf->max, unitspace, unit)));
return false;
}
- if (!call_int_check_hook(conf, &newval->intval, newextra,
+ if (!call_int_check_hook(record, &newval->intval, newextra,
source, elevel))
return false;
}
break;
case PGC_REAL:
{
- const struct config_real *conf = (const struct config_real *) record;
+ const struct config_real *conf = &record->_real;
const char *hintmsg;
if (!parse_real(value, &newval->realval,
- conf->gen.flags, &hintmsg))
+ record->flags, &hintmsg))
{
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid value for parameter \"%s\": \"%s\"",
- conf->gen.name, value),
+ record->name, value),
hintmsg ? errhint("%s", _(hintmsg)) : 0));
return false;
}
if (newval->realval < conf->min || newval->realval > conf->max)
{
- const char *unit = get_config_unit_name(conf->gen.flags);
+ const char *unit = get_config_unit_name(record->flags);
const char *unitspace;
if (unit)
@@ -3157,21 +3087,19 @@ parse_and_validate_value(const struct config_generic *record,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("%g%s%s is outside the valid range for parameter \"%s\" (%g%s%s .. %g%s%s)",
newval->realval, unitspace, unit,
- conf->gen.name,
+ record->name,
conf->min, unitspace, unit,
conf->max, unitspace, unit)));
return false;
}
- if (!call_real_check_hook(conf, &newval->realval, newextra,
+ if (!call_real_check_hook(record, &newval->realval, newextra,
source, elevel))
return false;
}
break;
case PGC_STRING:
{
- const struct config_string *conf = (const struct config_string *) record;
-
/*
* The value passed by the caller could be transient, so we
* always strdup it.
@@ -3184,12 +3112,12 @@ parse_and_validate_value(const struct config_generic *record,
* The only built-in "parsing" check we have is to apply
* truncation if GUC_IS_NAME.
*/
- if (conf->gen.flags & GUC_IS_NAME)
+ if (record->flags & GUC_IS_NAME)
truncate_identifier(newval->stringval,
strlen(newval->stringval),
true);
- if (!call_string_check_hook(conf, &newval->stringval, newextra,
+ if (!call_string_check_hook(record, &newval->stringval, newextra,
source, elevel))
{
guc_free(newval->stringval);
@@ -3200,7 +3128,7 @@ parse_and_validate_value(const struct config_generic *record,
break;
case PGC_ENUM:
{
- const struct config_enum *conf = (const struct config_enum *) record;
+ const struct config_enum *conf = &record->_enum;
if (!config_enum_lookup_by_name(conf, value, &newval->enumval))
{
@@ -3213,7 +3141,7 @@ parse_and_validate_value(const struct config_generic *record,
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid value for parameter \"%s\": \"%s\"",
- conf->gen.name, value),
+ record->name, value),
hintmsg ? errhint("%s", _(hintmsg)) : 0));
if (hintmsg)
@@ -3221,7 +3149,7 @@ parse_and_validate_value(const struct config_generic *record,
return false;
}
- if (!call_enum_check_hook(conf, &newval->enumval, newextra,
+ if (!call_enum_check_hook(record, &newval->enumval, newextra,
source, elevel))
return false;
}
@@ -3639,7 +3567,7 @@ set_config_with_handle(const char *name, config_handle *handle,
{
case PGC_BOOL:
{
- struct config_bool *conf = (struct config_bool *) record;
+ struct config_bool *conf = &record->_bool;
#define newval (newval_union.boolval)
@@ -3653,23 +3581,23 @@ set_config_with_handle(const char *name, config_handle *handle,
else if (source == PGC_S_DEFAULT)
{
newval = conf->boot_val;
- if (!call_bool_check_hook(conf, &newval, &newextra,
+ if (!call_bool_check_hook(record, &newval, &newextra,
source, elevel))
return 0;
}
else
{
newval = conf->reset_val;
- newextra = conf->gen.reset_extra;
- source = conf->gen.reset_source;
- context = conf->gen.reset_scontext;
- srole = conf->gen.reset_srole;
+ newextra = record->reset_extra;
+ source = record->reset_source;
+ context = record->reset_scontext;
+ srole = record->reset_srole;
}
if (prohibitValueChange)
{
/* Release newextra, unless it's reset_extra */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
if (*conf->variable != newval)
@@ -3678,7 +3606,7 @@ set_config_with_handle(const char *name, config_handle *handle,
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
errmsg("parameter \"%s\" cannot be changed without restarting the server",
- conf->gen.name)));
+ record->name)));
return 0;
}
record->status &= ~GUC_PENDING_RESTART;
@@ -3689,34 +3617,34 @@ set_config_with_handle(const char *name, config_handle *handle,
{
/* Save old value to support transaction abort */
if (!makeDefault)
- push_old_value(&conf->gen, action);
+ push_old_value(record, action);
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
*conf->variable = newval;
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_extra_field(record, &record->extra,
newextra);
- set_guc_source(&conf->gen, source);
- conf->gen.scontext = context;
- conf->gen.srole = srole;
+ set_guc_source(record, source);
+ record->scontext = context;
+ record->srole = srole;
}
if (makeDefault)
{
- if (conf->gen.reset_source <= source)
+ if (record->reset_source <= source)
{
conf->reset_val = newval;
- set_extra_field(&conf->gen, &conf->gen.reset_extra,
+ set_extra_field(record, &record->reset_extra,
newextra);
- conf->gen.reset_source = source;
- conf->gen.reset_scontext = context;
- conf->gen.reset_srole = srole;
+ record->reset_source = source;
+ record->reset_scontext = context;
+ record->reset_srole = srole;
}
- for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = record->stack; stack; stack = stack->prev)
{
if (stack->source <= source)
{
stack->prior.val.boolval = newval;
- set_extra_field(&conf->gen, &stack->prior.extra,
+ set_extra_field(record, &stack->prior.extra,
newextra);
stack->source = source;
stack->scontext = context;
@@ -3726,7 +3654,7 @@ set_config_with_handle(const char *name, config_handle *handle,
}
/* Perhaps we didn't install newextra anywhere */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
break;
@@ -3735,7 +3663,7 @@ set_config_with_handle(const char *name, config_handle *handle,
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) record;
+ struct config_int *conf = &record->_int;
#define newval (newval_union.intval)
@@ -3749,23 +3677,23 @@ set_config_with_handle(const char *name, config_handle *handle,
else if (source == PGC_S_DEFAULT)
{
newval = conf->boot_val;
- if (!call_int_check_hook(conf, &newval, &newextra,
+ if (!call_int_check_hook(record, &newval, &newextra,
source, elevel))
return 0;
}
else
{
newval = conf->reset_val;
- newextra = conf->gen.reset_extra;
- source = conf->gen.reset_source;
- context = conf->gen.reset_scontext;
- srole = conf->gen.reset_srole;
+ newextra = record->reset_extra;
+ source = record->reset_source;
+ context = record->reset_scontext;
+ srole = record->reset_srole;
}
if (prohibitValueChange)
{
/* Release newextra, unless it's reset_extra */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
if (*conf->variable != newval)
@@ -3774,7 +3702,7 @@ set_config_with_handle(const char *name, config_handle *handle,
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
errmsg("parameter \"%s\" cannot be changed without restarting the server",
- conf->gen.name)));
+ record->name)));
return 0;
}
record->status &= ~GUC_PENDING_RESTART;
@@ -3785,34 +3713,34 @@ set_config_with_handle(const char *name, config_handle *handle,
{
/* Save old value to support transaction abort */
if (!makeDefault)
- push_old_value(&conf->gen, action);
+ push_old_value(record, action);
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
*conf->variable = newval;
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_extra_field(record, &record->extra,
newextra);
- set_guc_source(&conf->gen, source);
- conf->gen.scontext = context;
- conf->gen.srole = srole;
+ set_guc_source(record, source);
+ record->scontext = context;
+ record->srole = srole;
}
if (makeDefault)
{
- if (conf->gen.reset_source <= source)
+ if (record->reset_source <= source)
{
conf->reset_val = newval;
- set_extra_field(&conf->gen, &conf->gen.reset_extra,
+ set_extra_field(record, &record->reset_extra,
newextra);
- conf->gen.reset_source = source;
- conf->gen.reset_scontext = context;
- conf->gen.reset_srole = srole;
+ record->reset_source = source;
+ record->reset_scontext = context;
+ record->reset_srole = srole;
}
- for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = record->stack; stack; stack = stack->prev)
{
if (stack->source <= source)
{
stack->prior.val.intval = newval;
- set_extra_field(&conf->gen, &stack->prior.extra,
+ set_extra_field(record, &stack->prior.extra,
newextra);
stack->source = source;
stack->scontext = context;
@@ -3822,7 +3750,7 @@ set_config_with_handle(const char *name, config_handle *handle,
}
/* Perhaps we didn't install newextra anywhere */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
break;
@@ -3831,7 +3759,7 @@ set_config_with_handle(const char *name, config_handle *handle,
case PGC_REAL:
{
- struct config_real *conf = (struct config_real *) record;
+ struct config_real *conf = &record->_real;
#define newval (newval_union.realval)
@@ -3845,23 +3773,23 @@ set_config_with_handle(const char *name, config_handle *handle,
else if (source == PGC_S_DEFAULT)
{
newval = conf->boot_val;
- if (!call_real_check_hook(conf, &newval, &newextra,
+ if (!call_real_check_hook(record, &newval, &newextra,
source, elevel))
return 0;
}
else
{
newval = conf->reset_val;
- newextra = conf->gen.reset_extra;
- source = conf->gen.reset_source;
- context = conf->gen.reset_scontext;
- srole = conf->gen.reset_srole;
+ newextra = record->reset_extra;
+ source = record->reset_source;
+ context = record->reset_scontext;
+ srole = record->reset_srole;
}
if (prohibitValueChange)
{
/* Release newextra, unless it's reset_extra */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
if (*conf->variable != newval)
@@ -3870,7 +3798,7 @@ set_config_with_handle(const char *name, config_handle *handle,
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
errmsg("parameter \"%s\" cannot be changed without restarting the server",
- conf->gen.name)));
+ record->name)));
return 0;
}
record->status &= ~GUC_PENDING_RESTART;
@@ -3881,34 +3809,34 @@ set_config_with_handle(const char *name, config_handle *handle,
{
/* Save old value to support transaction abort */
if (!makeDefault)
- push_old_value(&conf->gen, action);
+ push_old_value(record, action);
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
*conf->variable = newval;
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_extra_field(record, &record->extra,
newextra);
- set_guc_source(&conf->gen, source);
- conf->gen.scontext = context;
- conf->gen.srole = srole;
+ set_guc_source(record, source);
+ record->scontext = context;
+ record->srole = srole;
}
if (makeDefault)
{
- if (conf->gen.reset_source <= source)
+ if (record->reset_source <= source)
{
conf->reset_val = newval;
- set_extra_field(&conf->gen, &conf->gen.reset_extra,
+ set_extra_field(record, &record->reset_extra,
newextra);
- conf->gen.reset_source = source;
- conf->gen.reset_scontext = context;
- conf->gen.reset_srole = srole;
+ record->reset_source = source;
+ record->reset_scontext = context;
+ record->reset_srole = srole;
}
- for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = record->stack; stack; stack = stack->prev)
{
if (stack->source <= source)
{
stack->prior.val.realval = newval;
- set_extra_field(&conf->gen, &stack->prior.extra,
+ set_extra_field(record, &stack->prior.extra,
newextra);
stack->source = source;
stack->scontext = context;
@@ -3918,7 +3846,7 @@ set_config_with_handle(const char *name, config_handle *handle,
}
/* Perhaps we didn't install newextra anywhere */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
break;
@@ -3927,7 +3855,7 @@ set_config_with_handle(const char *name, config_handle *handle,
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) record;
+ struct config_string *conf = &record->_string;
GucContext orig_context = context;
GucSource orig_source = source;
Oid orig_srole = srole;
@@ -3953,7 +3881,7 @@ set_config_with_handle(const char *name, config_handle *handle,
else
newval = NULL;
- if (!call_string_check_hook(conf, &newval, &newextra,
+ if (!call_string_check_hook(record, &newval, &newextra,
source, elevel))
{
guc_free(newval);
@@ -3967,10 +3895,10 @@ set_config_with_handle(const char *name, config_handle *handle,
* guc.c's control
*/
newval = conf->reset_val;
- newextra = conf->gen.reset_extra;
- source = conf->gen.reset_source;
- context = conf->gen.reset_scontext;
- srole = conf->gen.reset_srole;
+ newextra = record->reset_extra;
+ source = record->reset_source;
+ context = record->reset_scontext;
+ srole = record->reset_srole;
}
if (prohibitValueChange)
@@ -3983,10 +3911,10 @@ set_config_with_handle(const char *name, config_handle *handle,
strcmp(*conf->variable, newval) != 0);
/* Release newval, unless it's reset_val */
- if (newval && !string_field_used(conf, newval))
+ if (newval && !string_field_used(record, newval))
guc_free(newval);
/* Release newextra, unless it's reset_extra */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
if (newval_different)
@@ -3995,7 +3923,7 @@ set_config_with_handle(const char *name, config_handle *handle,
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
errmsg("parameter \"%s\" cannot be changed without restarting the server",
- conf->gen.name)));
+ record->name)));
return 0;
}
record->status &= ~GUC_PENDING_RESTART;
@@ -4006,16 +3934,16 @@ set_config_with_handle(const char *name, config_handle *handle,
{
/* Save old value to support transaction abort */
if (!makeDefault)
- push_old_value(&conf->gen, action);
+ push_old_value(record, action);
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
- set_string_field(conf, conf->variable, newval);
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_string_field(record, conf->variable, newval);
+ set_extra_field(record, &record->extra,
newextra);
- set_guc_source(&conf->gen, source);
- conf->gen.scontext = context;
- conf->gen.srole = srole;
+ set_guc_source(record, source);
+ record->scontext = context;
+ record->srole = srole;
/*
* Ugly hack: during SET session_authorization, forcibly
@@ -4042,7 +3970,7 @@ set_config_with_handle(const char *name, config_handle *handle,
* that.
*/
if (!is_reload &&
- strcmp(conf->gen.name, "session_authorization") == 0)
+ strcmp(record->name, "session_authorization") == 0)
(void) set_config_with_handle("role", NULL,
value ? "none" : NULL,
orig_context,
@@ -4058,22 +3986,22 @@ set_config_with_handle(const char *name, config_handle *handle,
if (makeDefault)
{
- if (conf->gen.reset_source <= source)
+ if (record->reset_source <= source)
{
- set_string_field(conf, &conf->reset_val, newval);
- set_extra_field(&conf->gen, &conf->gen.reset_extra,
+ set_string_field(record, &conf->reset_val, newval);
+ set_extra_field(record, &record->reset_extra,
newextra);
- conf->gen.reset_source = source;
- conf->gen.reset_scontext = context;
- conf->gen.reset_srole = srole;
+ record->reset_source = source;
+ record->reset_scontext = context;
+ record->reset_srole = srole;
}
- for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = record->stack; stack; stack = stack->prev)
{
if (stack->source <= source)
{
- set_string_field(conf, &stack->prior.val.stringval,
+ set_string_field(record, &stack->prior.val.stringval,
newval);
- set_extra_field(&conf->gen, &stack->prior.extra,
+ set_extra_field(record, &stack->prior.extra,
newextra);
stack->source = source;
stack->scontext = context;
@@ -4083,10 +4011,10 @@ set_config_with_handle(const char *name, config_handle *handle,
}
/* Perhaps we didn't install newval anywhere */
- if (newval && !string_field_used(conf, newval))
+ if (newval && !string_field_used(record, newval))
guc_free(newval);
/* Perhaps we didn't install newextra anywhere */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
break;
@@ -4095,7 +4023,7 @@ set_config_with_handle(const char *name, config_handle *handle,
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) record;
+ struct config_enum *conf = &record->_enum;
#define newval (newval_union.enumval)
@@ -4109,23 +4037,23 @@ set_config_with_handle(const char *name, config_handle *handle,
else if (source == PGC_S_DEFAULT)
{
newval = conf->boot_val;
- if (!call_enum_check_hook(conf, &newval, &newextra,
+ if (!call_enum_check_hook(record, &newval, &newextra,
source, elevel))
return 0;
}
else
{
newval = conf->reset_val;
- newextra = conf->gen.reset_extra;
- source = conf->gen.reset_source;
- context = conf->gen.reset_scontext;
- srole = conf->gen.reset_srole;
+ newextra = record->reset_extra;
+ source = record->reset_source;
+ context = record->reset_scontext;
+ srole = record->reset_srole;
}
if (prohibitValueChange)
{
/* Release newextra, unless it's reset_extra */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
if (*conf->variable != newval)
@@ -4134,7 +4062,7 @@ set_config_with_handle(const char *name, config_handle *handle,
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
errmsg("parameter \"%s\" cannot be changed without restarting the server",
- conf->gen.name)));
+ record->name)));
return 0;
}
record->status &= ~GUC_PENDING_RESTART;
@@ -4145,34 +4073,34 @@ set_config_with_handle(const char *name, config_handle *handle,
{
/* Save old value to support transaction abort */
if (!makeDefault)
- push_old_value(&conf->gen, action);
+ push_old_value(record, action);
if (conf->assign_hook)
conf->assign_hook(newval, newextra);
*conf->variable = newval;
- set_extra_field(&conf->gen, &conf->gen.extra,
+ set_extra_field(record, &record->extra,
newextra);
- set_guc_source(&conf->gen, source);
- conf->gen.scontext = context;
- conf->gen.srole = srole;
+ set_guc_source(record, source);
+ record->scontext = context;
+ record->srole = srole;
}
if (makeDefault)
{
- if (conf->gen.reset_source <= source)
+ if (record->reset_source <= source)
{
conf->reset_val = newval;
- set_extra_field(&conf->gen, &conf->gen.reset_extra,
+ set_extra_field(record, &record->reset_extra,
newextra);
- conf->gen.reset_source = source;
- conf->gen.reset_scontext = context;
- conf->gen.reset_srole = srole;
+ record->reset_source = source;
+ record->reset_scontext = context;
+ record->reset_srole = srole;
}
- for (GucStack *stack = conf->gen.stack; stack; stack = stack->prev)
+ for (GucStack *stack = record->stack; stack; stack = stack->prev)
{
if (stack->source <= source)
{
stack->prior.val.enumval = newval;
- set_extra_field(&conf->gen, &stack->prior.extra,
+ set_extra_field(record, &stack->prior.extra,
newextra);
stack->source = source;
stack->scontext = context;
@@ -4182,7 +4110,7 @@ set_config_with_handle(const char *name, config_handle *handle,
}
/* Perhaps we didn't install newextra anywhere */
- if (newextra && !extra_field_used(&conf->gen, newextra))
+ if (newextra && !extra_field_used(record, newextra))
guc_free(newextra);
break;
@@ -4296,25 +4224,25 @@ GetConfigOption(const char *name, bool missing_ok, bool restrict_privileged)
switch (record->vartype)
{
case PGC_BOOL:
- return *((struct config_bool *) record)->variable ? "on" : "off";
+ return *record->_bool.variable ? "on" : "off";
case PGC_INT:
snprintf(buffer, sizeof(buffer), "%d",
- *((struct config_int *) record)->variable);
+ *record->_int.variable);
return buffer;
case PGC_REAL:
snprintf(buffer, sizeof(buffer), "%g",
- *((struct config_real *) record)->variable);
+ *record->_real.variable);
return buffer;
case PGC_STRING:
- return *((struct config_string *) record)->variable ?
- *((struct config_string *) record)->variable : "";
+ return *record->_string.variable ?
+ *record->_string.variable : "";
case PGC_ENUM:
- return config_enum_lookup_by_value((struct config_enum *) record,
- *((struct config_enum *) record)->variable);
+ return config_enum_lookup_by_value(record,
+ *record->_enum.variable);
}
return NULL;
}
@@ -4344,25 +4272,25 @@ GetConfigOptionResetString(const char *name)
switch (record->vartype)
{
case PGC_BOOL:
- return ((struct config_bool *) record)->reset_val ? "on" : "off";
+ return record->_bool.reset_val ? "on" : "off";
case PGC_INT:
snprintf(buffer, sizeof(buffer), "%d",
- ((struct config_int *) record)->reset_val);
+ record->_int.reset_val);
return buffer;
case PGC_REAL:
snprintf(buffer, sizeof(buffer), "%g",
- ((struct config_real *) record)->reset_val);
+ record->_real.reset_val);
return buffer;
case PGC_STRING:
- return ((struct config_string *) record)->reset_val ?
- ((struct config_string *) record)->reset_val : "";
+ return record->_string.reset_val ?
+ record->_string.reset_val : "";
case PGC_ENUM:
- return config_enum_lookup_by_value((struct config_enum *) record,
- ((struct config_enum *) record)->reset_val);
+ return config_enum_lookup_by_value(record,
+ record->_enum.reset_val);
}
return NULL;
}
@@ -4802,8 +4730,7 @@ init_custom_variable(const char *name,
const char *long_desc,
GucContext context,
int flags,
- enum config_type type,
- size_t sz)
+ enum config_type type)
{
struct config_generic *gen;
@@ -4839,8 +4766,8 @@ init_custom_variable(const char *name,
context = PGC_SUSET;
/* As above, an OOM here is FATAL */
- gen = (struct config_generic *) guc_malloc(FATAL, sz);
- memset(gen, 0, sz);
+ gen = (struct config_generic *) guc_malloc(FATAL, sizeof(struct config_generic));
+ memset(gen, 0, sizeof(struct config_generic));
gen->name = guc_strdup(FATAL, name);
gen->context = context;
@@ -4862,7 +4789,7 @@ define_custom_variable(struct config_generic *variable)
{
const char *name = variable->name;
GUCHashEntry *hentry;
- struct config_string *pHolder;
+ struct config_generic *pHolder;
/* Check mapping between initial and default value */
Assert(check_GUC_init(variable));
@@ -4894,7 +4821,7 @@ define_custom_variable(struct config_generic *variable)
errmsg("attempt to redefine parameter \"%s\"", name)));
Assert(hentry->gucvar->vartype == PGC_STRING);
- pHolder = (struct config_string *) hentry->gucvar;
+ pHolder = hentry->gucvar;
/*
* First, set the variable to its default value. We must do this even
@@ -4913,7 +4840,7 @@ define_custom_variable(struct config_generic *variable)
/*
* Remove the placeholder from any lists it's in, too.
*/
- RemoveGUCFromLists(&pHolder->gen);
+ RemoveGUCFromLists(pHolder);
/*
* Assign the string value(s) stored in the placeholder to the real
@@ -4927,25 +4854,25 @@ define_custom_variable(struct config_generic *variable)
*/
/* First, apply the reset value if any */
- if (pHolder->reset_val)
- (void) set_config_option_ext(name, pHolder->reset_val,
- pHolder->gen.reset_scontext,
- pHolder->gen.reset_source,
- pHolder->gen.reset_srole,
+ if (pHolder->_string.reset_val)
+ (void) set_config_option_ext(name, pHolder->_string.reset_val,
+ pHolder->reset_scontext,
+ pHolder->reset_source,
+ pHolder->reset_srole,
GUC_ACTION_SET, true, WARNING, false);
/* That should not have resulted in stacking anything */
Assert(variable->stack == NULL);
/* Now, apply current and stacked values, in the order they were stacked */
- reapply_stacked_values(variable, pHolder, pHolder->gen.stack,
- *(pHolder->variable),
- pHolder->gen.scontext, pHolder->gen.source,
- pHolder->gen.srole);
+ reapply_stacked_values(variable, pHolder, pHolder->stack,
+ *(pHolder->_string.variable),
+ pHolder->scontext, pHolder->source,
+ pHolder->srole);
/* Also copy over any saved source-location information */
- if (pHolder->gen.sourcefile)
- set_config_sourcefile(name, pHolder->gen.sourcefile,
- pHolder->gen.sourceline);
+ if (pHolder->sourcefile)
+ set_config_sourcefile(name, pHolder->sourcefile,
+ pHolder->sourceline);
/* Now we can free the no-longer-referenced placeholder variable */
free_placeholder(pHolder);
@@ -4960,7 +4887,7 @@ define_custom_variable(struct config_generic *variable)
*/
static void
reapply_stacked_values(struct config_generic *variable,
- struct config_string *pHolder,
+ struct config_generic *pHolder,
GucStack *stack,
const char *curvalue,
GucContext curscontext, GucSource cursource,
@@ -5030,10 +4957,10 @@ reapply_stacked_values(struct config_generic *variable,
* this is to be just a transactional assignment. (We leak the stack
* entry.)
*/
- if (curvalue != pHolder->reset_val ||
- curscontext != pHolder->gen.reset_scontext ||
- cursource != pHolder->gen.reset_source ||
- cursrole != pHolder->gen.reset_srole)
+ if (curvalue != pHolder->_string.reset_val ||
+ curscontext != pHolder->reset_scontext ||
+ cursource != pHolder->reset_source ||
+ cursrole != pHolder->reset_srole)
{
(void) set_config_option_ext(name, curvalue,
curscontext, cursource, cursrole,
@@ -5055,14 +4982,14 @@ reapply_stacked_values(struct config_generic *variable,
* doesn't seem worth spending much code on.
*/
static void
-free_placeholder(struct config_string *pHolder)
+free_placeholder(struct config_generic *pHolder)
{
/* Placeholders are always STRING type, so free their values */
- Assert(pHolder->gen.vartype == PGC_STRING);
- set_string_field(pHolder, pHolder->variable, NULL);
- set_string_field(pHolder, &pHolder->reset_val, NULL);
+ Assert(pHolder->vartype == PGC_STRING);
+ set_string_field(pHolder, pHolder->_string.variable, NULL);
+ set_string_field(pHolder, &pHolder->_string.reset_val, NULL);
- guc_free(unconstify(char *, pHolder->gen.name));
+ guc_free(unconstify(char *, pHolder->name));
guc_free(pHolder);
}
@@ -5081,18 +5008,16 @@ DefineCustomBoolVariable(const char *name,
GucBoolAssignHook assign_hook,
GucShowHook show_hook)
{
- struct config_bool *var;
-
- var = (struct config_bool *)
- init_custom_variable(name, short_desc, long_desc, context, flags,
- PGC_BOOL, sizeof(struct config_bool));
- var->variable = valueAddr;
- var->boot_val = bootValue;
- var->reset_val = bootValue;
- var->check_hook = check_hook;
- var->assign_hook = assign_hook;
- var->show_hook = show_hook;
- define_custom_variable(&var->gen);
+ struct config_generic *var;
+
+ var = init_custom_variable(name, short_desc, long_desc, context, flags, PGC_BOOL);
+ var->_bool.variable = valueAddr;
+ var->_bool.boot_val = bootValue;
+ var->_bool.reset_val = bootValue;
+ var->_bool.check_hook = check_hook;
+ var->_bool.assign_hook = assign_hook;
+ var->_bool.show_hook = show_hook;
+ define_custom_variable(var);
}
void
@@ -5109,20 +5034,18 @@ DefineCustomIntVariable(const char *name,
GucIntAssignHook assign_hook,
GucShowHook show_hook)
{
- struct config_int *var;
-
- var = (struct config_int *)
- init_custom_variable(name, short_desc, long_desc, context, flags,
- PGC_INT, sizeof(struct config_int));
- var->variable = valueAddr;
- var->boot_val = bootValue;
- var->reset_val = bootValue;
- var->min = minValue;
- var->max = maxValue;
- var->check_hook = check_hook;
- var->assign_hook = assign_hook;
- var->show_hook = show_hook;
- define_custom_variable(&var->gen);
+ struct config_generic *var;
+
+ var = init_custom_variable(name, short_desc, long_desc, context, flags, PGC_INT);
+ var->_int.variable = valueAddr;
+ var->_int.boot_val = bootValue;
+ var->_int.reset_val = bootValue;
+ var->_int.min = minValue;
+ var->_int.max = maxValue;
+ var->_int.check_hook = check_hook;
+ var->_int.assign_hook = assign_hook;
+ var->_int.show_hook = show_hook;
+ define_custom_variable(var);
}
void
@@ -5139,20 +5062,18 @@ DefineCustomRealVariable(const char *name,
GucRealAssignHook assign_hook,
GucShowHook show_hook)
{
- struct config_real *var;
-
- var = (struct config_real *)
- init_custom_variable(name, short_desc, long_desc, context, flags,
- PGC_REAL, sizeof(struct config_real));
- var->variable = valueAddr;
- var->boot_val = bootValue;
- var->reset_val = bootValue;
- var->min = minValue;
- var->max = maxValue;
- var->check_hook = check_hook;
- var->assign_hook = assign_hook;
- var->show_hook = show_hook;
- define_custom_variable(&var->gen);
+ struct config_generic *var;
+
+ var = init_custom_variable(name, short_desc, long_desc, context, flags, PGC_REAL);
+ var->_real.variable = valueAddr;
+ var->_real.boot_val = bootValue;
+ var->_real.reset_val = bootValue;
+ var->_real.min = minValue;
+ var->_real.max = maxValue;
+ var->_real.check_hook = check_hook;
+ var->_real.assign_hook = assign_hook;
+ var->_real.show_hook = show_hook;
+ define_custom_variable(var);
}
void
@@ -5167,17 +5088,15 @@ DefineCustomStringVariable(const char *name,
GucStringAssignHook assign_hook,
GucShowHook show_hook)
{
- struct config_string *var;
-
- var = (struct config_string *)
- init_custom_variable(name, short_desc, long_desc, context, flags,
- PGC_STRING, sizeof(struct config_string));
- var->variable = valueAddr;
- var->boot_val = bootValue;
- var->check_hook = check_hook;
- var->assign_hook = assign_hook;
- var->show_hook = show_hook;
- define_custom_variable(&var->gen);
+ struct config_generic *var;
+
+ var = init_custom_variable(name, short_desc, long_desc, context, flags, PGC_STRING);
+ var->_string.variable = valueAddr;
+ var->_string.boot_val = bootValue;
+ var->_string.check_hook = check_hook;
+ var->_string.assign_hook = assign_hook;
+ var->_string.show_hook = show_hook;
+ define_custom_variable(var);
}
void
@@ -5193,19 +5112,17 @@ DefineCustomEnumVariable(const char *name,
GucEnumAssignHook assign_hook,
GucShowHook show_hook)
{
- struct config_enum *var;
-
- var = (struct config_enum *)
- init_custom_variable(name, short_desc, long_desc, context, flags,
- PGC_ENUM, sizeof(struct config_enum));
- var->variable = valueAddr;
- var->boot_val = bootValue;
- var->reset_val = bootValue;
- var->options = options;
- var->check_hook = check_hook;
- var->assign_hook = assign_hook;
- var->show_hook = show_hook;
- define_custom_variable(&var->gen);
+ struct config_generic *var;
+
+ var = init_custom_variable(name, short_desc, long_desc, context, flags, PGC_ENUM);
+ var->_enum.variable = valueAddr;
+ var->_enum.boot_val = bootValue;
+ var->_enum.reset_val = bootValue;
+ var->_enum.options = options;
+ var->_enum.check_hook = check_hook;
+ var->_enum.assign_hook = assign_hook;
+ var->_enum.show_hook = show_hook;
+ define_custom_variable(var);
}
/*
@@ -5251,7 +5168,7 @@ MarkGUCPrefixReserved(const char *className)
/* Remove it from any lists it's in, too */
RemoveGUCFromLists(var);
/* And free it */
- free_placeholder((struct config_string *) var);
+ free_placeholder(var);
}
}
@@ -5304,7 +5221,7 @@ get_explain_guc_options(int *num)
{
case PGC_BOOL:
{
- struct config_bool *lconf = (struct config_bool *) conf;
+ struct config_bool *lconf = &conf->_bool;
modified = (lconf->boot_val != *(lconf->variable));
}
@@ -5312,7 +5229,7 @@ get_explain_guc_options(int *num)
case PGC_INT:
{
- struct config_int *lconf = (struct config_int *) conf;
+ struct config_int *lconf = &conf->_int;
modified = (lconf->boot_val != *(lconf->variable));
}
@@ -5320,7 +5237,7 @@ get_explain_guc_options(int *num)
case PGC_REAL:
{
- struct config_real *lconf = (struct config_real *) conf;
+ struct config_real *lconf = &conf->_real;
modified = (lconf->boot_val != *(lconf->variable));
}
@@ -5328,7 +5245,7 @@ get_explain_guc_options(int *num)
case PGC_STRING:
{
- struct config_string *lconf = (struct config_string *) conf;
+ struct config_string *lconf = &conf->_string;
if (lconf->boot_val == NULL &&
*lconf->variable == NULL)
@@ -5343,7 +5260,7 @@ get_explain_guc_options(int *num)
case PGC_ENUM:
{
- struct config_enum *lconf = (struct config_enum *) conf;
+ struct config_enum *lconf = &conf->_enum;
modified = (lconf->boot_val != *(lconf->variable));
}
@@ -5412,7 +5329,7 @@ ShowGUCOption(const struct config_generic *record, bool use_units)
{
case PGC_BOOL:
{
- const struct config_bool *conf = (const struct config_bool *) record;
+ const struct config_bool *conf = &record->_bool;
if (conf->show_hook)
val = conf->show_hook();
@@ -5423,7 +5340,7 @@ ShowGUCOption(const struct config_generic *record, bool use_units)
case PGC_INT:
{
- const struct config_int *conf = (const struct config_int *) record;
+ const struct config_int *conf = &record->_int;
if (conf->show_hook)
val = conf->show_hook();
@@ -5452,7 +5369,7 @@ ShowGUCOption(const struct config_generic *record, bool use_units)
case PGC_REAL:
{
- const struct config_real *conf = (const struct config_real *) record;
+ const struct config_real *conf = &record->_real;
if (conf->show_hook)
val = conf->show_hook();
@@ -5477,7 +5394,7 @@ ShowGUCOption(const struct config_generic *record, bool use_units)
case PGC_STRING:
{
- const struct config_string *conf = (const struct config_string *) record;
+ const struct config_string *conf = &record->_string;
if (conf->show_hook)
val = conf->show_hook();
@@ -5490,12 +5407,12 @@ ShowGUCOption(const struct config_generic *record, bool use_units)
case PGC_ENUM:
{
- const struct config_enum *conf = (const struct config_enum *) record;
+ const struct config_enum *conf = &record->_enum;
if (conf->show_hook)
val = conf->show_hook();
else
- val = config_enum_lookup_by_value(conf, *conf->variable);
+ val = config_enum_lookup_by_value(record, *conf->variable);
}
break;
@@ -5535,7 +5452,7 @@ write_one_nondefault_variable(FILE *fp, struct config_generic *gconf)
{
case PGC_BOOL:
{
- struct config_bool *conf = (struct config_bool *) gconf;
+ struct config_bool *conf = &gconf->_bool;
if (*conf->variable)
fprintf(fp, "true");
@@ -5546,7 +5463,7 @@ write_one_nondefault_variable(FILE *fp, struct config_generic *gconf)
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) gconf;
+ struct config_int *conf = &gconf->_int;
fprintf(fp, "%d", *conf->variable);
}
@@ -5554,7 +5471,7 @@ write_one_nondefault_variable(FILE *fp, struct config_generic *gconf)
case PGC_REAL:
{
- struct config_real *conf = (struct config_real *) gconf;
+ struct config_real *conf = &gconf->_real;
fprintf(fp, "%.17g", *conf->variable);
}
@@ -5562,7 +5479,7 @@ write_one_nondefault_variable(FILE *fp, struct config_generic *gconf)
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) gconf;
+ struct config_string *conf = &gconf->_string;
if (*conf->variable)
fprintf(fp, "%s", *conf->variable);
@@ -5571,10 +5488,10 @@ write_one_nondefault_variable(FILE *fp, struct config_generic *gconf)
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) gconf;
+ struct config_enum *conf = &gconf->_enum;
fprintf(fp, "%s",
- config_enum_lookup_by_value(conf, *conf->variable));
+ config_enum_lookup_by_value(gconf, *conf->variable));
}
break;
}
@@ -5809,7 +5726,7 @@ estimate_variable_size(struct config_generic *gconf)
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) gconf;
+ struct config_int *conf = &gconf->_int;
/*
* Instead of getting the exact display length, use max
@@ -5838,7 +5755,7 @@ estimate_variable_size(struct config_generic *gconf)
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) gconf;
+ struct config_string *conf = &gconf->_string;
/*
* If the value is NULL, we transmit it as an empty string.
@@ -5854,9 +5771,9 @@ estimate_variable_size(struct config_generic *gconf)
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) gconf;
+ struct config_enum *conf = &gconf->_enum;
- valsize = strlen(config_enum_lookup_by_value(conf, *conf->variable));
+ valsize = strlen(config_enum_lookup_by_value(gconf, *conf->variable));
}
break;
}
@@ -5975,7 +5892,7 @@ serialize_variable(char **destptr, Size *maxbytes,
{
case PGC_BOOL:
{
- struct config_bool *conf = (struct config_bool *) gconf;
+ struct config_bool *conf = &gconf->_bool;
do_serialize(destptr, maxbytes,
(*conf->variable ? "true" : "false"));
@@ -5984,7 +5901,7 @@ serialize_variable(char **destptr, Size *maxbytes,
case PGC_INT:
{
- struct config_int *conf = (struct config_int *) gconf;
+ struct config_int *conf = &gconf->_int;
do_serialize(destptr, maxbytes, "%d", *conf->variable);
}
@@ -5992,7 +5909,7 @@ serialize_variable(char **destptr, Size *maxbytes,
case PGC_REAL:
{
- struct config_real *conf = (struct config_real *) gconf;
+ struct config_real *conf = &gconf->_real;
do_serialize(destptr, maxbytes, "%.*e",
REALTYPE_PRECISION, *conf->variable);
@@ -6001,7 +5918,7 @@ serialize_variable(char **destptr, Size *maxbytes,
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) gconf;
+ struct config_string *conf = &gconf->_string;
/* NULL becomes empty string, see estimate_variable_size() */
do_serialize(destptr, maxbytes, "%s",
@@ -6011,10 +5928,10 @@ serialize_variable(char **destptr, Size *maxbytes,
case PGC_ENUM:
{
- struct config_enum *conf = (struct config_enum *) gconf;
+ struct config_enum *conf = &gconf->_enum;
do_serialize(destptr, maxbytes, "%s",
- config_enum_lookup_by_value(conf, *conf->variable));
+ config_enum_lookup_by_value(gconf, *conf->variable));
}
break;
}
@@ -6199,7 +6116,7 @@ RestoreGUCState(void *gucstate)
break;
case PGC_STRING:
{
- struct config_string *conf = (struct config_string *) gconf;
+ struct config_string *conf = &gconf->_string;
guc_free(*conf->variable);
if (conf->reset_val && conf->reset_val != *conf->variable)
@@ -6710,11 +6627,11 @@ GUC_check_errcode(int sqlerrcode)
*/
static bool
-call_bool_check_hook(const struct config_bool *conf, bool *newval, void **extra,
+call_bool_check_hook(const struct config_generic *conf, bool *newval, void **extra,
GucSource source, int elevel)
{
/* Quick success if no hook */
- if (!conf->check_hook)
+ if (!conf->_bool.check_hook)
return true;
/* Reset variables that might be set by hook */
@@ -6723,14 +6640,14 @@ call_bool_check_hook(const struct config_bool *conf, bool *newval, void **extra,
GUC_check_errdetail_string = NULL;
GUC_check_errhint_string = NULL;
- if (!conf->check_hook(newval, extra, source))
+ if (!conf->_bool.check_hook(newval, extra, source))
{
ereport(elevel,
(errcode(GUC_check_errcode_value),
GUC_check_errmsg_string ?
errmsg_internal("%s", GUC_check_errmsg_string) :
errmsg("invalid value for parameter \"%s\": %d",
- conf->gen.name, (int) *newval),
+ conf->name, (int) *newval),
GUC_check_errdetail_string ?
errdetail_internal("%s", GUC_check_errdetail_string) : 0,
GUC_check_errhint_string ?
@@ -6744,11 +6661,11 @@ call_bool_check_hook(const struct config_bool *conf, bool *newval, void **extra,
}
static bool
-call_int_check_hook(const struct config_int *conf, int *newval, void **extra,
+call_int_check_hook(const struct config_generic *conf, int *newval, void **extra,
GucSource source, int elevel)
{
/* Quick success if no hook */
- if (!conf->check_hook)
+ if (!conf->_int.check_hook)
return true;
/* Reset variables that might be set by hook */
@@ -6757,14 +6674,14 @@ call_int_check_hook(const struct config_int *conf, int *newval, void **extra,
GUC_check_errdetail_string = NULL;
GUC_check_errhint_string = NULL;
- if (!conf->check_hook(newval, extra, source))
+ if (!conf->_int.check_hook(newval, extra, source))
{
ereport(elevel,
(errcode(GUC_check_errcode_value),
GUC_check_errmsg_string ?
errmsg_internal("%s", GUC_check_errmsg_string) :
errmsg("invalid value for parameter \"%s\": %d",
- conf->gen.name, *newval),
+ conf->name, *newval),
GUC_check_errdetail_string ?
errdetail_internal("%s", GUC_check_errdetail_string) : 0,
GUC_check_errhint_string ?
@@ -6778,11 +6695,11 @@ call_int_check_hook(const struct config_int *conf, int *newval, void **extra,
}
static bool
-call_real_check_hook(const struct config_real *conf, double *newval, void **extra,
+call_real_check_hook(const struct config_generic *conf, double *newval, void **extra,
GucSource source, int elevel)
{
/* Quick success if no hook */
- if (!conf->check_hook)
+ if (!conf->_real.check_hook)
return true;
/* Reset variables that might be set by hook */
@@ -6791,14 +6708,14 @@ call_real_check_hook(const struct config_real *conf, double *newval, void **extr
GUC_check_errdetail_string = NULL;
GUC_check_errhint_string = NULL;
- if (!conf->check_hook(newval, extra, source))
+ if (!conf->_real.check_hook(newval, extra, source))
{
ereport(elevel,
(errcode(GUC_check_errcode_value),
GUC_check_errmsg_string ?
errmsg_internal("%s", GUC_check_errmsg_string) :
errmsg("invalid value for parameter \"%s\": %g",
- conf->gen.name, *newval),
+ conf->name, *newval),
GUC_check_errdetail_string ?
errdetail_internal("%s", GUC_check_errdetail_string) : 0,
GUC_check_errhint_string ?
@@ -6812,13 +6729,13 @@ call_real_check_hook(const struct config_real *conf, double *newval, void **extr
}
static bool
-call_string_check_hook(const struct config_string *conf, char **newval, void **extra,
+call_string_check_hook(const struct config_generic *conf, char **newval, void **extra,
GucSource source, int elevel)
{
volatile bool result = true;
/* Quick success if no hook */
- if (!conf->check_hook)
+ if (!conf->_string.check_hook)
return true;
/*
@@ -6834,14 +6751,14 @@ call_string_check_hook(const struct config_string *conf, char **newval, void **e
GUC_check_errdetail_string = NULL;
GUC_check_errhint_string = NULL;
- if (!conf->check_hook(newval, extra, source))
+ if (!conf->_string.check_hook(newval, extra, source))
{
ereport(elevel,
(errcode(GUC_check_errcode_value),
GUC_check_errmsg_string ?
errmsg_internal("%s", GUC_check_errmsg_string) :
errmsg("invalid value for parameter \"%s\": \"%s\"",
- conf->gen.name, *newval ? *newval : ""),
+ conf->name, *newval ? *newval : ""),
GUC_check_errdetail_string ?
errdetail_internal("%s", GUC_check_errdetail_string) : 0,
GUC_check_errhint_string ?
@@ -6862,11 +6779,11 @@ call_string_check_hook(const struct config_string *conf, char **newval, void **e
}
static bool
-call_enum_check_hook(const struct config_enum *conf, int *newval, void **extra,
+call_enum_check_hook(const struct config_generic *conf, int *newval, void **extra,
GucSource source, int elevel)
{
/* Quick success if no hook */
- if (!conf->check_hook)
+ if (!conf->_enum.check_hook)
return true;
/* Reset variables that might be set by hook */
@@ -6875,14 +6792,14 @@ call_enum_check_hook(const struct config_enum *conf, int *newval, void **extra,
GUC_check_errdetail_string = NULL;
GUC_check_errhint_string = NULL;
- if (!conf->check_hook(newval, extra, source))
+ if (!conf->_enum.check_hook(newval, extra, source))
{
ereport(elevel,
(errcode(GUC_check_errcode_value),
GUC_check_errmsg_string ?
errmsg_internal("%s", GUC_check_errmsg_string) :
errmsg("invalid value for parameter \"%s\": \"%s\"",
- conf->gen.name,
+ conf->name,
config_enum_lookup_by_value(conf, *newval)),
GUC_check_errdetail_string ?
errdetail_internal("%s", GUC_check_errdetail_string) : 0,
diff --git a/src/backend/utils/misc/guc_funcs.c b/src/backend/utils/misc/guc_funcs.c
index d7a822e1462..4f58fa3d4e0 100644
--- a/src/backend/utils/misc/guc_funcs.c
+++ b/src/backend/utils/misc/guc_funcs.c
@@ -629,7 +629,7 @@ GetConfigOptionValues(const struct config_generic *conf, const char **values)
{
case PGC_BOOL:
{
- const struct config_bool *lconf = (const struct config_bool *) conf;
+ const struct config_bool *lconf = &conf->_bool;
/* min_val */
values[9] = NULL;
@@ -650,7 +650,7 @@ GetConfigOptionValues(const struct config_generic *conf, const char **values)
case PGC_INT:
{
- const struct config_int *lconf = (const struct config_int *) conf;
+ const struct config_int *lconf = &conf->_int;
/* min_val */
snprintf(buffer, sizeof(buffer), "%d", lconf->min);
@@ -675,7 +675,7 @@ GetConfigOptionValues(const struct config_generic *conf, const char **values)
case PGC_REAL:
{
- const struct config_real *lconf = (const struct config_real *) conf;
+ const struct config_real *lconf = &conf->_real;
/* min_val */
snprintf(buffer, sizeof(buffer), "%g", lconf->min);
@@ -700,7 +700,7 @@ GetConfigOptionValues(const struct config_generic *conf, const char **values)
case PGC_STRING:
{
- const struct config_string *lconf = (const struct config_string *) conf;
+ const struct config_string *lconf = &conf->_string;
/* min_val */
values[9] = NULL;
@@ -727,7 +727,7 @@ GetConfigOptionValues(const struct config_generic *conf, const char **values)
case PGC_ENUM:
{
- const struct config_enum *lconf = (const struct config_enum *) conf;
+ const struct config_enum *lconf = &conf->_enum;
/* min_val */
values[9] = NULL;
@@ -745,11 +745,11 @@ GetConfigOptionValues(const struct config_generic *conf, const char **values)
"{\"", "\"}", "\",\"");
/* boot_val */
- values[12] = pstrdup(config_enum_lookup_by_value(lconf,
+ values[12] = pstrdup(config_enum_lookup_by_value(conf,
lconf->boot_val));
/* reset_val */
- values[13] = pstrdup(config_enum_lookup_by_value(lconf,
+ values[13] = pstrdup(config_enum_lookup_by_value(conf,
lconf->reset_val));
}
break;
diff --git a/src/backend/utils/misc/help_config.c b/src/backend/utils/misc/help_config.c
index 86812ac881f..2810715693c 100644
--- a/src/backend/utils/misc/help_config.c
+++ b/src/backend/utils/misc/help_config.c
@@ -23,23 +23,8 @@
#include "utils/help_config.h"
-/*
- * This union allows us to mix the numerous different types of structs
- * that we are organizing.
- */
-typedef union
-{
- struct config_generic generic;
- struct config_bool _bool;
- struct config_real real;
- struct config_int integer;
- struct config_string string;
- struct config_enum _enum;
-} mixedStruct;
-
-
-static void printMixedStruct(mixedStruct *structToPrint);
-static bool displayStruct(mixedStruct *structToDisplay);
+static void printMixedStruct(const struct config_generic *structToPrint);
+static bool displayStruct(const struct config_generic *structToDisplay);
void
@@ -55,7 +40,7 @@ GucInfoMain(void)
for (int i = 0; i < numOpts; i++)
{
- mixedStruct *var = (mixedStruct *) guc_vars[i];
+ const struct config_generic *var = guc_vars[i];
if (displayStruct(var))
printMixedStruct(var);
@@ -70,11 +55,11 @@ GucInfoMain(void)
* should be displayed to the user.
*/
static bool
-displayStruct(mixedStruct *structToDisplay)
+displayStruct(const struct config_generic *structToDisplay)
{
- return !(structToDisplay->generic.flags & (GUC_NO_SHOW_ALL |
- GUC_NOT_IN_SAMPLE |
- GUC_DISALLOW_IN_FILE));
+ return !(structToDisplay->flags & (GUC_NO_SHOW_ALL |
+ GUC_NOT_IN_SAMPLE |
+ GUC_DISALLOW_IN_FILE));
}
@@ -83,14 +68,14 @@ displayStruct(mixedStruct *structToDisplay)
* a different format, depending on what the user wants to see.
*/
static void
-printMixedStruct(mixedStruct *structToPrint)
+printMixedStruct(const struct config_generic *structToPrint)
{
printf("%s\t%s\t%s\t",
- structToPrint->generic.name,
- GucContext_Names[structToPrint->generic.context],
- _(config_group_names[structToPrint->generic.group]));
+ structToPrint->name,
+ GucContext_Names[structToPrint->context],
+ _(config_group_names[structToPrint->group]));
- switch (structToPrint->generic.vartype)
+ switch (structToPrint->vartype)
{
case PGC_BOOL:
@@ -101,26 +86,26 @@ printMixedStruct(mixedStruct *structToPrint)
case PGC_INT:
printf("INTEGER\t%d\t%d\t%d\t",
- structToPrint->integer.reset_val,
- structToPrint->integer.min,
- structToPrint->integer.max);
+ structToPrint->_int.reset_val,
+ structToPrint->_int.min,
+ structToPrint->_int.max);
break;
case PGC_REAL:
printf("REAL\t%g\t%g\t%g\t",
- structToPrint->real.reset_val,
- structToPrint->real.min,
- structToPrint->real.max);
+ structToPrint->_real.reset_val,
+ structToPrint->_real.min,
+ structToPrint->_real.max);
break;
case PGC_STRING:
printf("STRING\t%s\t\t\t",
- structToPrint->string.boot_val ? structToPrint->string.boot_val : "");
+ structToPrint->_string.boot_val ? structToPrint->_string.boot_val : "");
break;
case PGC_ENUM:
printf("ENUM\t%s\t\t\t",
- config_enum_lookup_by_value(&structToPrint->_enum,
+ config_enum_lookup_by_value(structToPrint,
structToPrint->_enum.boot_val));
break;
@@ -130,6 +115,6 @@ printMixedStruct(mixedStruct *structToPrint)
}
printf("%s\t%s\n",
- (structToPrint->generic.short_desc == NULL) ? "" : _(structToPrint->generic.short_desc),
- (structToPrint->generic.long_desc == NULL) ? "" : _(structToPrint->generic.long_desc));
+ (structToPrint->short_desc == NULL) ? "" : _(structToPrint->short_desc),
+ (structToPrint->long_desc == NULL) ? "" : _(structToPrint->long_desc));
}
diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h
index 3de3d809545..bbfcc633014 100644
--- a/src/include/utils/guc_tables.h
+++ b/src/include/utils/guc_tables.h
@@ -132,6 +132,84 @@ typedef struct guc_stack
config_var_value masked; /* SET value in a GUC_SET_LOCAL entry */
} GucStack;
+
+/* GUC records for specific variable types */
+
+struct config_bool
+{
+ /* constant fields, must be set correctly in initial value: */
+ bool *variable;
+ bool boot_val;
+ GucBoolCheckHook check_hook;
+ GucBoolAssignHook assign_hook;
+ GucShowHook show_hook;
+ /* variable fields, initialized at runtime: */
+ bool reset_val;
+};
+
+struct config_int
+{
+ /* constant fields, must be set correctly in initial value: */
+ int *variable;
+ int boot_val;
+ int min;
+ int max;
+ GucIntCheckHook check_hook;
+ GucIntAssignHook assign_hook;
+ GucShowHook show_hook;
+ /* variable fields, initialized at runtime: */
+ int reset_val;
+};
+
+struct config_real
+{
+ /* constant fields, must be set correctly in initial value: */
+ double *variable;
+ double boot_val;
+ double min;
+ double max;
+ GucRealCheckHook check_hook;
+ GucRealAssignHook assign_hook;
+ GucShowHook show_hook;
+ /* variable fields, initialized at runtime: */
+ double reset_val;
+};
+
+/*
+ * A note about string GUCs: the boot_val is allowed to be NULL, which leads
+ * to the reset_val and the actual variable value (*variable) also being NULL.
+ * However, there is no way to set a NULL value subsequently using
+ * set_config_option or any other GUC API. Also, GUC APIs such as SHOW will
+ * display a NULL value as an empty string. Callers that choose to use a NULL
+ * boot_val should overwrite the setting later in startup, or else be careful
+ * that NULL doesn't have semantics that are visibly different from an empty
+ * string.
+ */
+struct config_string
+{
+ /* constant fields, must be set correctly in initial value: */
+ char **variable;
+ const char *boot_val;
+ GucStringCheckHook check_hook;
+ GucStringAssignHook assign_hook;
+ GucShowHook show_hook;
+ /* variable fields, initialized at runtime: */
+ char *reset_val;
+};
+
+struct config_enum
+{
+ /* constant fields, must be set correctly in initial value: */
+ int *variable;
+ int boot_val;
+ const struct config_enum_entry *options;
+ GucEnumCheckHook check_hook;
+ GucEnumAssignHook assign_hook;
+ GucShowHook show_hook;
+ /* variable fields, initialized at runtime: */
+ int reset_val;
+};
+
/*
* Generic fields applicable to all types of variables
*
@@ -200,6 +278,16 @@ struct config_generic
char *sourcefile; /* file current setting is from (NULL if not
* set in config file) */
int sourceline; /* line in source file */
+
+ /* fields for specific variable types */
+ union
+ {
+ struct config_bool _bool;
+ struct config_int _int;
+ struct config_real _real;
+ struct config_string _string;
+ struct config_enum _enum;
+ };
};
/* bit values in status field */
@@ -212,100 +300,14 @@ struct config_generic
#define GUC_NEEDS_REPORT 0x0004 /* new value must be reported to client */
-/* GUC records for specific variable types */
-
-struct config_bool
-{
- struct config_generic gen;
- /* constant fields, must be set correctly in initial value: */
- bool *variable;
- bool boot_val;
- GucBoolCheckHook check_hook;
- GucBoolAssignHook assign_hook;
- GucShowHook show_hook;
- /* variable fields, initialized at runtime: */
- bool reset_val;
-};
-
-struct config_int
-{
- struct config_generic gen;
- /* constant fields, must be set correctly in initial value: */
- int *variable;
- int boot_val;
- int min;
- int max;
- GucIntCheckHook check_hook;
- GucIntAssignHook assign_hook;
- GucShowHook show_hook;
- /* variable fields, initialized at runtime: */
- int reset_val;
-};
-
-struct config_real
-{
- struct config_generic gen;
- /* constant fields, must be set correctly in initial value: */
- double *variable;
- double boot_val;
- double min;
- double max;
- GucRealCheckHook check_hook;
- GucRealAssignHook assign_hook;
- GucShowHook show_hook;
- /* variable fields, initialized at runtime: */
- double reset_val;
-};
-
-/*
- * A note about string GUCs: the boot_val is allowed to be NULL, which leads
- * to the reset_val and the actual variable value (*variable) also being NULL.
- * However, there is no way to set a NULL value subsequently using
- * set_config_option or any other GUC API. Also, GUC APIs such as SHOW will
- * display a NULL value as an empty string. Callers that choose to use a NULL
- * boot_val should overwrite the setting later in startup, or else be careful
- * that NULL doesn't have semantics that are visibly different from an empty
- * string.
- */
-struct config_string
-{
- struct config_generic gen;
- /* constant fields, must be set correctly in initial value: */
- char **variable;
- const char *boot_val;
- GucStringCheckHook check_hook;
- GucStringAssignHook assign_hook;
- GucShowHook show_hook;
- /* variable fields, initialized at runtime: */
- char *reset_val;
-};
-
-struct config_enum
-{
- struct config_generic gen;
- /* constant fields, must be set correctly in initial value: */
- int *variable;
- int boot_val;
- const struct config_enum_entry *options;
- GucEnumCheckHook check_hook;
- GucEnumAssignHook assign_hook;
- GucShowHook show_hook;
- /* variable fields, initialized at runtime: */
- int reset_val;
-};
-
/* constant tables corresponding to enums above and in guc.h */
extern PGDLLIMPORT const char *const config_group_names[];
extern PGDLLIMPORT const char *const config_type_names[];
extern PGDLLIMPORT const char *const GucContext_Names[];
extern PGDLLIMPORT const char *const GucSource_Names[];
-/* data arrays defining all the built-in GUC variables */
-extern PGDLLIMPORT struct config_bool ConfigureNamesBool[];
-extern PGDLLIMPORT struct config_int ConfigureNamesInt[];
-extern PGDLLIMPORT struct config_real ConfigureNamesReal[];
-extern PGDLLIMPORT struct config_string ConfigureNamesString[];
-extern PGDLLIMPORT struct config_enum ConfigureNamesEnum[];
+/* data array defining all the built-in GUC variables */
+extern PGDLLIMPORT struct config_generic ConfigureNames[];
/* lookup GUC variables, returning config_generic pointers */
extern struct config_generic *find_option(const char *name,
@@ -326,7 +328,7 @@ extern struct config_generic **get_guc_variables(int *num_vars);
extern void build_guc_variables(void);
/* search in enum options */
-extern const char *config_enum_lookup_by_value(const struct config_enum *record, int val);
+extern const char *config_enum_lookup_by_value(const struct config_generic *record, int val);
extern bool config_enum_lookup_by_name(const struct config_enum *record,
const char *value, int *retval);
extern char *config_enum_get_options(const struct config_enum *record,
diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list
index 5290b91e83e..a65794d866f 100644
--- a/src/tools/pgindent/typedefs.list
+++ b/src/tools/pgindent/typedefs.list
@@ -3806,7 +3806,6 @@ memoize_iterator
metastring
missing_cache_key
mix_data_t
-mixedStruct
mode_t
movedb_failure_params
multirange_bsearch_comparison
--
2.51.0
v2-0004-Sort-guc_parameters.dat-alphabetically-by-name.patchtext/plain; charset=UTF-8; name=v2-0004-Sort-guc_parameters.dat-alphabetically-by-name.patchDownload
From 6ae7eafd1bd85af564c3cf3b79b11873f9a0aabd Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 3 Oct 2025 08:27:18 +0200
Subject: [PATCH v2 4/5] Sort guc_parameters.dat alphabetically by name
Discussion: https://www.postgresql.org/message-id/flat/8fdfb91e-60fb-44fa-8df6-f5dea47353c9@eisentraut.org
---
src/backend/utils/misc/guc_parameters.dat | 4916 ++++++++++-----------
1 file changed, 2458 insertions(+), 2458 deletions(-)
diff --git a/src/backend/utils/misc/guc_parameters.dat b/src/backend/utils/misc/guc_parameters.dat
index d6fc8333850..f7be908b4ed 100644
--- a/src/backend/utils/misc/guc_parameters.dat
+++ b/src/backend/utils/misc/guc_parameters.dat
@@ -33,588 +33,703 @@
# 7. If it's a new GUC_LIST_QUOTE option, you must add it to
# variable_is_guc_list_quote() in src/bin/pg_dump/dumputils.c.
-{ name => 'enable_seqscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of sequential-scan plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_seqscan',
+# This setting itself cannot be set by ALTER SYSTEM to avoid an
+# operator turning this setting off by using ALTER SYSTEM, without a
+# way to turn it back on.
+{ name => 'allow_alter_system', type => 'bool', context => 'PGC_SIGHUP', group => 'COMPAT_OPTIONS_OTHER',
+ short_desc => 'Allows running the ALTER SYSTEM command.',
+ long_desc => 'Can be set to off for environments where global configuration changes should be made using a different method.',
+ flags => 'GUC_DISALLOW_IN_AUTO_FILE',
+ variable => 'AllowAlterSystem',
boot_val => 'true',
},
-{ name => 'enable_indexscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of index-scan plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_indexscan',
- boot_val => 'true',
+{ name => 'allow_in_place_tablespaces', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Allows tablespaces directly inside pg_tblspc, for testing.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'allow_in_place_tablespaces',
+ boot_val => 'false',
},
-{ name => 'enable_indexonlyscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of index-only-scan plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_indexonlyscan',
- boot_val => 'true',
+{ name => 'allow_system_table_mods', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Allows modifications of the structure of system tables.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'allowSystemTableMods',
+ boot_val => 'false',
},
-{ name => 'enable_bitmapscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of bitmap-scan plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_bitmapscan',
- boot_val => 'true',
+{ name => 'application_name', type => 'string', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
+ short_desc => 'Sets the application name to be reported in statistics and logs.',
+ flags => 'GUC_IS_NAME | GUC_REPORT | GUC_NOT_IN_SAMPLE',
+ variable => 'application_name',
+ boot_val => '""',
+ check_hook => 'check_application_name',
+ assign_hook => 'assign_application_name',
},
-{ name => 'enable_tidscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of TID scan plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_tidscan',
- boot_val => 'true',
+{ name => 'archive_cleanup_command', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVE_RECOVERY',
+ short_desc => 'Sets the shell command that will be executed at every restart point.',
+ variable => 'archiveCleanupCommand',
+ boot_val => '""',
},
-{ name => 'enable_sort', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of explicit sort steps.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_sort',
- boot_val => 'true',
-},
-{ name => 'enable_incremental_sort', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of incremental sort steps.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_incremental_sort',
- boot_val => 'true',
+{ name => 'archive_command', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVING',
+ short_desc => 'Sets the shell command that will be called to archive a WAL file.',
+ long_desc => 'An empty string means use "archive_library".',
+ variable => 'XLogArchiveCommand',
+ boot_val => '""',
+ show_hook => 'show_archive_command',
},
-{ name => 'enable_hashagg', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of hashed aggregation plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_hashagg',
- boot_val => 'true',
+{ name => 'archive_library', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVING',
+ short_desc => 'Sets the library that will be called to archive a WAL file.',
+ long_desc => 'An empty string means use "archive_command".',
+ variable => 'XLogArchiveLibrary',
+ boot_val => '""',
},
-{ name => 'enable_material', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of materialization.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_material',
- boot_val => 'true',
+{ name => 'archive_mode', type => 'enum', context => 'PGC_POSTMASTER', group => 'WAL_ARCHIVING',
+ short_desc => 'Allows archiving of WAL files using "archive_command".',
+ variable => 'XLogArchiveMode',
+ boot_val => 'ARCHIVE_MODE_OFF',
+ options => 'archive_mode_options',
},
-{ name => 'enable_memoize', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of memoization.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_memoize',
- boot_val => 'true',
+{ name => 'archive_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVING',
+ short_desc => 'Sets the amount of time to wait before forcing a switch to the next WAL file.',
+ long_desc => '0 disables the timeout.',
+ flags => 'GUC_UNIT_S',
+ variable => 'XLogArchiveTimeout',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX / 2',
},
-{ name => 'enable_nestloop', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of nested-loop join plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_nestloop',
+{ name => 'array_nulls', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
+ short_desc => 'Enables input of NULL elements in arrays.',
+ long_desc => 'When turned on, unquoted NULL in an array input value means a null value; otherwise it is taken literally.',
+ variable => 'Array_nulls',
boot_val => 'true',
},
-{ name => 'enable_mergejoin', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of merge join plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_mergejoin',
- boot_val => 'true',
+{ name => 'authentication_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
+ short_desc => 'Sets the maximum allowed time to complete client authentication.',
+ flags => 'GUC_UNIT_S',
+ variable => 'AuthenticationTimeout',
+ boot_val => '60',
+ min => '1',
+ max => '600',
},
-{ name => 'enable_hashjoin', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of hash join plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_hashjoin',
+{ name => 'autovacuum', type => 'bool', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Starts the autovacuum subprocess.',
+ variable => 'autovacuum_start_daemon',
boot_val => 'true',
},
-{ name => 'enable_gathermerge', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of gather merge plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_gathermerge',
- boot_val => 'true',
+{ name => 'autovacuum_analyze_scale_factor', type => 'real', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Number of tuple inserts, updates, or deletes prior to analyze as a fraction of reltuples.',
+ variable => 'autovacuum_anl_scale',
+ boot_val => '0.1',
+ min => '0.0',
+ max => '100.0',
},
-{ name => 'enable_partitionwise_join', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables partitionwise join.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_partitionwise_join',
- boot_val => 'false',
+{ name => 'autovacuum_analyze_threshold', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Minimum number of tuple inserts, updates, or deletes prior to analyze.',
+ variable => 'autovacuum_anl_thresh',
+ boot_val => '50',
+ min => '0',
+ max => 'INT_MAX',
},
-{ name => 'enable_partitionwise_aggregate', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables partitionwise aggregation and grouping.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_partitionwise_aggregate',
- boot_val => 'false',
+# see varsup.c for why this is PGC_POSTMASTER not PGC_SIGHUP
+# see vacuum_failsafe_age if you change the upper-limit value.
+{ name => 'autovacuum_freeze_max_age', type => 'int', context => 'PGC_POSTMASTER', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Age at which to autovacuum a table to prevent transaction ID wraparound.',
+ variable => 'autovacuum_freeze_max_age',
+ boot_val => '200000000',
+ min => '100000',
+ max => '2000000000',
},
-{ name => 'enable_eager_aggregate', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables eager aggregation.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_eager_aggregate',
- boot_val => 'true',
+{ name => 'autovacuum_max_workers', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Sets the maximum number of simultaneously running autovacuum worker processes.',
+ variable => 'autovacuum_max_workers',
+ boot_val => '3',
+ min => '1',
+ max => 'MAX_BACKENDS',
},
-{ name => 'enable_parallel_append', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of parallel append plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_parallel_append',
- boot_val => 'true',
+# see multixact.c for why this is PGC_POSTMASTER not PGC_SIGHUP
+{ name => 'autovacuum_multixact_freeze_max_age', type => 'int', context => 'PGC_POSTMASTER', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Multixact age at which to autovacuum a table to prevent multixact wraparound.',
+ variable => 'autovacuum_multixact_freeze_max_age',
+ boot_val => '400000000',
+ min => '10000',
+ max => '2000000000',
},
-{ name => 'enable_parallel_hash', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of parallel hash plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_parallel_hash',
- boot_val => 'true',
+{ name => 'autovacuum_naptime', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Time to sleep between autovacuum runs.',
+ flags => 'GUC_UNIT_S',
+ variable => 'autovacuum_naptime',
+ boot_val => '60',
+ min => '1',
+ max => 'INT_MAX / 1000',
},
-{ name => 'enable_partition_pruning', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables plan-time and execution-time partition pruning.',
- long_desc => 'Allows the query planner and executor to compare partition bounds to conditions in the query to determine which partitions must be scanned.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_partition_pruning',
- boot_val => 'true',
+{ name => 'autovacuum_vacuum_cost_delay', type => 'real', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Vacuum cost delay in milliseconds, for autovacuum.',
+ long_desc => '-1 means use "vacuum_cost_delay".',
+ flags => 'GUC_UNIT_MS',
+ variable => 'autovacuum_vac_cost_delay',
+ boot_val => '2',
+ min => '-1',
+ max => '100',
},
-{ name => 'enable_presorted_aggregate', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s ability to produce plans that provide presorted input for ORDER BY / DISTINCT aggregate functions.',
- long_desc => 'Allows the query planner to build plans that provide presorted input for aggregate functions with an ORDER BY / DISTINCT clause. When disabled, implicit sorts are always performed during execution.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_presorted_aggregate',
- boot_val => 'true',
+{ name => 'autovacuum_vacuum_cost_limit', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Vacuum cost amount available before napping, for autovacuum.',
+ long_desc => '-1 means use "vacuum_cost_limit".',
+ variable => 'autovacuum_vac_cost_limit',
+ boot_val => '-1',
+ min => '-1',
+ max => '10000',
},
-{ name => 'enable_async_append', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables the planner\'s use of async append plans.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_async_append',
- boot_val => 'true',
+{ name => 'autovacuum_vacuum_insert_scale_factor', type => 'real', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Number of tuple inserts prior to vacuum as a fraction of reltuples.',
+ variable => 'autovacuum_vac_ins_scale',
+ boot_val => '0.2',
+ min => '0.0',
+ max => '100.0',
},
-{ name => 'enable_self_join_elimination', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables removal of unique self-joins.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_self_join_elimination',
- boot_val => 'true',
+{ name => 'autovacuum_vacuum_insert_threshold', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Minimum number of tuple inserts prior to vacuum.',
+ long_desc => '-1 disables insert vacuums.',
+ variable => 'autovacuum_vac_ins_thresh',
+ boot_val => '1000',
+ min => '-1',
+ max => 'INT_MAX',
},
-{ name => 'enable_group_by_reordering', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables reordering of GROUP BY keys.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_group_by_reordering',
- boot_val => 'true',
-},
+{ name => 'autovacuum_vacuum_max_threshold', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Maximum number of tuple updates or deletes prior to vacuum.',
+ long_desc => '-1 disables the maximum threshold.',
+ variable => 'autovacuum_vac_max_thresh',
+ boot_val => '100000000',
+ min => '-1',
+ max => 'INT_MAX',
+},
-{ name => 'enable_distinct_reordering', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables reordering of DISTINCT keys.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_distinct_reordering',
- boot_val => 'true',
+{ name => 'autovacuum_vacuum_scale_factor', type => 'real', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Number of tuple updates or deletes prior to vacuum as a fraction of reltuples.',
+ variable => 'autovacuum_vac_scale',
+ boot_val => '0.2',
+ min => '0.0',
+ max => '100.0',
},
-{ name => 'geqo', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
- short_desc => 'Enables genetic query optimization.',
- long_desc => 'This algorithm attempts to do planning without exhaustive searching.',
- flags => 'GUC_EXPLAIN',
- variable => 'enable_geqo',
- boot_val => 'true',
+{ name => 'autovacuum_vacuum_threshold', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Minimum number of tuple updates or deletes prior to vacuum.',
+ variable => 'autovacuum_vac_thresh',
+ boot_val => '50',
+ min => '0',
+ max => 'INT_MAX',
},
-# Not for general use --- used by SET SESSION AUTHORIZATION and SET
-# ROLE
-{ name => 'is_superuser', type => 'bool', context => 'PGC_INTERNAL', group => 'UNGROUPED',
- short_desc => 'Shows whether the current user is a superuser.',
- flags => 'GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_ALLOW_IN_PARALLEL',
- variable => 'current_role_is_superuser',
- boot_val => 'false',
+{ name => 'autovacuum_work_mem', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the maximum memory to be used by each autovacuum worker process.',
+ long_desc => '-1 means use "maintenance_work_mem".',
+ flags => 'GUC_UNIT_KB',
+ variable => 'autovacuum_work_mem',
+ boot_val => '-1',
+ min => '-1',
+ max => 'MAX_KILOBYTES',
+ check_hook => 'check_autovacuum_work_mem',
},
-# This setting itself cannot be set by ALTER SYSTEM to avoid an
-# operator turning this setting off by using ALTER SYSTEM, without a
-# way to turn it back on.
-{ name => 'allow_alter_system', type => 'bool', context => 'PGC_SIGHUP', group => 'COMPAT_OPTIONS_OTHER',
- short_desc => 'Allows running the ALTER SYSTEM command.',
- long_desc => 'Can be set to off for environments where global configuration changes should be made using a different method.',
- flags => 'GUC_DISALLOW_IN_AUTO_FILE',
- variable => 'AllowAlterSystem',
- boot_val => 'true',
+# see max_connections
+{ name => 'autovacuum_worker_slots', type => 'int', context => 'PGC_POSTMASTER', group => 'VACUUM_AUTOVACUUM',
+ short_desc => 'Sets the number of backend slots to allocate for autovacuum workers.',
+ variable => 'autovacuum_worker_slots',
+ boot_val => '16',
+ min => '1',
+ max => 'MAX_BACKENDS',
},
-{ name => 'bonjour', type => 'bool', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Enables advertising the server via Bonjour.',
- variable => 'enable_bonjour',
- boot_val => 'false',
- check_hook => 'check_bonjour',
+{ name => 'backend_flush_after', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_IO',
+ short_desc => 'Number of pages after which previously performed writes are flushed to disk.',
+ long_desc => '0 disables forced writeback.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'backend_flush_after',
+ boot_val => 'DEFAULT_BACKEND_FLUSH_AFTER',
+ min => '0',
+ max => 'WRITEBACK_MAX_PENDING_FLUSHES',
},
-{ name => 'track_commit_timestamp', type => 'bool', context => 'PGC_POSTMASTER', group => 'REPLICATION_SENDING',
- short_desc => 'Collects transaction commit time.',
- variable => 'track_commit_timestamp',
- boot_val => 'false',
+{ name => 'backslash_quote', type => 'enum', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
+ short_desc => 'Sets whether "\\\\\'" is allowed in string literals.',
+ variable => 'backslash_quote',
+ boot_val => 'BACKSLASH_QUOTE_SAFE_ENCODING',
+ options => 'backslash_quote_options',
},
-{ name => 'ssl', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Enables SSL connections.',
- variable => 'EnableSSL',
- boot_val => 'false',
- check_hook => 'check_ssl',
+{ name => 'backtrace_functions', type => 'string', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Log backtrace for errors in these functions.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'backtrace_functions',
+ boot_val => '""',
+ check_hook => 'check_backtrace_functions',
+ assign_hook => 'assign_backtrace_functions',
},
-{ name => 'ssl_passphrase_command_supports_reload', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Controls whether "ssl_passphrase_command" is called during server reload.',
- variable => 'ssl_passphrase_command_supports_reload',
- boot_val => 'false',
+{ name => 'bgwriter_delay', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_BGWRITER',
+ short_desc => 'Background writer sleep time between rounds.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'BgWriterDelay',
+ boot_val => '200',
+ min => '10',
+ max => '10000',
},
-{ name => 'ssl_prefer_server_ciphers', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Give priority to server ciphersuite order.',
- variable => 'SSLPreferServerCiphers',
- boot_val => 'true',
+{ name => 'bgwriter_flush_after', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_BGWRITER',
+ short_desc => 'Number of pages after which previously performed writes are flushed to disk.',
+ long_desc => '0 disables forced writeback.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'bgwriter_flush_after',
+ boot_val => 'DEFAULT_BGWRITER_FLUSH_AFTER',
+ min => '0',
+ max => 'WRITEBACK_MAX_PENDING_FLUSHES',
},
-{ name => 'fsync', type => 'bool', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
- short_desc => 'Forces synchronization of updates to disk.',
- long_desc => 'The server will use the fsync() system call in several places to make sure that updates are physically written to disk. This ensures that a database cluster will recover to a consistent state after an operating system or hardware crash.',
- variable => 'enableFsync',
- boot_val => 'true',
+# Same upper limit as shared_buffers
+{ name => 'bgwriter_lru_maxpages', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_BGWRITER',
+ short_desc => 'Background writer maximum number of LRU pages to flush per round.',
+ long_desc => '0 disables background writing.',
+ variable => 'bgwriter_lru_maxpages',
+ boot_val => '100',
+ min => '0',
+ max => 'INT_MAX / 2',
},
-{ name => 'ignore_checksum_failure', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Continues processing after a checksum failure.',
- long_desc => 'Detection of a checksum failure normally causes PostgreSQL to report an error, aborting the current transaction. Setting ignore_checksum_failure to true causes the system to ignore the failure (but still report a warning), and continue processing. This behavior could cause crashes or other serious problems. Only has an effect if checksums are enabled.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'ignore_checksum_failure',
- boot_val => 'false',
+{ name => 'bgwriter_lru_multiplier', type => 'real', context => 'PGC_SIGHUP', group => 'RESOURCES_BGWRITER',
+ short_desc => 'Multiple of the average buffer usage to free per round.',
+ variable => 'bgwriter_lru_multiplier',
+ boot_val => '2.0',
+ min => '0.0',
+ max => '10.0',
},
-{ name => 'zero_damaged_pages', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Continues processing past damaged page headers.',
- long_desc => 'Detection of a damaged page header normally causes PostgreSQL to report an error, aborting the current transaction. Setting "zero_damaged_pages" to true causes the system to instead report a warning, zero out the damaged page, and continue processing. This behavior will destroy data, namely all the rows on the damaged page.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'zero_damaged_pages',
- boot_val => 'false',
+{ name => 'block_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the size of a disk block.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'block_size',
+ boot_val => 'BLCKSZ',
+ min => 'BLCKSZ',
+ max => 'BLCKSZ',
},
-{ name => 'ignore_invalid_pages', type => 'bool', context => 'PGC_POSTMASTER', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Continues recovery after an invalid pages failure.',
- long_desc => 'Detection of WAL records having references to invalid pages during recovery causes PostgreSQL to raise a PANIC-level error, aborting the recovery. Setting "ignore_invalid_pages" to true causes the system to ignore invalid page references in WAL records (but still report a warning), and continue recovery. This behavior may cause crashes, data loss, propagate or hide corruption, or other serious problems. Only has an effect during recovery or in standby mode.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'ignore_invalid_pages',
+{ name => 'bonjour', type => 'bool', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Enables advertising the server via Bonjour.',
+ variable => 'enable_bonjour',
boot_val => 'false',
+ check_hook => 'check_bonjour',
},
-{ name => 'full_page_writes', type => 'bool', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
- short_desc => 'Writes full pages to WAL when first modified after a checkpoint.',
- long_desc => 'A page write in process during an operating system crash might be only partially written to disk. During recovery, the row changes stored in WAL are not enough to recover. This option writes pages when first modified after a checkpoint to WAL so full recovery is possible.',
- variable => 'fullPageWrites',
- boot_val => 'true',
+{ name => 'bonjour_name', type => 'string', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the Bonjour service name.',
+ long_desc => 'An empty string means use the computer name.',
+ variable => 'bonjour_name',
+ boot_val => '""',
},
-{ name => 'wal_log_hints', type => 'bool', context => 'PGC_POSTMASTER', group => 'WAL_SETTINGS',
- short_desc => 'Writes full pages to WAL when first modified after a checkpoint, even for a non-critical modification.',
- variable => 'wal_log_hints',
- boot_val => 'false',
+{ name => 'bytea_output', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the output format for bytea.',
+ variable => 'bytea_output',
+ boot_val => 'BYTEA_OUTPUT_HEX',
+ options => 'bytea_output_options',
},
-{ name => 'wal_init_zero', type => 'bool', context => 'PGC_SUSET', group => 'WAL_SETTINGS',
- short_desc => 'Writes zeroes to new WAL files before first use.',
- variable => 'wal_init_zero',
+{ name => 'check_function_bodies', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Check routine bodies during CREATE FUNCTION and CREATE PROCEDURE.',
+ variable => 'check_function_bodies',
boot_val => 'true',
},
-{ name => 'wal_recycle', type => 'bool', context => 'PGC_SUSET', group => 'WAL_SETTINGS',
- short_desc => 'Recycles WAL files by renaming them.',
- variable => 'wal_recycle',
- boot_val => 'true',
+{ name => 'checkpoint_completion_target', type => 'real', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
+ short_desc => 'Time spent flushing dirty buffers during checkpoint, as fraction of checkpoint interval.',
+ variable => 'CheckPointCompletionTarget',
+ boot_val => '0.9',
+ min => '0.0',
+ max => '1.0',
+ assign_hook => 'assign_checkpoint_completion_target',
},
-{ name => 'log_checkpoints', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
- short_desc => 'Logs each checkpoint.',
- variable => 'log_checkpoints',
- boot_val => 'true',
+{ name => 'checkpoint_flush_after', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
+ short_desc => 'Number of pages after which previously performed writes are flushed to disk.',
+ long_desc => '0 disables forced writeback.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'checkpoint_flush_after',
+ boot_val => 'DEFAULT_CHECKPOINT_FLUSH_AFTER',
+ min => '0',
+ max => 'WRITEBACK_MAX_PENDING_FLUSHES',
},
-{ name => 'trace_connection_negotiation', type => 'bool', context => 'PGC_POSTMASTER', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Logs details of pre-authentication connection handshake.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Trace_connection_negotiation',
- boot_val => 'false',
+{ name => 'checkpoint_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
+ short_desc => 'Sets the maximum time between automatic WAL checkpoints.',
+ flags => 'GUC_UNIT_S',
+ variable => 'CheckPointTimeout',
+ boot_val => '300',
+ min => '30',
+ max => '86400',
},
-{ name => 'log_disconnections', type => 'bool', context => 'PGC_SU_BACKEND', group => 'LOGGING_WHAT',
- short_desc => 'Logs end of a session, including duration.',
- variable => 'Log_disconnections',
- boot_val => 'false',
+{ name => 'checkpoint_warning', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
+ short_desc => 'Sets the maximum time before warning if checkpoints triggered by WAL volume happen too frequently.',
+ long_desc => 'Write a message to the server log if checkpoints caused by the filling of WAL segment files happen more frequently than this amount of time. 0 disables the warning.',
+ flags => 'GUC_UNIT_S',
+ variable => 'CheckPointWarning',
+ boot_val => '30',
+ min => '0',
+ max => 'INT_MAX',
},
-{ name => 'log_replication_commands', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
- short_desc => 'Logs each replication command.',
- variable => 'log_replication_commands',
- boot_val => 'false',
+{ name => 'client_connection_check_interval', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
+ short_desc => 'Sets the time interval between checks for disconnection while running queries.',
+ long_desc => '0 disables connection checks.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'client_connection_check_interval',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
+ check_hook => 'check_client_connection_check_interval',
},
-{ name => 'debug_assertions', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows whether the running server has assertion checks enabled.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'assert_enabled',
- boot_val => 'DEFAULT_ASSERT_ENABLED',
+{ name => 'client_encoding', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets the client\'s character set encoding.',
+ flags => 'GUC_IS_NAME | GUC_REPORT',
+ variable => 'client_encoding_string',
+ boot_val => '"SQL_ASCII"',
+ check_hook => 'check_client_encoding',
+ assign_hook => 'assign_client_encoding',
},
-{ name => 'exit_on_error', type => 'bool', context => 'PGC_USERSET', group => 'ERROR_HANDLING_OPTIONS',
- short_desc => 'Terminate session on any error.',
- variable => 'ExitOnAnyError',
- boot_val => 'false',
+{ name => 'client_min_messages', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the message levels that are sent to the client.',
+ long_desc => 'Each level includes all the levels that follow it. The later the level, the fewer messages are sent.',
+ variable => 'client_min_messages',
+ boot_val => 'NOTICE',
+ options => 'client_message_level_options',
},
-{ name => 'restart_after_crash', type => 'bool', context => 'PGC_SIGHUP', group => 'ERROR_HANDLING_OPTIONS',
- short_desc => 'Reinitialize server after backend crash.',
- variable => 'restart_after_crash',
- boot_val => 'true',
+{ name => 'cluster_name', type => 'string', context => 'PGC_POSTMASTER', group => 'PROCESS_TITLE',
+ short_desc => 'Sets the name of the cluster, which is included in the process title.',
+ flags => 'GUC_IS_NAME',
+ variable => 'cluster_name',
+ boot_val => '""',
+ check_hook => 'check_cluster_name',
},
-{ name => 'remove_temp_files_after_crash', type => 'bool', context => 'PGC_SIGHUP', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Remove temporary files after backend crash.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'remove_temp_files_after_crash',
- boot_val => 'true',
+# we have no microseconds designation, so can't supply units here
+{ name => 'commit_delay', type => 'int', context => 'PGC_SUSET', group => 'WAL_SETTINGS',
+ short_desc => 'Sets the delay in microseconds between transaction commit and flushing WAL to disk.',
+ variable => 'CommitDelay',
+ boot_val => '0',
+ min => '0',
+ max => '100000',
},
-{ name => 'send_abort_for_crash', type => 'bool', context => 'PGC_SIGHUP', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Send SIGABRT not SIGQUIT to child processes after backend crash.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'send_abort_for_crash',
- boot_val => 'false',
+{ name => 'commit_siblings', type => 'int', context => 'PGC_USERSET', group => 'WAL_SETTINGS',
+ short_desc => 'Sets the minimum number of concurrent open transactions required before performing "commit_delay".',
+ variable => 'CommitSiblings',
+ boot_val => '5',
+ min => '0',
+ max => '1000',
},
-{ name => 'send_abort_for_kill', type => 'bool', context => 'PGC_SIGHUP', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Send SIGABRT not SIGKILL to stuck child processes.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'send_abort_for_kill',
- boot_val => 'false',
+{ name => 'commit_timestamp_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the size of the dedicated buffer pool used for the commit timestamp cache.',
+ long_desc => '0 means use a fraction of "shared_buffers".',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'commit_timestamp_buffers',
+ boot_val => '0',
+ min => '0',
+ max => 'SLRU_MAX_ALLOWED_BUFFERS',
+ check_hook => 'check_commit_ts_buffers',
},
-{ name => 'log_duration', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
- short_desc => 'Logs the duration of each completed SQL statement.',
- variable => 'log_duration',
- boot_val => 'false',
+{ name => 'compute_query_id', type => 'enum', context => 'PGC_SUSET', group => 'STATS_MONITORING',
+ short_desc => 'Enables in-core computation of query identifiers.',
+ variable => 'compute_query_id',
+ boot_val => 'COMPUTE_QUERY_ID_AUTO',
+ options => 'compute_query_id_options',
},
-{ name => 'debug_copy_parse_plan_trees', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Set this to force all parse and plan trees to be passed through copyObject(), to facilitate catching errors and omissions in copyObject().',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Debug_copy_parse_plan_trees',
- boot_val => 'DEFAULT_DEBUG_COPY_PARSE_PLAN_TREES',
- ifdef => 'DEBUG_NODE_TESTS_ENABLED',
+{ name => 'config_file', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
+ short_desc => 'Sets the server\'s main configuration file.',
+ flags => 'GUC_DISALLOW_IN_FILE | GUC_SUPERUSER_ONLY',
+ variable => 'ConfigFileName',
+ boot_val => 'NULL',
},
-{ name => 'debug_write_read_parse_plan_trees', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Set this to force all parse and plan trees to be passed through outfuncs.c/readfuncs.c, to facilitate catching errors and omissions in those modules.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Debug_write_read_parse_plan_trees',
- boot_val => 'DEFAULT_DEBUG_READ_WRITE_PARSE_PLAN_TREES',
- ifdef => 'DEBUG_NODE_TESTS_ENABLED',
+{ name => 'constraint_exclusion', type => 'enum', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
+ short_desc => 'Enables the planner to use constraints to optimize queries.',
+ long_desc => 'Table scans will be skipped if their constraints guarantee that no rows match the query.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'constraint_exclusion',
+ boot_val => 'CONSTRAINT_EXCLUSION_PARTITION',
+ options => 'constraint_exclusion_options',
},
-{ name => 'debug_raw_expression_coverage_test', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Set this to force all raw parse trees for DML statements to be scanned by raw_expression_tree_walker(), to facilitate catching errors and omissions in that function.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Debug_raw_expression_coverage_test',
- boot_val => 'DEFAULT_DEBUG_RAW_EXPRESSION_COVERAGE_TEST',
- ifdef => 'DEBUG_NODE_TESTS_ENABLED',
+{ name => 'cpu_index_tuple_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the planner\'s estimate of the cost of processing each index entry during an index scan.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'cpu_index_tuple_cost',
+ boot_val => 'DEFAULT_CPU_INDEX_TUPLE_COST',
+ min => '0',
+ max => 'DBL_MAX',
},
-{ name => 'debug_print_raw_parse', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
- short_desc => 'Logs each query\'s raw parse tree.',
- variable => 'Debug_print_raw_parse',
- boot_val => 'false',
+{ name => 'cpu_operator_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the planner\'s estimate of the cost of processing each operator or function call.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'cpu_operator_cost',
+ boot_val => 'DEFAULT_CPU_OPERATOR_COST',
+ min => '0',
+ max => 'DBL_MAX',
},
-{ name => 'debug_print_parse', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
- short_desc => 'Logs each query\'s parse tree.',
- variable => 'Debug_print_parse',
- boot_val => 'false',
+{ name => 'cpu_tuple_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the planner\'s estimate of the cost of processing each tuple (row).',
+ flags => 'GUC_EXPLAIN',
+ variable => 'cpu_tuple_cost',
+ boot_val => 'DEFAULT_CPU_TUPLE_COST',
+ min => '0',
+ max => 'DBL_MAX',
},
-{ name => 'debug_print_rewritten', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
- short_desc => 'Logs each query\'s rewritten parse tree.',
- variable => 'Debug_print_rewritten',
- boot_val => 'false',
+{ name => 'createrole_self_grant', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets whether a CREATEROLE user automatically grants the role to themselves, and with which options.',
+ long_desc => 'An empty string disables automatic self grants.',
+ flags => 'GUC_LIST_INPUT',
+ variable => 'createrole_self_grant',
+ boot_val => '""',
+ check_hook => 'check_createrole_self_grant',
+ assign_hook => 'assign_createrole_self_grant',
},
-{ name => 'debug_print_plan', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
- short_desc => 'Logs each query\'s execution plan.',
- variable => 'Debug_print_plan',
- boot_val => 'false',
+{ name => 'cursor_tuple_fraction', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
+ short_desc => 'Sets the planner\'s estimate of the fraction of a cursor\'s rows that will be retrieved.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'cursor_tuple_fraction',
+ boot_val => 'DEFAULT_CURSOR_TUPLE_FRACTION',
+ min => '0.0',
+ max => '1.0',
},
-{ name => 'debug_pretty_print', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
- short_desc => 'Indents parse and plan tree displays.',
- variable => 'Debug_pretty_print',
- boot_val => 'true',
+{ name => 'data_checksums', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows whether data checksums are turned on for this cluster.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
+ variable => 'data_checksums',
+ boot_val => 'false',
},
-{ name => 'log_parser_stats', type => 'bool', context => 'PGC_SUSET', group => 'STATS_MONITORING',
- short_desc => 'Writes parser performance statistics to the server log.',
- variable => 'log_parser_stats',
- boot_val => 'false',
- check_hook => 'check_stage_log_stats',
+# Can't be set by ALTER SYSTEM as it can lead to recursive definition
+# of data_directory.
+{ name => 'data_directory', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
+ short_desc => 'Sets the server\'s data directory.',
+ flags => 'GUC_SUPERUSER_ONLY | GUC_DISALLOW_IN_AUTO_FILE',
+ variable => 'data_directory',
+ boot_val => 'NULL',
},
-{ name => 'log_planner_stats', type => 'bool', context => 'PGC_SUSET', group => 'STATS_MONITORING',
- short_desc => 'Writes planner performance statistics to the server log.',
- variable => 'log_planner_stats',
- boot_val => 'false',
- check_hook => 'check_stage_log_stats',
+{ name => 'data_directory_mode', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the mode of the data directory.',
+ long_desc => 'The parameter value is a numeric mode specification in the form accepted by the chmod and umask system calls. (To use the customary octal format the number must start with a 0 (zero).)',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
+ variable => 'data_directory_mode',
+ boot_val => '0700',
+ min => '0000',
+ max => '0777',
+ show_hook => 'show_data_directory_mode',
},
-{ name => 'log_executor_stats', type => 'bool', context => 'PGC_SUSET', group => 'STATS_MONITORING',
- short_desc => 'Writes executor performance statistics to the server log.',
- variable => 'log_executor_stats',
+{ name => 'data_sync_retry', type => 'bool', context => 'PGC_POSTMASTER', group => 'ERROR_HANDLING_OPTIONS',
+ short_desc => 'Whether to continue running after a failure to sync data files.',
+ variable => 'data_sync_retry',
boot_val => 'false',
- check_hook => 'check_stage_log_stats',
},
-{ name => 'log_statement_stats', type => 'bool', context => 'PGC_SUSET', group => 'STATS_MONITORING',
- short_desc => 'Writes cumulative performance statistics to the server log.',
- variable => 'log_statement_stats',
- boot_val => 'false',
- check_hook => 'check_log_stats',
+{ name => 'DateStyle', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets the display format for date and time values.',
+ long_desc => 'Also controls interpretation of ambiguous date inputs.',
+ flags => 'GUC_LIST_INPUT | GUC_REPORT',
+ variable => 'datestyle_string',
+ boot_val => '"ISO, MDY"',
+ check_hook => 'check_datestyle',
+ assign_hook => 'assign_datestyle',
},
-{ name => 'log_btree_build_stats', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Logs system resource usage statistics (memory and CPU) on various B-tree operations.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'log_btree_build_stats',
- boot_val => 'false',
- ifdef => 'BTREE_BUILD_STATS',
+# This is PGC_SUSET to prevent hiding from log_lock_waits.
+{ name => 'deadlock_timeout', type => 'int', context => 'PGC_SUSET', group => 'LOCK_MANAGEMENT',
+ short_desc => 'Sets the time to wait on a lock before checking for deadlock.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'DeadlockTimeout',
+ boot_val => '1000',
+ min => '1',
+ max => 'INT_MAX',
},
-{ name => 'track_activities', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
- short_desc => 'Collects information about executing commands.',
- long_desc => 'Enables the collection of information on the currently executing command of each session, along with the time at which that command began execution.',
- variable => 'pgstat_track_activities',
- boot_val => 'true',
+{ name => 'debug_assertions', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows whether the running server has assertion checks enabled.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'assert_enabled',
+ boot_val => 'DEFAULT_ASSERT_ENABLED',
},
-{ name => 'track_counts', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
- short_desc => 'Collects statistics on database activity.',
- variable => 'pgstat_track_counts',
- boot_val => 'true',
+{ name => 'debug_copy_parse_plan_trees', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Set this to force all parse and plan trees to be passed through copyObject(), to facilitate catching errors and omissions in copyObject().',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Debug_copy_parse_plan_trees',
+ boot_val => 'DEFAULT_DEBUG_COPY_PARSE_PLAN_TREES',
+ ifdef => 'DEBUG_NODE_TESTS_ENABLED',
},
-{ name => 'track_cost_delay_timing', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
- short_desc => 'Collects timing statistics for cost-based vacuum delay.',
- variable => 'track_cost_delay_timing',
+{ name => 'debug_deadlocks', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Dumps information about all current locks when a deadlock timeout occurs.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Debug_deadlocks',
boot_val => 'false',
+ ifdef => 'LOCK_DEBUG',
},
-{ name => 'track_io_timing', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
- short_desc => 'Collects timing statistics for database I/O activity.',
- variable => 'track_io_timing',
- boot_val => 'false',
+{ name => 'debug_discard_caches', type => 'int', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Aggressively flush system caches for debugging purposes.',
+ long_desc => '0 means use normal caching behavior.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'debug_discard_caches',
+ boot_val => 'DEFAULT_DEBUG_DISCARD_CACHES',
+ min => 'MIN_DEBUG_DISCARD_CACHES',
+ max => 'MAX_DEBUG_DISCARD_CACHES',
},
-{ name => 'track_wal_io_timing', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
- short_desc => 'Collects timing statistics for WAL I/O activity.',
- variable => 'track_wal_io_timing',
- boot_val => 'false',
+{ name => 'debug_io_direct', type => 'string', context => 'PGC_POSTMASTER', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Use direct I/O for file access.',
+ long_desc => 'An empty string disables direct I/O.',
+ flags => 'GUC_LIST_INPUT | GUC_NOT_IN_SAMPLE',
+ variable => 'debug_io_direct_string',
+ boot_val => '""',
+ check_hook => 'check_debug_io_direct',
+ assign_hook => 'assign_debug_io_direct',
},
-{ name => 'update_process_title', type => 'bool', context => 'PGC_SUSET', group => 'PROCESS_TITLE',
- short_desc => 'Updates the process title to show the active SQL command.',
- long_desc => 'Enables updating of the process title every time a new SQL command is received by the server.',
- variable => 'update_process_title',
- boot_val => 'DEFAULT_UPDATE_PROCESS_TITLE',
+{ name => 'debug_logical_replication_streaming', type => 'enum', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Forces immediate streaming or serialization of changes in large transactions.',
+ long_desc => 'On the publisher, it allows streaming or serializing each change in logical decoding. On the subscriber, it allows serialization of all changes to files and notifies the parallel apply workers to read and apply them at the end of the transaction.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'debug_logical_replication_streaming',
+ boot_val => 'DEBUG_LOGICAL_REP_STREAMING_BUFFERED',
+ options => 'debug_logical_replication_streaming_options',
},
-{ name => 'autovacuum', type => 'bool', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Starts the autovacuum subprocess.',
- variable => 'autovacuum_start_daemon',
- boot_val => 'true',
+{ name => 'debug_parallel_query', type => 'enum', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Forces the planner\'s use parallel query nodes.',
+ long_desc => 'This can be useful for testing the parallel query infrastructure by forcing the planner to generate plans that contain nodes that perform tuple communication between workers and the main process.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_EXPLAIN',
+ variable => 'debug_parallel_query',
+ boot_val => 'DEBUG_PARALLEL_OFF',
+ options => 'debug_parallel_query_options',
},
-{ name => 'trace_notify', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Generates debugging output for LISTEN and NOTIFY.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Trace_notify',
- boot_val => 'false',
+{ name => 'debug_pretty_print', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
+ short_desc => 'Indents parse and plan tree displays.',
+ variable => 'Debug_pretty_print',
+ boot_val => 'true',
},
-{ name => 'trace_locks', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Emits information about lock usage.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Trace_locks',
+{ name => 'debug_print_parse', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
+ short_desc => 'Logs each query\'s parse tree.',
+ variable => 'Debug_print_parse',
boot_val => 'false',
- ifdef => 'LOCK_DEBUG',
},
-{ name => 'trace_userlocks', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Emits information about user lock usage.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Trace_userlocks',
+{ name => 'debug_print_plan', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
+ short_desc => 'Logs each query\'s execution plan.',
+ variable => 'Debug_print_plan',
boot_val => 'false',
- ifdef => 'LOCK_DEBUG',
},
-{ name => 'trace_lwlocks', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Emits information about lightweight lock usage.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Trace_lwlocks',
+{ name => 'debug_print_raw_parse', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
+ short_desc => 'Logs each query\'s raw parse tree.',
+ variable => 'Debug_print_raw_parse',
boot_val => 'false',
- ifdef => 'LOCK_DEBUG',
},
-{ name => 'debug_deadlocks', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Dumps information about all current locks when a deadlock timeout occurs.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Debug_deadlocks',
+{ name => 'debug_print_rewritten', type => 'bool', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
+ short_desc => 'Logs each query\'s rewritten parse tree.',
+ variable => 'Debug_print_rewritten',
boot_val => 'false',
- ifdef => 'LOCK_DEBUG',
},
-{ name => 'log_lock_waits', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
- short_desc => 'Logs long lock waits.',
- variable => 'log_lock_waits',
- boot_val => 'true',
+{ name => 'debug_raw_expression_coverage_test', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Set this to force all raw parse trees for DML statements to be scanned by raw_expression_tree_walker(), to facilitate catching errors and omissions in that function.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Debug_raw_expression_coverage_test',
+ boot_val => 'DEFAULT_DEBUG_RAW_EXPRESSION_COVERAGE_TEST',
+ ifdef => 'DEBUG_NODE_TESTS_ENABLED',
},
-{ name => 'log_lock_failures', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
- short_desc => 'Logs lock failures.',
- variable => 'log_lock_failures',
- boot_val => 'false',
+{ name => 'debug_write_read_parse_plan_trees', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Set this to force all parse and plan trees to be passed through outfuncs.c/readfuncs.c, to facilitate catching errors and omissions in those modules.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Debug_write_read_parse_plan_trees',
+ boot_val => 'DEFAULT_DEBUG_READ_WRITE_PARSE_PLAN_TREES',
+ ifdef => 'DEBUG_NODE_TESTS_ENABLED',
},
-{ name => 'log_recovery_conflict_waits', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
- short_desc => 'Logs standby recovery conflict waits.',
- variable => 'log_recovery_conflict_waits',
- boot_val => 'false',
+{ name => 'default_statistics_target', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
+ short_desc => 'Sets the default statistics target.',
+ long_desc => 'This applies to table columns that have not had a column-specific target set via ALTER TABLE SET STATISTICS.',
+ variable => 'default_statistics_target',
+ boot_val => '100',
+ min => '1',
+ max => 'MAX_STATISTICS_TARGET',
},
-{ name => 'log_hostname', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
- short_desc => 'Logs the host name in the connection logs.',
- long_desc => 'By default, connection logs only show the IP address of the connecting host. If you want them to show the host name you can turn this on, but depending on your host name resolution setup it might impose a non-negligible performance penalty.',
- variable => 'log_hostname',
- boot_val => 'false',
+{ name => 'default_table_access_method', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the default table access method for new tables.',
+ flags => 'GUC_IS_NAME',
+ variable => 'default_table_access_method',
+ boot_val => 'DEFAULT_TABLE_ACCESS_METHOD',
+ check_hook => 'check_default_table_access_method',
},
-{ name => 'transform_null_equals', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_OTHER',
- short_desc => 'Treats "expr=NULL" as "expr IS NULL".',
- long_desc => 'When turned on, expressions of the form expr = NULL (or NULL = expr) are treated as expr IS NULL, that is, they return true if expr evaluates to the null value, and false otherwise. The correct behavior of expr = NULL is to always return null (unknown).',
- variable => 'Transform_null_equals',
- boot_val => 'false',
+{ name => 'default_tablespace', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the default tablespace to create tables and indexes in.',
+ long_desc => 'An empty string means use the database\'s default tablespace.',
+ flags => 'GUC_IS_NAME',
+ variable => 'default_tablespace',
+ boot_val => '""',
+ check_hook => 'check_default_tablespace',
},
-{ name => 'default_transaction_read_only', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the default read-only status of new transactions.',
- flags => 'GUC_REPORT',
- variable => 'DefaultXactReadOnly',
- boot_val => 'false',
+{ name => 'default_text_search_config', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets default text search configuration.',
+ variable => 'TSCurrentConfig',
+ boot_val => '"pg_catalog.simple"',
+ check_hook => 'check_default_text_search_config',
+ assign_hook => 'assign_default_text_search_config',
},
-{ name => 'transaction_read_only', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the current transaction\'s read-only status.',
- flags => 'GUC_NO_RESET | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'XactReadOnly',
- boot_val => 'false',
- check_hook => 'check_transaction_read_only',
+{ name => 'default_toast_compression', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the default compression method for compressible values.',
+ variable => 'default_toast_compression',
+ boot_val => 'TOAST_PGLZ_COMPRESSION',
+ options => 'default_toast_compression_options',
},
{ name => 'default_transaction_deferrable', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
@@ -623,32 +738,18 @@
boot_val => 'false',
},
-{ name => 'transaction_deferrable', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Whether to defer a read-only serializable transaction until it can be executed with no possible serialization failures.',
- flags => 'GUC_NO_RESET | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'XactDeferrable',
- boot_val => 'false',
- check_hook => 'check_transaction_deferrable',
-},
-
-{ name => 'row_security', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Enables row security.',
- long_desc => 'When enabled, row security will be applied to all users.',
- variable => 'row_security',
- boot_val => 'true',
-},
-
-{ name => 'check_function_bodies', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Check routine bodies during CREATE FUNCTION and CREATE PROCEDURE.',
- variable => 'check_function_bodies',
- boot_val => 'true',
+{ name => 'default_transaction_isolation', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the transaction isolation level of each new transaction.',
+ variable => 'DefaultXactIsoLevel',
+ boot_val => 'XACT_READ_COMMITTED',
+ options => 'isolation_level_options',
},
-{ name => 'array_nulls', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
- short_desc => 'Enables input of NULL elements in arrays.',
- long_desc => 'When turned on, unquoted NULL in an array input value means a null value; otherwise it is taken literally.',
- variable => 'Array_nulls',
- boot_val => 'true',
+{ name => 'default_transaction_read_only', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the default read-only status of new transactions.',
+ flags => 'GUC_REPORT',
+ variable => 'DefaultXactReadOnly',
+ boot_val => 'false',
},
# WITH OIDS support, and consequently default_with_oids, was removed
@@ -662,241 +763,228 @@
check_hook => 'check_default_with_oids',
},
-{ name => 'logging_collector', type => 'bool', context => 'PGC_POSTMASTER', group => 'LOGGING_WHERE',
- short_desc => 'Start a subprocess to capture stderr, csvlog and/or jsonlog into log files.',
- variable => 'Logging_collector',
- boot_val => 'false',
+{ name => 'dynamic_library_path', type => 'string', context => 'PGC_SUSET', group => 'CLIENT_CONN_OTHER',
+ short_desc => 'Sets the path for dynamically loadable modules.',
+ long_desc => 'If a dynamically loadable module needs to be opened and the specified name does not have a directory component (i.e., the name does not contain a slash), the system will search this path for the specified file.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'Dynamic_library_path',
+ boot_val => '"$libdir"',
},
-{ name => 'log_truncate_on_rotation', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Truncate existing log files of same name during log rotation.',
- variable => 'Log_truncate_on_rotation',
- boot_val => 'false',
+{ name => 'dynamic_shared_memory_type', type => 'enum', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Selects the dynamic shared memory implementation used.',
+ variable => 'dynamic_shared_memory_type',
+ boot_val => 'DEFAULT_DYNAMIC_SHARED_MEMORY_TYPE',
+ options => 'dynamic_shared_memory_options',
},
-{ name => 'trace_sort', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Emit information about resource usage in sorting.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'trace_sort',
- boot_val => 'false',
+{ name => 'effective_cache_size', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the planner\'s assumption about the total size of the data caches.',
+ long_desc => 'That is, the total size of the caches (kernel cache and shared buffers) used for PostgreSQL data files. This is measured in disk pages, which are normally 8 kB each.',
+ flags => 'GUC_UNIT_BLOCKS | GUC_EXPLAIN',
+ variable => 'effective_cache_size',
+ boot_val => 'DEFAULT_EFFECTIVE_CACHE_SIZE',
+ min => '1',
+ max => 'INT_MAX',
},
-# this is undocumented because not exposed in a standard build
-{ name => 'trace_syncscan', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Generate debugging output for synchronized scanning.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'trace_syncscan',
- boot_val => 'false',
- ifdef => 'TRACE_SYNCSCAN',
+{ name => 'effective_io_concurrency', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_IO',
+ short_desc => 'Number of simultaneous requests that can be handled efficiently by the disk subsystem.',
+ long_desc => '0 disables simultaneous requests.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'effective_io_concurrency',
+ boot_val => 'DEFAULT_EFFECTIVE_IO_CONCURRENCY',
+ min => '0',
+ max => 'MAX_IO_CONCURRENCY',
},
-# this is undocumented because not exposed in a standard build
-{ name => 'optimize_bounded_sort', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
- short_desc => 'Enables bounded sorting using heap sort.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_EXPLAIN',
- variable => 'optimize_bounded_sort',
+{ name => 'enable_async_append', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of async append plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_async_append',
boot_val => 'true',
- ifdef => 'DEBUG_BOUNDED_SORT',
},
-{ name => 'wal_debug', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Emit WAL-related debugging output.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'XLOG_DEBUG',
- boot_val => 'false',
- ifdef => 'WAL_DEBUG',
+{ name => 'enable_bitmapscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of bitmap-scan plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_bitmapscan',
+ boot_val => 'true',
},
-{ name => 'integer_datetimes', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows whether datetimes are integer based.',
- flags => 'GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'integer_datetimes',
+{ name => 'enable_distinct_reordering', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables reordering of DISTINCT keys.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_distinct_reordering',
boot_val => 'true',
},
-{ name => 'krb_caseins_users', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
- short_desc => 'Sets whether Kerberos and GSSAPI user names should be treated as case-insensitive.',
- variable => 'pg_krb_caseins_users',
- boot_val => 'false',
+{ name => 'enable_eager_aggregate', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables eager aggregation.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_eager_aggregate',
+ boot_val => 'true',
},
-{ name => 'gss_accept_delegation', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
- short_desc => 'Sets whether GSSAPI delegation should be accepted from the client.',
- variable => 'pg_gss_accept_delegation',
- boot_val => 'false',
+{ name => 'enable_gathermerge', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of gather merge plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_gathermerge',
+ boot_val => 'true',
},
-{ name => 'escape_string_warning', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
- short_desc => 'Warn about backslash escapes in ordinary string literals.',
- variable => 'escape_string_warning',
+{ name => 'enable_group_by_reordering', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables reordering of GROUP BY keys.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_group_by_reordering',
boot_val => 'true',
},
-{ name => 'standard_conforming_strings', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
- short_desc => 'Causes \'...\' strings to treat backslashes literally.',
- flags => 'GUC_REPORT',
- variable => 'standard_conforming_strings',
+{ name => 'enable_hashagg', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of hashed aggregation plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_hashagg',
boot_val => 'true',
},
-{ name => 'synchronize_seqscans', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
- short_desc => 'Enables synchronized sequential scans.',
- variable => 'synchronize_seqscans',
+{ name => 'enable_hashjoin', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of hash join plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_hashjoin',
boot_val => 'true',
},
-{ name => 'recovery_target_inclusive', type => 'bool', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
- short_desc => 'Sets whether to include or exclude transaction with recovery target.',
- variable => 'recoveryTargetInclusive',
+{ name => 'enable_incremental_sort', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of incremental sort steps.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_incremental_sort',
boot_val => 'true',
},
-{ name => 'summarize_wal', type => 'bool', context => 'PGC_SIGHUP', group => 'WAL_SUMMARIZATION',
- short_desc => 'Starts the WAL summarizer process to enable incremental backup.',
- variable => 'summarize_wal',
- boot_val => 'false',
+{ name => 'enable_indexonlyscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of index-only-scan plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_indexonlyscan',
+ boot_val => 'true',
},
-{ name => 'hot_standby', type => 'bool', context => 'PGC_POSTMASTER', group => 'REPLICATION_STANDBY',
- short_desc => 'Allows connections and queries during recovery.',
- variable => 'EnableHotStandby',
+{ name => 'enable_indexscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of index-scan plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_indexscan',
boot_val => 'true',
},
-{ name => 'hot_standby_feedback', type => 'bool', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Allows feedback from a hot standby to the primary that will avoid query conflicts.',
- variable => 'hot_standby_feedback',
- boot_val => 'false',
+{ name => 'enable_material', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of materialization.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_material',
+ boot_val => 'true',
},
-{ name => 'in_hot_standby', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows whether hot standby is currently active.',
- flags => 'GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'in_hot_standby_guc',
- boot_val => 'false',
- show_hook => 'show_in_hot_standby',
+{ name => 'enable_memoize', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of memoization.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_memoize',
+ boot_val => 'true',
},
-{ name => 'allow_system_table_mods', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Allows modifications of the structure of system tables.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'allowSystemTableMods',
- boot_val => 'false',
+{ name => 'enable_mergejoin', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of merge join plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_mergejoin',
+ boot_val => 'true',
},
-{ name => 'ignore_system_indexes', type => 'bool', context => 'PGC_BACKEND', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Disables reading from system indexes.',
- long_desc => 'It does not prevent updating the indexes, so it is safe to use. The worst consequence is slowness.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'IgnoreSystemIndexes',
- boot_val => 'false',
+{ name => 'enable_nestloop', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of nested-loop join plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_nestloop',
+ boot_val => 'true',
},
-{ name => 'allow_in_place_tablespaces', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Allows tablespaces directly inside pg_tblspc, for testing.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'allow_in_place_tablespaces',
- boot_val => 'false',
+{ name => 'enable_parallel_append', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of parallel append plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_parallel_append',
+ boot_val => 'true',
},
-{ name => 'lo_compat_privileges', type => 'bool', context => 'PGC_SUSET', group => 'COMPAT_OPTIONS_PREVIOUS',
- short_desc => 'Enables backward compatibility mode for privilege checks on large objects.',
- long_desc => 'Skips privilege checks when reading or modifying large objects, for compatibility with PostgreSQL releases prior to 9.0.',
- variable => 'lo_compat_privileges',
- boot_val => 'false',
+{ name => 'enable_parallel_hash', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of parallel hash plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_parallel_hash',
+ boot_val => 'true',
},
-{ name => 'quote_all_identifiers', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
- short_desc => 'When generating SQL fragments, quote all identifiers.',
- variable => 'quote_all_identifiers',
- boot_val => 'false',
+{ name => 'enable_partition_pruning', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables plan-time and execution-time partition pruning.',
+ long_desc => 'Allows the query planner and executor to compare partition bounds to conditions in the query to determine which partitions must be scanned.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_partition_pruning',
+ boot_val => 'true',
},
-{ name => 'data_checksums', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows whether data checksums are turned on for this cluster.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
- variable => 'data_checksums',
+{ name => 'enable_partitionwise_aggregate', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables partitionwise aggregation and grouping.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_partitionwise_aggregate',
boot_val => 'false',
},
-{ name => 'syslog_sequence_numbers', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Add sequence number to syslog messages to avoid duplicate suppression.',
- variable => 'syslog_sequence_numbers',
- boot_val => 'true',
+{ name => 'enable_partitionwise_join', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables partitionwise join.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_partitionwise_join',
+ boot_val => 'false',
},
-{ name => 'syslog_split_messages', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Split messages sent to syslog by lines and to fit into 1024 bytes.',
- variable => 'syslog_split_messages',
+{ name => 'enable_presorted_aggregate', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s ability to produce plans that provide presorted input for ORDER BY / DISTINCT aggregate functions.',
+ long_desc => 'Allows the query planner to build plans that provide presorted input for aggregate functions with an ORDER BY / DISTINCT clause. When disabled, implicit sorts are always performed during execution.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_presorted_aggregate',
boot_val => 'true',
},
-{ name => 'parallel_leader_participation', type => 'bool', context => 'PGC_USERSET', group => 'RESOURCES_WORKER_PROCESSES',
- short_desc => 'Controls whether Gather and Gather Merge also run subplans.',
- long_desc => 'Should gather nodes also run subplans or just gather tuples?',
+{ name => 'enable_self_join_elimination', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables removal of unique self-joins.',
flags => 'GUC_EXPLAIN',
- variable => 'parallel_leader_participation',
+ variable => 'enable_self_join_elimination',
boot_val => 'true',
},
-{ name => 'jit', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
- short_desc => 'Allow JIT compilation.',
+{ name => 'enable_seqscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of sequential-scan plans.',
flags => 'GUC_EXPLAIN',
- variable => 'jit_enabled',
+ variable => 'enable_seqscan',
boot_val => 'true',
},
-# This is not guaranteed to be available, but given it's a developer
-# oriented option, it doesn't seem worth adding code checking
-# availability.
-{ name => 'jit_debugging_support', type => 'bool', context => 'PGC_SU_BACKEND', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Register JIT-compiled functions with debugger.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'jit_debugging_support',
- boot_val => 'false',
-},
-
-{ name => 'jit_dump_bitcode', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Write out LLVM bitcode to facilitate JIT debugging.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'jit_dump_bitcode',
- boot_val => 'false',
-},
-
-{ name => 'jit_expressions', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Allow JIT compilation of expressions.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'jit_expressions',
+{ name => 'enable_sort', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of explicit sort steps.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_sort',
boot_val => 'true',
},
-# This is not guaranteed to be available, but given it's a developer
-# oriented option, it doesn't seem worth adding code checking
-# availability.
-{ name => 'jit_profiling_support', type => 'bool', context => 'PGC_SU_BACKEND', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Register JIT-compiled functions with perf profiler.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'jit_profiling_support',
- boot_val => 'false',
-},
-
-{ name => 'jit_tuple_deforming', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Allow JIT compilation of tuple deforming.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'jit_tuple_deforming',
+{ name => 'enable_tidscan', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables the planner\'s use of TID scan plans.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'enable_tidscan',
boot_val => 'true',
},
-{ name => 'data_sync_retry', type => 'bool', context => 'PGC_POSTMASTER', group => 'ERROR_HANDLING_OPTIONS',
- short_desc => 'Whether to continue running after a failure to sync data files.',
- variable => 'data_sync_retry',
- boot_val => 'false',
+{ name => 'escape_string_warning', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
+ short_desc => 'Warn about backslash escapes in ordinary string literals.',
+ variable => 'escape_string_warning',
+ boot_val => 'true',
},
-{ name => 'wal_receiver_create_temp_slot', type => 'bool', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets whether a WAL receiver should create a temporary replication slot if no permanent slot is configured.',
- variable => 'wal_receiver_create_temp_slot',
- boot_val => 'false',
+{ name => 'event_source', type => 'string', context => 'PGC_POSTMASTER', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the application name used to identify PostgreSQL messages in the event log.',
+ variable => 'event_source',
+ boot_val => 'DEFAULT_EVENT_SOURCE',
},
{ name => 'event_triggers', type => 'bool', context => 'PGC_SUSET', group => 'CLIENT_CONN_STATEMENT',
@@ -906,51 +994,42 @@
boot_val => 'true',
},
-{ name => 'sync_replication_slots', type => 'bool', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Enables a physical standby to synchronize logical failover replication slots from the primary server.',
- variable => 'sync_replication_slots',
+{ name => 'exit_on_error', type => 'bool', context => 'PGC_USERSET', group => 'ERROR_HANDLING_OPTIONS',
+ short_desc => 'Terminate session on any error.',
+ variable => 'ExitOnAnyError',
boot_val => 'false',
},
-{ name => 'md5_password_warnings', type => 'bool', context => 'PGC_USERSET', group => 'CONN_AUTH_AUTH',
- short_desc => 'Enables deprecation warnings for MD5 passwords.',
- variable => 'md5_password_warnings',
- boot_val => 'true',
-},
-
-{ name => 'vacuum_truncate', type => 'bool', context => 'PGC_USERSET', group => 'VACUUM_DEFAULT',
- short_desc => 'Enables vacuum to truncate empty pages at the end of the table.',
- variable => 'vacuum_truncate',
- boot_val => 'true',
+{ name => 'extension_control_path', type => 'string', context => 'PGC_SUSET', group => 'CLIENT_CONN_OTHER',
+ short_desc => 'Sets the path for extension control files.',
+ long_desc => 'The remaining extension script and secondary control files are then loaded from the same directory where the primary control file was found.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'Extension_control_path',
+ boot_val => '"$system"',
},
-{ name => 'archive_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVING',
- short_desc => 'Sets the amount of time to wait before forcing a switch to the next WAL file.',
- long_desc => '0 disables the timeout.',
- flags => 'GUC_UNIT_S',
- variable => 'XLogArchiveTimeout',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX / 2',
+{ name => 'external_pid_file', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
+ short_desc => 'Writes the postmaster PID to the specified file.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'external_pid_file',
+ boot_val => 'NULL',
+ check_hook => 'check_canonical_path',
},
-{ name => 'post_auth_delay', type => 'int', context => 'PGC_BACKEND', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Sets the amount of time to wait after authentication on connection startup.',
- long_desc => 'This allows attaching a debugger to the process.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_UNIT_S',
- variable => 'PostAuthDelay',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX / 1000000',
+{ name => 'extra_float_digits', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets the number of digits displayed for floating-point values.',
+ long_desc => 'This affects real, double precision, and geometric data types. A zero or negative parameter value is added to the standard number of digits (FLT_DIG or DBL_DIG as appropriate). Any value greater than zero selects precise output mode.',
+ variable => 'extra_float_digits',
+ boot_val => '1',
+ min => '-15',
+ max => '3',
},
-{ name => 'default_statistics_target', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
- short_desc => 'Sets the default statistics target.',
- long_desc => 'This applies to table columns that have not had a column-specific target set via ALTER TABLE SET STATISTICS.',
- variable => 'default_statistics_target',
- boot_val => '100',
- min => '1',
- max => 'MAX_STATISTICS_TARGET',
+{ name => 'file_copy_method', type => 'enum', context => 'PGC_USERSET', group => 'RESOURCES_DISK',
+ short_desc => 'Selects the file copy method.',
+ variable => 'file_copy_method',
+ boot_val => 'FILE_COPY_METHOD_COPY',
+ options => 'file_copy_method_options',
},
{ name => 'from_collapse_limit', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
@@ -963,23 +1042,26 @@
max => 'INT_MAX',
},
-{ name => 'join_collapse_limit', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
- short_desc => 'Sets the FROM-list size beyond which JOIN constructs are not flattened.',
- long_desc => 'The planner will flatten explicit JOIN constructs into lists of FROM items whenever a list of no more than this many items would result.',
- flags => 'GUC_EXPLAIN',
- variable => 'join_collapse_limit',
- boot_val => '8',
- min => '1',
- max => 'INT_MAX',
+{ name => 'fsync', type => 'bool', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
+ short_desc => 'Forces synchronization of updates to disk.',
+ long_desc => 'The server will use the fsync() system call in several places to make sure that updates are physically written to disk. This ensures that a database cluster will recover to a consistent state after an operating system or hardware crash.',
+ variable => 'enableFsync',
+ boot_val => 'true',
},
-{ name => 'geqo_threshold', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
- short_desc => 'Sets the threshold of FROM items beyond which GEQO is used.',
+{ name => 'full_page_writes', type => 'bool', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
+ short_desc => 'Writes full pages to WAL when first modified after a checkpoint.',
+ long_desc => 'A page write in process during an operating system crash might be only partially written to disk. During recovery, the row changes stored in WAL are not enough to recover. This option writes pages when first modified after a checkpoint to WAL so full recovery is possible.',
+ variable => 'fullPageWrites',
+ boot_val => 'true',
+},
+
+{ name => 'geqo', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
+ short_desc => 'Enables genetic query optimization.',
+ long_desc => 'This algorithm attempts to do planning without exhaustive searching.',
flags => 'GUC_EXPLAIN',
- variable => 'geqo_threshold',
- boot_val => '12',
- min => '2',
- max => 'INT_MAX',
+ variable => 'enable_geqo',
+ boot_val => 'true',
},
{ name => 'geqo_effort', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
@@ -991,433 +1073,438 @@
max => 'MAX_GEQO_EFFORT',
},
-{ name => 'geqo_pool_size', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
- short_desc => 'GEQO: number of individuals in the population.',
+{ name => 'geqo_generations', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
+ short_desc => 'GEQO: number of iterations of the algorithm.',
long_desc => '0 means use a suitable default value.',
flags => 'GUC_EXPLAIN',
- variable => 'Geqo_pool_size',
+ variable => 'Geqo_generations',
boot_val => '0',
min => '0',
max => 'INT_MAX',
},
-{ name => 'geqo_generations', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
- short_desc => 'GEQO: number of iterations of the algorithm.',
+{ name => 'geqo_pool_size', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
+ short_desc => 'GEQO: number of individuals in the population.',
long_desc => '0 means use a suitable default value.',
flags => 'GUC_EXPLAIN',
- variable => 'Geqo_generations',
+ variable => 'Geqo_pool_size',
boot_val => '0',
min => '0',
max => 'INT_MAX',
},
-# This is PGC_SUSET to prevent hiding from log_lock_waits.
-{ name => 'deadlock_timeout', type => 'int', context => 'PGC_SUSET', group => 'LOCK_MANAGEMENT',
- short_desc => 'Sets the time to wait on a lock before checking for deadlock.',
- flags => 'GUC_UNIT_MS',
- variable => 'DeadlockTimeout',
- boot_val => '1000',
- min => '1',
- max => 'INT_MAX',
+{ name => 'geqo_seed', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
+ short_desc => 'GEQO: seed for random path selection.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'Geqo_seed',
+ boot_val => '0.0',
+ min => '0.0',
+ max => '1.0',
},
-{ name => 'max_standby_archive_delay', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets the maximum delay before canceling queries when a hot standby server is processing archived WAL data.',
- long_desc => '-1 means wait forever.',
- flags => 'GUC_UNIT_MS',
- variable => 'max_standby_archive_delay',
- boot_val => '30 * 1000',
- min => '-1',
- max => 'INT_MAX',
+{ name => 'geqo_selection_bias', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
+ short_desc => 'GEQO: selective pressure within the population.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'Geqo_selection_bias',
+ boot_val => 'DEFAULT_GEQO_SELECTION_BIAS',
+ min => 'MIN_GEQO_SELECTION_BIAS',
+ max => 'MAX_GEQO_SELECTION_BIAS',
},
-{ name => 'max_standby_streaming_delay', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets the maximum delay before canceling queries when a hot standby server is processing streamed WAL data.',
- long_desc => '-1 means wait forever.',
- flags => 'GUC_UNIT_MS',
- variable => 'max_standby_streaming_delay',
- boot_val => '30 * 1000',
- min => '-1',
+{ name => 'geqo_threshold', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
+ short_desc => 'Sets the threshold of FROM items beyond which GEQO is used.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'geqo_threshold',
+ boot_val => '12',
+ min => '2',
max => 'INT_MAX',
},
-{ name => 'recovery_min_apply_delay', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets the minimum delay for applying changes during recovery.',
- flags => 'GUC_UNIT_MS',
- variable => 'recovery_min_apply_delay',
+{ name => 'gin_fuzzy_search_limit', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_OTHER',
+ short_desc => 'Sets the maximum allowed result for exact search by GIN.',
+ long_desc => '0 means no limit.',
+ variable => 'GinFuzzySearchLimit',
boot_val => '0',
min => '0',
max => 'INT_MAX',
},
-{ name => 'wal_receiver_status_interval', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets the maximum interval between WAL receiver status reports to the sending server.',
- flags => 'GUC_UNIT_S',
- variable => 'wal_receiver_status_interval',
- boot_val => '10',
- min => '0',
- max => 'INT_MAX / 1000',
-},
-
-{ name => 'wal_receiver_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets the maximum wait time to receive data from the sending server.',
- long_desc => '0 disables the timeout.',
- flags => 'GUC_UNIT_MS',
- variable => 'wal_receiver_timeout',
- boot_val => '60 * 1000',
- min => '0',
- max => 'INT_MAX',
+{ name => 'gin_pending_list_limit', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the maximum size of the pending list for GIN index.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'gin_pending_list_limit',
+ boot_val => '4096',
+ min => '64',
+ max => 'MAX_KILOBYTES',
},
-{ name => 'max_connections', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the maximum number of concurrent connections.',
- variable => 'MaxConnections',
- boot_val => '100',
- min => '1',
- max => 'MAX_BACKENDS',
+{ name => 'gss_accept_delegation', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
+ short_desc => 'Sets whether GSSAPI delegation should be accepted from the client.',
+ variable => 'pg_gss_accept_delegation',
+ boot_val => 'false',
},
-# see max_connections
-{ name => 'superuser_reserved_connections', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the number of connection slots reserved for superusers.',
- variable => 'SuperuserReservedConnections',
- boot_val => '3',
- min => '0',
- max => 'MAX_BACKENDS',
+{ name => 'hash_mem_multiplier', type => 'real', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
+ short_desc => 'Multiple of "work_mem" to use for hash tables.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'hash_mem_multiplier',
+ boot_val => '2.0',
+ min => '1.0',
+ max => '1000.0',
},
-{ name => 'reserved_connections', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the number of connection slots reserved for roles with privileges of pg_use_reserved_connections.',
- variable => 'ReservedConnections',
- boot_val => '0',
- min => '0',
- max => 'MAX_BACKENDS',
+{ name => 'hba_file', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
+ short_desc => 'Sets the server\'s "hba" configuration file.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'HbaFileName',
+ boot_val => 'NULL',
},
-{ name => 'min_dynamic_shared_memory', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Amount of dynamic shared memory reserved at startup.',
- flags => 'GUC_UNIT_MB',
- variable => 'min_dynamic_shared_memory',
- boot_val => '0',
- min => '0',
- max => '(int) Min((size_t) INT_MAX, SIZE_MAX / (1024 * 1024))',
+{ name => 'hot_standby', type => 'bool', context => 'PGC_POSTMASTER', group => 'REPLICATION_STANDBY',
+ short_desc => 'Allows connections and queries during recovery.',
+ variable => 'EnableHotStandby',
+ boot_val => 'true',
},
-# We sometimes multiply the number of shared buffers by two without
-# checking for overflow, so we mustn't allow more than INT_MAX / 2.
-{ name => 'shared_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the number of shared memory buffers used by the server.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'NBuffers',
- boot_val => '16384',
- min => '16',
- max => 'INT_MAX / 2',
+{ name => 'hot_standby_feedback', type => 'bool', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Allows feedback from a hot standby to the primary that will avoid query conflicts.',
+ variable => 'hot_standby_feedback',
+ boot_val => 'false',
},
-{ name => 'vacuum_buffer_usage_limit', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
- short_desc => 'Sets the buffer pool size for VACUUM, ANALYZE, and autovacuum.',
+{ name => 'huge_page_size', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'The size of huge page that should be requested.',
+ long_desc => '0 means use the system default.',
flags => 'GUC_UNIT_KB',
- variable => 'VacuumBufferUsageLimit',
- boot_val => '2048',
- min => '0',
- max => 'MAX_BAS_VAC_RING_SIZE_KB',
- check_hook => 'check_vacuum_buffer_usage_limit',
-},
-
-{ name => 'shared_memory_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the size of the server\'s main shared memory area (rounded up to the nearest MB).',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_UNIT_MB | GUC_RUNTIME_COMPUTED',
- variable => 'shared_memory_size_mb',
+ variable => 'huge_page_size',
boot_val => '0',
min => '0',
max => 'INT_MAX',
+ check_hook => 'check_huge_page_size',
},
-{ name => 'shared_memory_size_in_huge_pages', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the number of huge pages needed for the main shared memory area.',
- long_desc => '-1 means huge pages are not supported.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
- variable => 'shared_memory_size_in_huge_pages',
- boot_val => '-1',
- min => '-1',
- max => 'INT_MAX',
+{ name => 'huge_pages', type => 'enum', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Use of huge pages on Linux or Windows.',
+ variable => 'huge_pages',
+ boot_val => 'HUGE_PAGES_TRY',
+ options => 'huge_pages_options',
},
-{ name => 'num_os_semaphores', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the number of semaphores required for the server.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
- variable => 'num_os_semaphores',
+{ name => 'huge_pages_status', type => 'enum', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Indicates the status of huge pages.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'huge_pages_status',
+ boot_val => 'HUGE_PAGES_UNKNOWN',
+ options => 'huge_pages_status_options',
+},
+
+{ name => 'icu_validation_level', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Log level for reporting invalid ICU locale strings.',
+ variable => 'icu_validation_level',
+ boot_val => 'WARNING',
+ options => 'icu_validation_level_options',
+},
+
+{ name => 'ident_file', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
+ short_desc => 'Sets the server\'s "ident" configuration file.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'IdentFileName',
+ boot_val => 'NULL',
+},
+
+{ name => 'idle_in_transaction_session_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the maximum allowed idle time between queries, when in a transaction.',
+ long_desc => '0 disables the timeout.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'IdleInTransactionSessionTimeout',
boot_val => '0',
min => '0',
max => 'INT_MAX',
},
-{ name => 'commit_timestamp_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the size of the dedicated buffer pool used for the commit timestamp cache.',
- long_desc => '0 means use a fraction of "shared_buffers".',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'commit_timestamp_buffers',
+{ name => 'idle_replication_slot_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SENDING',
+ short_desc => 'Sets the duration a replication slot can remain idle before it is invalidated.',
+ flags => 'GUC_UNIT_S',
+ variable => 'idle_replication_slot_timeout_secs',
boot_val => '0',
min => '0',
- max => 'SLRU_MAX_ALLOWED_BUFFERS',
- check_hook => 'check_commit_ts_buffers',
+ max => 'INT_MAX',
},
-{ name => 'multixact_member_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the size of the dedicated buffer pool used for the MultiXact member cache.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'multixact_member_buffers',
- boot_val => '32',
- min => '16',
- max => 'SLRU_MAX_ALLOWED_BUFFERS',
- check_hook => 'check_multixact_member_buffers',
+{ name => 'idle_session_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the maximum allowed idle time between queries, when not in a transaction.',
+ long_desc => '0 disables the timeout.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'IdleSessionTimeout',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
},
-{ name => 'multixact_offset_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the size of the dedicated buffer pool used for the MultiXact offset cache.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'multixact_offset_buffers',
- boot_val => '16',
- min => '16',
- max => 'SLRU_MAX_ALLOWED_BUFFERS',
- check_hook => 'check_multixact_offset_buffers',
+{ name => 'ignore_checksum_failure', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Continues processing after a checksum failure.',
+ long_desc => 'Detection of a checksum failure normally causes PostgreSQL to report an error, aborting the current transaction. Setting ignore_checksum_failure to true causes the system to ignore the failure (but still report a warning), and continue processing. This behavior could cause crashes or other serious problems. Only has an effect if checksums are enabled.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'ignore_checksum_failure',
+ boot_val => 'false',
},
-{ name => 'notify_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the size of the dedicated buffer pool used for the LISTEN/NOTIFY message cache.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'notify_buffers',
- boot_val => '16',
- min => '16',
- max => 'SLRU_MAX_ALLOWED_BUFFERS',
- check_hook => 'check_notify_buffers',
+{ name => 'ignore_invalid_pages', type => 'bool', context => 'PGC_POSTMASTER', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Continues recovery after an invalid pages failure.',
+ long_desc => 'Detection of WAL records having references to invalid pages during recovery causes PostgreSQL to raise a PANIC-level error, aborting the recovery. Setting "ignore_invalid_pages" to true causes the system to ignore invalid page references in WAL records (but still report a warning), and continue recovery. This behavior may cause crashes, data loss, propagate or hide corruption, or other serious problems. Only has an effect during recovery or in standby mode.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'ignore_invalid_pages',
+ boot_val => 'false',
},
-{ name => 'serializable_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the size of the dedicated buffer pool used for the serializable transaction cache.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'serializable_buffers',
- boot_val => '32',
- min => '16',
- max => 'SLRU_MAX_ALLOWED_BUFFERS',
- check_hook => 'check_serial_buffers',
+{ name => 'ignore_system_indexes', type => 'bool', context => 'PGC_BACKEND', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Disables reading from system indexes.',
+ long_desc => 'It does not prevent updating the indexes, so it is safe to use. The worst consequence is slowness.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'IgnoreSystemIndexes',
+ boot_val => 'false',
},
-{ name => 'subtransaction_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the size of the dedicated buffer pool used for the subtransaction cache.',
- long_desc => '0 means use a fraction of "shared_buffers".',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'subtransaction_buffers',
- boot_val => '0',
- min => '0',
- max => 'SLRU_MAX_ALLOWED_BUFFERS',
- check_hook => 'check_subtrans_buffers',
+{ name => 'in_hot_standby', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows whether hot standby is currently active.',
+ flags => 'GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'in_hot_standby_guc',
+ boot_val => 'false',
+ show_hook => 'show_in_hot_standby',
},
-{ name => 'transaction_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the size of the dedicated buffer pool used for the transaction status cache.',
- long_desc => '0 means use a fraction of "shared_buffers".',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'transaction_buffers',
- boot_val => '0',
- min => '0',
- max => 'SLRU_MAX_ALLOWED_BUFFERS',
- check_hook => 'check_transaction_buffers',
+{ name => 'integer_datetimes', type => 'bool', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows whether datetimes are integer based.',
+ flags => 'GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'integer_datetimes',
+ boot_val => 'true',
},
-{ name => 'temp_buffers', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
- short_desc => 'Sets the maximum number of temporary buffers used by each session.',
- flags => 'GUC_UNIT_BLOCKS | GUC_EXPLAIN',
- variable => 'num_temp_buffers',
- boot_val => '1024',
- min => '100',
- max => 'INT_MAX / 2',
- check_hook => 'check_temp_buffers',
+{ name => 'IntervalStyle', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets the display format for interval values.',
+ flags => 'GUC_REPORT',
+ variable => 'IntervalStyle',
+ boot_val => 'INTSTYLE_POSTGRES',
+ options => 'intervalstyle_options',
},
-{ name => 'port', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the TCP port the server listens on.',
- variable => 'PostPortNumber',
- boot_val => 'DEF_PGPORT',
+{ name => 'io_combine_limit', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_IO',
+ short_desc => 'Limit on the size of data reads and writes.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'io_combine_limit_guc',
+ boot_val => 'DEFAULT_IO_COMBINE_LIMIT',
min => '1',
- max => '65535',
+ max => 'MAX_IO_COMBINE_LIMIT',
+ assign_hook => 'assign_io_combine_limit',
},
-{ name => 'unix_socket_permissions', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the access permissions of the Unix-domain socket.',
- long_desc => 'Unix-domain sockets use the usual Unix file system permission set. The parameter value is expected to be a numeric mode specification in the form accepted by the chmod and umask system calls. (To use the customary octal format the number must start with a 0 (zero).)',
- variable => 'Unix_socket_permissions',
- boot_val => '0777',
- min => '0000',
- max => '0777',
- show_hook => 'show_unix_socket_permissions',
+{ name => 'io_max_combine_limit', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_IO',
+ short_desc => 'Server-wide limit that clamps io_combine_limit.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'io_max_combine_limit',
+ boot_val => 'DEFAULT_IO_COMBINE_LIMIT',
+ min => '1',
+ max => 'MAX_IO_COMBINE_LIMIT',
+ assign_hook => 'assign_io_max_combine_limit',
},
-{ name => 'log_file_mode', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Sets the file permissions for log files.',
- long_desc => 'The parameter value is expected to be a numeric mode specification in the form accepted by the chmod and umask system calls. (To use the customary octal format the number must start with a 0 (zero).)',
- variable => 'Log_file_mode',
- boot_val => '0600',
- min => '0000',
- max => '0777',
- show_hook => 'show_log_file_mode',
+{ name => 'io_max_concurrency', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_IO',
+ short_desc => 'Max number of IOs that one process can execute simultaneously.',
+ variable => 'io_max_concurrency',
+ boot_val => '-1',
+ min => '-1',
+ max => '1024',
+ check_hook => 'check_io_max_concurrency',
},
-{ name => 'data_directory_mode', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the mode of the data directory.',
- long_desc => 'The parameter value is a numeric mode specification in the form accepted by the chmod and umask system calls. (To use the customary octal format the number must start with a 0 (zero).)',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
- variable => 'data_directory_mode',
- boot_val => '0700',
- min => '0000',
- max => '0777',
- show_hook => 'show_data_directory_mode',
+{ name => 'io_method', type => 'enum', context => 'PGC_POSTMASTER', group => 'RESOURCES_IO',
+ short_desc => 'Selects the method for executing asynchronous I/O.',
+ variable => 'io_method',
+ boot_val => 'DEFAULT_IO_METHOD',
+ options => 'io_method_options',
+ assign_hook => 'assign_io_method',
},
-{ name => 'work_mem', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
- short_desc => 'Sets the maximum memory to be used for query workspaces.',
- long_desc => 'This much memory can be used by each internal sort operation and hash table before switching to temporary disk files.',
- flags => 'GUC_UNIT_KB | GUC_EXPLAIN',
- variable => 'work_mem',
- boot_val => '4096',
- min => '64',
- max => 'MAX_KILOBYTES',
+{ name => 'io_workers', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_IO',
+ short_desc => 'Number of IO worker processes, for io_method=worker.',
+ variable => 'io_workers',
+ boot_val => '3',
+ min => '1',
+ max => 'MAX_IO_WORKERS',
},
-# Dynamic shared memory has a higher overhead than local memory
-# contexts, so when testing low-memory scenarios that could use shared
-# memory, the recommended minimum is 1MB.
-{ name => 'maintenance_work_mem', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
- short_desc => 'Sets the maximum memory to be used for maintenance operations.',
- long_desc => 'This includes operations such as VACUUM and CREATE INDEX.',
- flags => 'GUC_UNIT_KB',
- variable => 'maintenance_work_mem',
- boot_val => '65536',
- min => '64',
- max => 'MAX_KILOBYTES',
+# Not for general use --- used by SET SESSION AUTHORIZATION and SET
+# ROLE
+{ name => 'is_superuser', type => 'bool', context => 'PGC_INTERNAL', group => 'UNGROUPED',
+ short_desc => 'Shows whether the current user is a superuser.',
+ flags => 'GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_ALLOW_IN_PARALLEL',
+ variable => 'current_role_is_superuser',
+ boot_val => 'false',
},
-{ name => 'logical_decoding_work_mem', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
- short_desc => 'Sets the maximum memory to be used for logical decoding.',
- long_desc => 'This much memory can be used by each internal reorder buffer before spilling to disk.',
- flags => 'GUC_UNIT_KB',
- variable => 'logical_decoding_work_mem',
- boot_val => '65536',
- min => '64',
- max => 'MAX_KILOBYTES',
+{ name => 'jit', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
+ short_desc => 'Allow JIT compilation.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'jit_enabled',
+ boot_val => 'true',
},
-# We use the hopefully-safely-small value of 100kB as the compiled-in
-# default for max_stack_depth. InitializeGUCOptions will increase it
-# if possible, depending on the actual platform-specific stack limit.
-{ name => 'max_stack_depth', type => 'int', context => 'PGC_SUSET', group => 'RESOURCES_MEM',
- short_desc => 'Sets the maximum stack depth, in kilobytes.',
- flags => 'GUC_UNIT_KB',
- variable => 'max_stack_depth',
- boot_val => '100',
- min => '100',
- max => 'MAX_KILOBYTES',
- check_hook => 'check_max_stack_depth',
- assign_hook => 'assign_max_stack_depth',
-},
-
-{ name => 'temp_file_limit', type => 'int', context => 'PGC_SUSET', group => 'RESOURCES_DISK',
- short_desc => 'Limits the total size of all temporary files used by each process.',
- long_desc => '-1 means no limit.',
- flags => 'GUC_UNIT_KB',
- variable => 'temp_file_limit',
- boot_val => '-1',
+{ name => 'jit_above_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Perform JIT compilation if query is more expensive.',
+ long_desc => '-1 disables JIT compilation.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'jit_above_cost',
+ boot_val => '100000',
min => '-1',
- max => 'INT_MAX',
+ max => 'DBL_MAX',
},
-{ name => 'vacuum_cost_page_hit', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
- short_desc => 'Vacuum cost for a page found in the buffer cache.',
- variable => 'VacuumCostPageHit',
- boot_val => '1',
- min => '0',
- max => '10000',
+# This is not guaranteed to be available, but given it's a developer
+# oriented option, it doesn't seem worth adding code checking
+# availability.
+{ name => 'jit_debugging_support', type => 'bool', context => 'PGC_SU_BACKEND', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Register JIT-compiled functions with debugger.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'jit_debugging_support',
+ boot_val => 'false',
},
-{ name => 'vacuum_cost_page_miss', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
- short_desc => 'Vacuum cost for a page not found in the buffer cache.',
- variable => 'VacuumCostPageMiss',
- boot_val => '2',
- min => '0',
- max => '10000',
+{ name => 'jit_dump_bitcode', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Write out LLVM bitcode to facilitate JIT debugging.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'jit_dump_bitcode',
+ boot_val => 'false',
},
-{ name => 'vacuum_cost_page_dirty', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
- short_desc => 'Vacuum cost for a page dirtied by vacuum.',
- variable => 'VacuumCostPageDirty',
- boot_val => '20',
- min => '0',
- max => '10000',
+{ name => 'jit_expressions', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Allow JIT compilation of expressions.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'jit_expressions',
+ boot_val => 'true',
},
-{ name => 'vacuum_cost_limit', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
- short_desc => 'Vacuum cost amount available before napping.',
- variable => 'VacuumCostLimit',
- boot_val => '200',
- min => '1',
- max => '10000',
+{ name => 'jit_inline_above_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Perform JIT inlining if query is more expensive.',
+ long_desc => '-1 disables inlining.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'jit_inline_above_cost',
+ boot_val => '500000',
+ min => '-1',
+ max => 'DBL_MAX',
},
-{ name => 'autovacuum_vacuum_cost_limit', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Vacuum cost amount available before napping, for autovacuum.',
- long_desc => '-1 means use "vacuum_cost_limit".',
- variable => 'autovacuum_vac_cost_limit',
- boot_val => '-1',
+{ name => 'jit_optimize_above_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Optimize JIT-compiled functions if query is more expensive.',
+ long_desc => '-1 disables optimization.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'jit_optimize_above_cost',
+ boot_val => '500000',
min => '-1',
- max => '10000',
+ max => 'DBL_MAX',
},
-{ name => 'max_files_per_process', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_KERNEL',
- short_desc => 'Sets the maximum number of files each server process is allowed to open simultaneously.',
- variable => 'max_files_per_process',
- boot_val => '1000',
- min => '64',
- max => 'INT_MAX',
+# This is not guaranteed to be available, but given it's a developer
+# oriented option, it doesn't seem worth adding code checking
+# availability.
+{ name => 'jit_profiling_support', type => 'bool', context => 'PGC_SU_BACKEND', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Register JIT-compiled functions with perf profiler.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'jit_profiling_support',
+ boot_val => 'false',
},
-# See also CheckRequiredParameterValues() if this parameter changes
-{ name => 'max_prepared_transactions', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Sets the maximum number of simultaneously prepared transactions.',
- variable => 'max_prepared_xacts',
- boot_val => '0',
- min => '0',
- max => 'MAX_BACKENDS',
+{ name => 'jit_provider', type => 'string', context => 'PGC_POSTMASTER', group => 'CLIENT_CONN_PRELOAD',
+ short_desc => 'JIT provider to use.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'jit_provider',
+ boot_val => '"llvmjit"',
},
-{ name => 'trace_lock_oidmin', type => 'int', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Sets the minimum OID of tables for tracking locks.',
- long_desc => 'Is used to avoid output on system tables.',
+{ name => 'jit_tuple_deforming', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Allow JIT compilation of tuple deforming.',
flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Trace_lock_oidmin',
- boot_val => 'FirstNormalObjectId',
- min => '0',
- max => 'INT_MAX',
- ifdef => 'LOCK_DEBUG',
+ variable => 'jit_tuple_deforming',
+ boot_val => 'true',
},
-{ name => 'trace_lock_table', type => 'int', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Sets the OID of the table with unconditionally lock tracing.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'Trace_lock_table',
- boot_val => '0',
- min => '0',
+{ name => 'join_collapse_limit', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
+ short_desc => 'Sets the FROM-list size beyond which JOIN constructs are not flattened.',
+ long_desc => 'The planner will flatten explicit JOIN constructs into lists of FROM items whenever a list of no more than this many items would result.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'join_collapse_limit',
+ boot_val => '8',
+ min => '1',
max => 'INT_MAX',
- ifdef => 'LOCK_DEBUG',
},
-{ name => 'statement_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the maximum allowed duration of any statement.',
- long_desc => '0 disables the timeout.',
- flags => 'GUC_UNIT_MS',
- variable => 'StatementTimeout',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX',
+{ name => 'krb_caseins_users', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
+ short_desc => 'Sets whether Kerberos and GSSAPI user names should be treated as case-insensitive.',
+ variable => 'pg_krb_caseins_users',
+ boot_val => 'false',
+},
+
+{ name => 'krb_server_keyfile', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
+ short_desc => 'Sets the location of the Kerberos server key file.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'pg_krb_server_keyfile',
+ boot_val => 'PG_KRB_SRVTAB',
+},
+
+{ name => 'lc_messages', type => 'string', context => 'PGC_SUSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets the language in which messages are displayed.',
+ long_desc => 'An empty string means use the operating system setting.',
+ variable => 'locale_messages',
+ boot_val => '""',
+ check_hook => 'check_locale_messages',
+ assign_hook => 'assign_locale_messages',
+},
+
+{ name => 'lc_monetary', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets the locale for formatting monetary amounts.',
+ long_desc => 'An empty string means use the operating system setting.',
+ variable => 'locale_monetary',
+ boot_val => '"C"',
+ check_hook => 'check_locale_monetary',
+ assign_hook => 'assign_locale_monetary',
+},
+
+{ name => 'lc_numeric', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets the locale for formatting numbers.',
+ long_desc => 'An empty string means use the operating system setting.',
+ variable => 'locale_numeric',
+ boot_val => '"C"',
+ check_hook => 'check_locale_numeric',
+ assign_hook => 'assign_locale_numeric',
+},
+
+{ name => 'lc_time', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
+ short_desc => 'Sets the locale for formatting date and time values.',
+ long_desc => 'An empty string means use the operating system setting.',
+ variable => 'locale_time',
+ boot_val => '"C"',
+ check_hook => 'check_locale_time',
+ assign_hook => 'assign_locale_time',
+},
+
+{ name => 'listen_addresses', type => 'string', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the host name or IP address(es) to listen to.',
+ flags => 'GUC_LIST_INPUT',
+ variable => 'ListenAddresses',
+ boot_val => '"localhost"',
+},
+
+{ name => 'lo_compat_privileges', type => 'bool', context => 'PGC_SUSET', group => 'COMPAT_OPTIONS_PREVIOUS',
+ short_desc => 'Enables backward compatibility mode for privilege checks on large objects.',
+ long_desc => 'Skips privilege checks when reading or modifying large objects, for compatibility with PostgreSQL releases prior to 9.0.',
+ variable => 'lo_compat_privileges',
+ boot_val => 'false',
+},
+
+{ name => 'local_preload_libraries', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_PRELOAD',
+ short_desc => 'Lists unprivileged shared libraries to preload into each backend.',
+ flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE',
+ variable => 'local_preload_libraries_string',
+ boot_val => '""',
},
{ name => 'lock_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
@@ -1430,324 +1517,135 @@
max => 'INT_MAX',
},
-{ name => 'idle_in_transaction_session_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the maximum allowed idle time between queries, when in a transaction.',
- long_desc => '0 disables the timeout.',
+{ name => 'log_autoanalyze_min_duration', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
+ short_desc => 'Sets the minimum execution time above which analyze actions by autovacuum will be logged.',
+ long_desc => '-1 disables logging analyze actions by autovacuum. 0 means log all analyze actions by autovacuum.',
flags => 'GUC_UNIT_MS',
- variable => 'IdleInTransactionSessionTimeout',
- boot_val => '0',
- min => '0',
+ variable => 'Log_autoanalyze_min_duration',
+ boot_val => '600000',
+ min => '-1',
max => 'INT_MAX',
},
-{ name => 'transaction_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the maximum allowed duration of any transaction within a session (not a prepared transaction).',
- long_desc => '0 disables the timeout.',
+{ name => 'log_autovacuum_min_duration', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
+ short_desc => 'Sets the minimum execution time above which vacuum actions by autovacuum will be logged.',
+ long_desc => '-1 disables logging vacuum actions by autovacuum. 0 means log all vacuum actions by autovacuum.',
flags => 'GUC_UNIT_MS',
- variable => 'TransactionTimeout',
- boot_val => '0',
- min => '0',
+ variable => 'Log_autovacuum_min_duration',
+ boot_val => '600000',
+ min => '-1',
max => 'INT_MAX',
- assign_hook => 'assign_transaction_timeout',
},
-{ name => 'idle_session_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the maximum allowed idle time between queries, when not in a transaction.',
- long_desc => '0 disables the timeout.',
- flags => 'GUC_UNIT_MS',
- variable => 'IdleSessionTimeout',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX',
+{ name => 'log_btree_build_stats', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Logs system resource usage statistics (memory and CPU) on various B-tree operations.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'log_btree_build_stats',
+ boot_val => 'false',
+ ifdef => 'BTREE_BUILD_STATS',
},
-{ name => 'vacuum_freeze_min_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
- short_desc => 'Minimum age at which VACUUM should freeze a table row.',
- variable => 'vacuum_freeze_min_age',
- boot_val => '50000000',
- min => '0',
- max => '1000000000',
-},
-
-{ name => 'vacuum_freeze_table_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
- short_desc => 'Age at which VACUUM should scan whole table to freeze tuples.',
- variable => 'vacuum_freeze_table_age',
- boot_val => '150000000',
- min => '0',
- max => '2000000000',
-},
-
-{ name => 'vacuum_multixact_freeze_min_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
- short_desc => 'Minimum age at which VACUUM should freeze a MultiXactId in a table row.',
- variable => 'vacuum_multixact_freeze_min_age',
- boot_val => '5000000',
- min => '0',
- max => '1000000000',
-},
-
-{ name => 'vacuum_multixact_freeze_table_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
- short_desc => 'Multixact age at which VACUUM should scan whole table to freeze tuples.',
- variable => 'vacuum_multixact_freeze_table_age',
- boot_val => '150000000',
- min => '0',
- max => '2000000000',
-},
-
-{ name => 'vacuum_failsafe_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
- short_desc => 'Age at which VACUUM should trigger failsafe to avoid a wraparound outage.',
- variable => 'vacuum_failsafe_age',
- boot_val => '1600000000',
- min => '0',
- max => '2100000000',
-},
-
-{ name => 'vacuum_multixact_failsafe_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
- short_desc => 'Multixact age at which VACUUM should trigger failsafe to avoid a wraparound outage.',
- variable => 'vacuum_multixact_failsafe_age',
- boot_val => '1600000000',
- min => '0',
- max => '2100000000',
-},
-
-# See also CheckRequiredParameterValues() if this parameter changes
-{ name => 'max_locks_per_transaction', type => 'int', context => 'PGC_POSTMASTER', group => 'LOCK_MANAGEMENT',
- short_desc => 'Sets the maximum number of locks per transaction.',
- long_desc => 'The shared lock table is sized on the assumption that at most "max_locks_per_transaction" objects per server process or prepared transaction will need to be locked at any one time.',
- variable => 'max_locks_per_xact',
- boot_val => '64',
- min => '10',
- max => 'INT_MAX',
-},
-
-{ name => 'max_pred_locks_per_transaction', type => 'int', context => 'PGC_POSTMASTER', group => 'LOCK_MANAGEMENT',
- short_desc => 'Sets the maximum number of predicate locks per transaction.',
- long_desc => 'The shared predicate lock table is sized on the assumption that at most "max_pred_locks_per_transaction" objects per server process or prepared transaction will need to be locked at any one time.',
- variable => 'max_predicate_locks_per_xact',
- boot_val => '64',
- min => '10',
- max => 'INT_MAX',
-},
-
-{ name => 'max_pred_locks_per_relation', type => 'int', context => 'PGC_SIGHUP', group => 'LOCK_MANAGEMENT',
- short_desc => 'Sets the maximum number of predicate-locked pages and tuples per relation.',
- long_desc => 'If more than this total of pages and tuples in the same relation are locked by a connection, those locks are replaced by a relation-level lock.',
- variable => 'max_predicate_locks_per_relation',
- boot_val => '-2',
- min => 'INT_MIN',
- max => 'INT_MAX',
-},
-
-{ name => 'max_pred_locks_per_page', type => 'int', context => 'PGC_SIGHUP', group => 'LOCK_MANAGEMENT',
- short_desc => 'Sets the maximum number of predicate-locked tuples per page.',
- long_desc => 'If more than this number of tuples on the same page are locked by a connection, those locks are replaced by a page-level lock.',
- variable => 'max_predicate_locks_per_page',
- boot_val => '2',
- min => '0',
- max => 'INT_MAX',
-},
-
-{ name => 'authentication_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
- short_desc => 'Sets the maximum allowed time to complete client authentication.',
- flags => 'GUC_UNIT_S',
- variable => 'AuthenticationTimeout',
- boot_val => '60',
- min => '1',
- max => '600',
-},
-
-# Not for general use
-{ name => 'pre_auth_delay', type => 'int', context => 'PGC_SIGHUP', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Sets the amount of time to wait before authentication on connection startup.',
- long_desc => 'This allows attaching a debugger to the process.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_UNIT_S',
- variable => 'PreAuthDelay',
- boot_val => '0',
- min => '0',
- max => '60',
-},
-
-{ name => 'max_notify_queue_pages', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_DISK',
- short_desc => 'Sets the maximum number of allocated pages for NOTIFY / LISTEN queue.',
- variable => 'max_notify_queue_pages',
- boot_val => '1048576',
- min => '64',
- max => 'INT_MAX',
-},
-
-{ name => 'wal_decode_buffer_size', type => 'int', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY',
- short_desc => 'Buffer size for reading ahead in the WAL during recovery.',
- long_desc => 'Maximum distance to read ahead in the WAL to prefetch referenced data blocks.',
- flags => 'GUC_UNIT_BYTE',
- variable => 'wal_decode_buffer_size',
- boot_val => '512 * 1024',
- min => '64 * 1024',
- max => 'MaxAllocSize',
-},
-
-{ name => 'wal_keep_size', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SENDING',
- short_desc => 'Sets the size of WAL files held for standby servers.',
- flags => 'GUC_UNIT_MB',
- variable => 'wal_keep_size_mb',
- boot_val => '0',
- min => '0',
- max => 'MAX_KILOBYTES',
-},
-
-{ name => 'min_wal_size', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
- short_desc => 'Sets the minimum size to shrink the WAL to.',
- flags => 'GUC_UNIT_MB',
- variable => 'min_wal_size_mb',
- boot_val => 'DEFAULT_MIN_WAL_SEGS * (DEFAULT_XLOG_SEG_SIZE / (1024 * 1024))',
- min => '2',
- max => 'MAX_KILOBYTES',
-},
-
-{ name => 'max_wal_size', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
- short_desc => 'Sets the WAL size that triggers a checkpoint.',
- flags => 'GUC_UNIT_MB',
- variable => 'max_wal_size_mb',
- boot_val => 'DEFAULT_MAX_WAL_SEGS * (DEFAULT_XLOG_SEG_SIZE / (1024 * 1024))',
- min => '2',
- max => 'MAX_KILOBYTES',
- assign_hook => 'assign_max_wal_size',
-},
-
-{ name => 'checkpoint_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
- short_desc => 'Sets the maximum time between automatic WAL checkpoints.',
- flags => 'GUC_UNIT_S',
- variable => 'CheckPointTimeout',
- boot_val => '300',
- min => '30',
- max => '86400',
-},
-
-{ name => 'checkpoint_warning', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
- short_desc => 'Sets the maximum time before warning if checkpoints triggered by WAL volume happen too frequently.',
- long_desc => 'Write a message to the server log if checkpoints caused by the filling of WAL segment files happen more frequently than this amount of time. 0 disables the warning.',
- flags => 'GUC_UNIT_S',
- variable => 'CheckPointWarning',
- boot_val => '30',
- min => '0',
- max => 'INT_MAX',
-},
-
-{ name => 'checkpoint_flush_after', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
- short_desc => 'Number of pages after which previously performed writes are flushed to disk.',
- long_desc => '0 disables forced writeback.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'checkpoint_flush_after',
- boot_val => 'DEFAULT_CHECKPOINT_FLUSH_AFTER',
- min => '0',
- max => 'WRITEBACK_MAX_PENDING_FLUSHES',
+{ name => 'log_checkpoints', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
+ short_desc => 'Logs each checkpoint.',
+ variable => 'log_checkpoints',
+ boot_val => 'true',
},
-{ name => 'wal_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'WAL_SETTINGS',
- short_desc => 'Sets the number of disk-page buffers in shared memory for WAL.',
- long_desc => '-1 means use a fraction of "shared_buffers".',
- flags => 'GUC_UNIT_XBLOCKS',
- variable => 'XLOGbuffers',
- boot_val => '-1',
- min => '-1',
- max => '(INT_MAX / XLOG_BLCKSZ)',
- check_hook => 'check_wal_buffers',
+{ name => 'log_connections', type => 'string', context => 'PGC_SU_BACKEND', group => 'LOGGING_WHAT',
+ short_desc => 'Logs specified aspects of connection establishment and setup.',
+ flags => 'GUC_LIST_INPUT',
+ variable => 'log_connections_string',
+ boot_val => '""',
+ check_hook => 'check_log_connections',
+ assign_hook => 'assign_log_connections',
},
-{ name => 'wal_writer_delay', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
- short_desc => 'Time between WAL flushes performed in the WAL writer.',
- flags => 'GUC_UNIT_MS',
- variable => 'WalWriterDelay',
- boot_val => '200',
- min => '1',
- max => '10000',
+{ name => 'log_destination', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the destination for server log output.',
+ long_desc => 'Valid values are combinations of "stderr", "syslog", "csvlog", "jsonlog", and "eventlog", depending on the platform.',
+ flags => 'GUC_LIST_INPUT',
+ variable => 'Log_destination_string',
+ boot_val => '"stderr"',
+ check_hook => 'check_log_destination',
+ assign_hook => 'assign_log_destination',
},
-{ name => 'wal_writer_flush_after', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
- short_desc => 'Amount of WAL written out by WAL writer that triggers a flush.',
- flags => 'GUC_UNIT_XBLOCKS',
- variable => 'WalWriterFlushAfter',
- boot_val => 'DEFAULT_WAL_WRITER_FLUSH_AFTER',
- min => '0',
- max => 'INT_MAX',
+{ name => 'log_directory', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the destination directory for log files.',
+ long_desc => 'Can be specified as relative to the data directory or as absolute path.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'Log_directory',
+ boot_val => '"log"',
+ check_hook => 'check_canonical_path',
},
-{ name => 'wal_skip_threshold', type => 'int', context => 'PGC_USERSET', group => 'WAL_SETTINGS',
- short_desc => 'Minimum size of new file to fsync instead of writing WAL.',
- flags => 'GUC_UNIT_KB',
- variable => 'wal_skip_threshold',
- boot_val => '2048',
- min => '0',
- max => 'MAX_KILOBYTES',
+{ name => 'log_disconnections', type => 'bool', context => 'PGC_SU_BACKEND', group => 'LOGGING_WHAT',
+ short_desc => 'Logs end of a session, including duration.',
+ variable => 'Log_disconnections',
+ boot_val => 'false',
},
-{ name => 'max_wal_senders', type => 'int', context => 'PGC_POSTMASTER', group => 'REPLICATION_SENDING',
- short_desc => 'Sets the maximum number of simultaneously running WAL sender processes.',
- variable => 'max_wal_senders',
- boot_val => '10',
- min => '0',
- max => 'MAX_BACKENDS',
+{ name => 'log_duration', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
+ short_desc => 'Logs the duration of each completed SQL statement.',
+ variable => 'log_duration',
+ boot_val => 'false',
},
-/* see max_wal_senders */
-{ name => 'max_replication_slots', type => 'int', context => 'PGC_POSTMASTER', group => 'REPLICATION_SENDING',
- short_desc => 'Sets the maximum number of simultaneously defined replication slots.',
- variable => 'max_replication_slots',
- boot_val => '10',
- min => '0',
- max => 'MAX_BACKENDS /* XXX? */',
+{ name => 'log_error_verbosity', type => 'enum', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
+ short_desc => 'Sets the verbosity of logged messages.',
+ variable => 'Log_error_verbosity',
+ boot_val => 'PGERROR_DEFAULT',
+ options => 'log_error_verbosity_options',
},
-{ name => 'max_slot_wal_keep_size', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SENDING',
- short_desc => 'Sets the maximum WAL size that can be reserved by replication slots.',
- long_desc => 'Replication slots will be marked as failed, and segments released for deletion or recycling, if this much space is occupied by WAL on disk. -1 means no maximum.',
- flags => 'GUC_UNIT_MB',
- variable => 'max_slot_wal_keep_size_mb',
- boot_val => '-1',
- min => '-1',
- max => 'MAX_KILOBYTES',
+{ name => 'log_executor_stats', type => 'bool', context => 'PGC_SUSET', group => 'STATS_MONITORING',
+ short_desc => 'Writes executor performance statistics to the server log.',
+ variable => 'log_executor_stats',
+ boot_val => 'false',
+ check_hook => 'check_stage_log_stats',
},
-{ name => 'wal_sender_timeout', type => 'int', context => 'PGC_USERSET', group => 'REPLICATION_SENDING',
- short_desc => 'Sets the maximum time to wait for WAL replication.',
- flags => 'GUC_UNIT_MS',
- variable => 'wal_sender_timeout',
- boot_val => '60 * 1000',
- min => '0',
- max => 'INT_MAX',
+{ name => 'log_file_mode', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the file permissions for log files.',
+ long_desc => 'The parameter value is expected to be a numeric mode specification in the form accepted by the chmod and umask system calls. (To use the customary octal format the number must start with a 0 (zero).)',
+ variable => 'Log_file_mode',
+ boot_val => '0600',
+ min => '0000',
+ max => '0777',
+ show_hook => 'show_log_file_mode',
},
-{ name => 'idle_replication_slot_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SENDING',
- short_desc => 'Sets the duration a replication slot can remain idle before it is invalidated.',
- flags => 'GUC_UNIT_S',
- variable => 'idle_replication_slot_timeout_secs',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX',
+{ name => 'log_filename', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the file name pattern for log files.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'Log_filename',
+ boot_val => '"postgresql-%Y-%m-%d_%H%M%S.log"',
},
-# we have no microseconds designation, so can't supply units here
-{ name => 'commit_delay', type => 'int', context => 'PGC_SUSET', group => 'WAL_SETTINGS',
- short_desc => 'Sets the delay in microseconds between transaction commit and flushing WAL to disk.',
- variable => 'CommitDelay',
- boot_val => '0',
- min => '0',
- max => '100000',
+{ name => 'log_hostname', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
+ short_desc => 'Logs the host name in the connection logs.',
+ long_desc => 'By default, connection logs only show the IP address of the connecting host. If you want them to show the host name you can turn this on, but depending on your host name resolution setup it might impose a non-negligible performance penalty.',
+ variable => 'log_hostname',
+ boot_val => 'false',
},
-{ name => 'commit_siblings', type => 'int', context => 'PGC_USERSET', group => 'WAL_SETTINGS',
- short_desc => 'Sets the minimum number of concurrent open transactions required before performing "commit_delay".',
- variable => 'CommitSiblings',
- boot_val => '5',
- min => '0',
- max => '1000',
+{ name => 'log_line_prefix', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
+ short_desc => 'Controls information prefixed to each log line.',
+ long_desc => 'An empty string means no prefix.',
+ variable => 'Log_line_prefix',
+ boot_val => '"%m [%p] "',
},
-{ name => 'extra_float_digits', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets the number of digits displayed for floating-point values.',
- long_desc => 'This affects real, double precision, and geometric data types. A zero or negative parameter value is added to the standard number of digits (FLT_DIG or DBL_DIG as appropriate). Any value greater than zero selects precise output mode.',
- variable => 'extra_float_digits',
- boot_val => '1',
- min => '-15',
- max => '3',
+{ name => 'log_lock_failures', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
+ short_desc => 'Logs lock failures.',
+ variable => 'log_lock_failures',
+ boot_val => 'false',
+},
+
+{ name => 'log_lock_waits', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
+ short_desc => 'Logs long lock waits.',
+ variable => 'log_lock_waits',
+ boot_val => 'true',
},
{ name => 'log_min_duration_sample', type => 'int', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
@@ -1770,24 +1668,20 @@
max => 'INT_MAX',
},
-{ name => 'log_autovacuum_min_duration', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
- short_desc => 'Sets the minimum execution time above which vacuum actions by autovacuum will be logged.',
- long_desc => '-1 disables logging vacuum actions by autovacuum. 0 means log all vacuum actions by autovacuum.',
- flags => 'GUC_UNIT_MS',
- variable => 'Log_autovacuum_min_duration',
- boot_val => '600000',
- min => '-1',
- max => 'INT_MAX',
+{ name => 'log_min_error_statement', type => 'enum', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
+ short_desc => 'Causes all statements generating error at or above this level to be logged.',
+ long_desc => 'Each level includes all the levels that follow it. The later the level, the fewer messages are sent.',
+ variable => 'log_min_error_statement',
+ boot_val => 'ERROR',
+ options => 'server_message_level_options',
},
-{ name => 'log_autoanalyze_min_duration', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
- short_desc => 'Sets the minimum execution time above which analyze actions by autovacuum will be logged.',
- long_desc => '-1 disables logging analyze actions by autovacuum. 0 means log all analyze actions by autovacuum.',
- flags => 'GUC_UNIT_MS',
- variable => 'Log_autoanalyze_min_duration',
- boot_val => '600000',
- min => '-1',
- max => 'INT_MAX',
+{ name => 'log_min_messages', type => 'enum', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
+ short_desc => 'Sets the message levels that are logged.',
+ long_desc => 'Each level includes all the levels that follow it. The later the level, the fewer messages are sent.',
+ variable => 'log_min_messages',
+ boot_val => 'WARNING',
+ options => 'server_message_level_options',
},
{ name => 'log_parameter_max_length', type => 'int', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
@@ -1810,133 +1704,157 @@
max => 'INT_MAX / 2',
},
-{ name => 'bgwriter_delay', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_BGWRITER',
- short_desc => 'Background writer sleep time between rounds.',
- flags => 'GUC_UNIT_MS',
- variable => 'BgWriterDelay',
- boot_val => '200',
- min => '10',
- max => '10000',
+{ name => 'log_parser_stats', type => 'bool', context => 'PGC_SUSET', group => 'STATS_MONITORING',
+ short_desc => 'Writes parser performance statistics to the server log.',
+ variable => 'log_parser_stats',
+ boot_val => 'false',
+ check_hook => 'check_stage_log_stats',
},
-# Same upper limit as shared_buffers
-{ name => 'bgwriter_lru_maxpages', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_BGWRITER',
- short_desc => 'Background writer maximum number of LRU pages to flush per round.',
- long_desc => '0 disables background writing.',
- variable => 'bgwriter_lru_maxpages',
- boot_val => '100',
- min => '0',
- max => 'INT_MAX / 2',
+{ name => 'log_planner_stats', type => 'bool', context => 'PGC_SUSET', group => 'STATS_MONITORING',
+ short_desc => 'Writes planner performance statistics to the server log.',
+ variable => 'log_planner_stats',
+ boot_val => 'false',
+ check_hook => 'check_stage_log_stats',
},
-{ name => 'bgwriter_flush_after', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_BGWRITER',
- short_desc => 'Number of pages after which previously performed writes are flushed to disk.',
- long_desc => '0 disables forced writeback.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'bgwriter_flush_after',
- boot_val => 'DEFAULT_BGWRITER_FLUSH_AFTER',
+{ name => 'log_recovery_conflict_waits', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
+ short_desc => 'Logs standby recovery conflict waits.',
+ variable => 'log_recovery_conflict_waits',
+ boot_val => 'false',
+},
+
+{ name => 'log_replication_commands', type => 'bool', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
+ short_desc => 'Logs each replication command.',
+ variable => 'log_replication_commands',
+ boot_val => 'false',
+},
+
+{ name => 'log_rotation_age', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the amount of time to wait before forcing log file rotation.',
+ long_desc => '0 disables time-based creation of new log files.',
+ flags => 'GUC_UNIT_MIN',
+ variable => 'Log_RotationAge',
+ boot_val => 'HOURS_PER_DAY * MINS_PER_HOUR',
min => '0',
- max => 'WRITEBACK_MAX_PENDING_FLUSHES',
+ max => 'INT_MAX / SECS_PER_MINUTE',
},
-{ name => 'effective_io_concurrency', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_IO',
- short_desc => 'Number of simultaneous requests that can be handled efficiently by the disk subsystem.',
- long_desc => '0 disables simultaneous requests.',
- flags => 'GUC_EXPLAIN',
- variable => 'effective_io_concurrency',
- boot_val => 'DEFAULT_EFFECTIVE_IO_CONCURRENCY',
+{ name => 'log_rotation_size', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the maximum size a log file can reach before being rotated.',
+ long_desc => '0 disables size-based creation of new log files.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'Log_RotationSize',
+ boot_val => '10 * 1024',
min => '0',
- max => 'MAX_IO_CONCURRENCY',
+ max => 'INT_MAX',
},
-{ name => 'maintenance_io_concurrency', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_IO',
- short_desc => 'A variant of "effective_io_concurrency" that is used for maintenance work.',
- long_desc => '0 disables simultaneous requests.',
- flags => 'GUC_EXPLAIN',
- variable => 'maintenance_io_concurrency',
- boot_val => 'DEFAULT_MAINTENANCE_IO_CONCURRENCY',
+{ name => 'log_startup_progress_interval', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHEN',
+ short_desc => 'Time between progress updates for long-running startup operations.',
+ long_desc => '0 disables progress updates.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'log_startup_progress_interval',
+ boot_val => '10000',
min => '0',
- max => 'MAX_IO_CONCURRENCY',
- assign_hook => 'assign_maintenance_io_concurrency',
+ max => 'INT_MAX',
},
-{ name => 'io_max_combine_limit', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_IO',
- short_desc => 'Server-wide limit that clamps io_combine_limit.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'io_max_combine_limit',
- boot_val => 'DEFAULT_IO_COMBINE_LIMIT',
- min => '1',
- max => 'MAX_IO_COMBINE_LIMIT',
- assign_hook => 'assign_io_max_combine_limit',
+{ name => 'log_statement', type => 'enum', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
+ short_desc => 'Sets the type of statements logged.',
+ variable => 'log_statement',
+ boot_val => 'LOGSTMT_NONE',
+ options => 'log_statement_options',
},
-{ name => 'io_combine_limit', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_IO',
- short_desc => 'Limit on the size of data reads and writes.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'io_combine_limit_guc',
- boot_val => 'DEFAULT_IO_COMBINE_LIMIT',
- min => '1',
- max => 'MAX_IO_COMBINE_LIMIT',
- assign_hook => 'assign_io_combine_limit',
+{ name => 'log_statement_sample_rate', type => 'real', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
+ short_desc => 'Fraction of statements exceeding "log_min_duration_sample" to be logged.',
+ long_desc => 'Use a value between 0.0 (never log) and 1.0 (always log).',
+ variable => 'log_statement_sample_rate',
+ boot_val => '1.0',
+ min => '0.0',
+ max => '1.0',
},
-{ name => 'io_max_concurrency', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_IO',
- short_desc => 'Max number of IOs that one process can execute simultaneously.',
- variable => 'io_max_concurrency',
+{ name => 'log_statement_stats', type => 'bool', context => 'PGC_SUSET', group => 'STATS_MONITORING',
+ short_desc => 'Writes cumulative performance statistics to the server log.',
+ variable => 'log_statement_stats',
+ boot_val => 'false',
+ check_hook => 'check_log_stats',
+},
+
+{ name => 'log_temp_files', type => 'int', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
+ short_desc => 'Log the use of temporary files larger than this number of kilobytes.',
+ long_desc => '-1 disables logging temporary files. 0 means log all temporary files.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'log_temp_files',
boot_val => '-1',
min => '-1',
- max => '1024',
- check_hook => 'check_io_max_concurrency',
+ max => 'INT_MAX',
},
-{ name => 'io_workers', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_IO',
- short_desc => 'Number of IO worker processes, for io_method=worker.',
- variable => 'io_workers',
- boot_val => '3',
- min => '1',
- max => 'MAX_IO_WORKERS',
+{ name => 'log_timezone', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
+ short_desc => 'Sets the time zone to use in log messages.',
+ variable => 'log_timezone_string',
+ boot_val => '"GMT"',
+ check_hook => 'check_log_timezone',
+ assign_hook => 'assign_log_timezone',
+ show_hook => 'show_log_timezone',
},
-{ name => 'backend_flush_after', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_IO',
- short_desc => 'Number of pages after which previously performed writes are flushed to disk.',
- long_desc => '0 disables forced writeback.',
- flags => 'GUC_UNIT_BLOCKS',
- variable => 'backend_flush_after',
- boot_val => 'DEFAULT_BACKEND_FLUSH_AFTER',
- min => '0',
- max => 'WRITEBACK_MAX_PENDING_FLUSHES',
+{ name => 'log_transaction_sample_rate', type => 'real', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
+ short_desc => 'Sets the fraction of transactions from which to log all statements.',
+ long_desc => 'Use a value between 0.0 (never log) and 1.0 (log all statements for all transactions).',
+ variable => 'log_xact_sample_rate',
+ boot_val => '0.0',
+ min => '0.0',
+ max => '1.0',
},
-{ name => 'max_worker_processes', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_WORKER_PROCESSES',
- short_desc => 'Maximum number of concurrent worker processes.',
- variable => 'max_worker_processes',
- boot_val => '8',
- min => '0',
- max => 'MAX_BACKENDS',
+{ name => 'log_truncate_on_rotation', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Truncate existing log files of same name during log rotation.',
+ variable => 'Log_truncate_on_rotation',
+ boot_val => 'false',
},
-{ name => 'max_logical_replication_workers', type => 'int', context => 'PGC_POSTMASTER', group => 'REPLICATION_SUBSCRIBERS',
- short_desc => 'Maximum number of logical replication worker processes.',
- variable => 'max_logical_replication_workers',
- boot_val => '4',
- min => '0',
- max => 'MAX_BACKENDS',
+{ name => 'logging_collector', type => 'bool', context => 'PGC_POSTMASTER', group => 'LOGGING_WHERE',
+ short_desc => 'Start a subprocess to capture stderr, csvlog and/or jsonlog into log files.',
+ variable => 'Logging_collector',
+ boot_val => 'false',
},
-{ name => 'max_sync_workers_per_subscription', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SUBSCRIBERS',
- short_desc => 'Maximum number of table synchronization workers per subscription.',
- variable => 'max_sync_workers_per_subscription',
- boot_val => '2',
- min => '0',
- max => 'MAX_BACKENDS',
+{ name => 'logical_decoding_work_mem', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the maximum memory to be used for logical decoding.',
+ long_desc => 'This much memory can be used by each internal reorder buffer before spilling to disk.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'logical_decoding_work_mem',
+ boot_val => '65536',
+ min => '64',
+ max => 'MAX_KILOBYTES',
},
-{ name => 'max_parallel_apply_workers_per_subscription', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SUBSCRIBERS',
- short_desc => 'Maximum number of parallel apply workers per subscription.',
- variable => 'max_parallel_apply_workers_per_subscription',
- boot_val => '2',
+{ name => 'maintenance_io_concurrency', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_IO',
+ short_desc => 'A variant of "effective_io_concurrency" that is used for maintenance work.',
+ long_desc => '0 disables simultaneous requests.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'maintenance_io_concurrency',
+ boot_val => 'DEFAULT_MAINTENANCE_IO_CONCURRENCY',
min => '0',
- max => 'MAX_PARALLEL_WORKER_LIMIT',
+ max => 'MAX_IO_CONCURRENCY',
+ assign_hook => 'assign_maintenance_io_concurrency',
+},
+
+# Dynamic shared memory has a higher overhead than local memory
+# contexts, so when testing low-memory scenarios that could use shared
+# memory, the recommended minimum is 1MB.
+{ name => 'maintenance_work_mem', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the maximum memory to be used for maintenance operations.',
+ long_desc => 'This includes operations such as VACUUM and CREATE INDEX.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'maintenance_work_mem',
+ boot_val => '65536',
+ min => '64',
+ max => 'MAX_KILOBYTES',
},
{ name => 'max_active_replication_origins', type => 'int', context => 'PGC_POSTMASTER', group => 'REPLICATION_SUBSCRIBERS',
@@ -1947,23 +1865,19 @@
max => 'MAX_BACKENDS',
},
-{ name => 'log_rotation_age', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Sets the amount of time to wait before forcing log file rotation.',
- long_desc => '0 disables time-based creation of new log files.',
- flags => 'GUC_UNIT_MIN',
- variable => 'Log_RotationAge',
- boot_val => 'HOURS_PER_DAY * MINS_PER_HOUR',
- min => '0',
- max => 'INT_MAX / SECS_PER_MINUTE',
+{ name => 'max_connections', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the maximum number of concurrent connections.',
+ variable => 'MaxConnections',
+ boot_val => '100',
+ min => '1',
+ max => 'MAX_BACKENDS',
},
-{ name => 'log_rotation_size', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Sets the maximum size a log file can reach before being rotated.',
- long_desc => '0 disables size-based creation of new log files.',
- flags => 'GUC_UNIT_KB',
- variable => 'Log_RotationSize',
- boot_val => '10 * 1024',
- min => '0',
+{ name => 'max_files_per_process', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_KERNEL',
+ short_desc => 'Sets the maximum number of files each server process is allowed to open simultaneously.',
+ variable => 'max_files_per_process',
+ boot_val => '1000',
+ min => '64',
max => 'INT_MAX',
},
@@ -1976,15 +1890,6 @@
max => 'FUNC_MAX_ARGS',
},
-{ name => 'max_index_keys', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the maximum number of index keys.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'max_index_keys',
- boot_val => 'INDEX_MAX_KEYS',
- min => 'INDEX_MAX_KEYS',
- max => 'INDEX_MAX_KEYS',
-},
-
{ name => 'max_identifier_length', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
short_desc => 'Shows the maximum identifier length.',
flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
@@ -1994,239 +1899,230 @@
max => 'NAMEDATALEN - 1',
},
-{ name => 'block_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the size of a disk block.',
+{ name => 'max_index_keys', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the maximum number of index keys.',
flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'block_size',
- boot_val => 'BLCKSZ',
- min => 'BLCKSZ',
- max => 'BLCKSZ',
+ variable => 'max_index_keys',
+ boot_val => 'INDEX_MAX_KEYS',
+ min => 'INDEX_MAX_KEYS',
+ max => 'INDEX_MAX_KEYS',
},
-{ name => 'segment_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the number of pages per disk file.',
- flags => 'GUC_UNIT_BLOCKS | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'segment_size',
- boot_val => 'RELSEG_SIZE',
- min => 'RELSEG_SIZE',
- max => 'RELSEG_SIZE',
+# See also CheckRequiredParameterValues() if this parameter changes
+{ name => 'max_locks_per_transaction', type => 'int', context => 'PGC_POSTMASTER', group => 'LOCK_MANAGEMENT',
+ short_desc => 'Sets the maximum number of locks per transaction.',
+ long_desc => 'The shared lock table is sized on the assumption that at most "max_locks_per_transaction" objects per server process or prepared transaction will need to be locked at any one time.',
+ variable => 'max_locks_per_xact',
+ boot_val => '64',
+ min => '10',
+ max => 'INT_MAX',
},
-{ name => 'wal_block_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the block size in the write ahead log.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'wal_block_size',
- boot_val => 'XLOG_BLCKSZ',
- min => 'XLOG_BLCKSZ',
- max => 'XLOG_BLCKSZ',
+{ name => 'max_logical_replication_workers', type => 'int', context => 'PGC_POSTMASTER', group => 'REPLICATION_SUBSCRIBERS',
+ short_desc => 'Maximum number of logical replication worker processes.',
+ variable => 'max_logical_replication_workers',
+ boot_val => '4',
+ min => '0',
+ max => 'MAX_BACKENDS',
},
-{ name => 'wal_retrieve_retry_interval', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets the time to wait before retrying to retrieve WAL after a failed attempt.',
- flags => 'GUC_UNIT_MS',
- variable => 'wal_retrieve_retry_interval',
- boot_val => '5000',
- min => '1',
+{ name => 'max_notify_queue_pages', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_DISK',
+ short_desc => 'Sets the maximum number of allocated pages for NOTIFY / LISTEN queue.',
+ variable => 'max_notify_queue_pages',
+ boot_val => '1048576',
+ min => '64',
max => 'INT_MAX',
},
-{ name => 'wal_segment_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the size of write ahead log segments.',
- flags => 'GUC_UNIT_BYTE | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
- variable => 'wal_segment_size',
- boot_val => 'DEFAULT_XLOG_SEG_SIZE',
- min => 'WalSegMinSize',
- max => 'WalSegMaxSize',
- check_hook => 'check_wal_segment_size',
+{ name => 'max_parallel_apply_workers_per_subscription', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SUBSCRIBERS',
+ short_desc => 'Maximum number of parallel apply workers per subscription.',
+ variable => 'max_parallel_apply_workers_per_subscription',
+ boot_val => '2',
+ min => '0',
+ max => 'MAX_PARALLEL_WORKER_LIMIT',
},
-{ name => 'wal_summary_keep_time', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_SUMMARIZATION',
- short_desc => 'Time for which WAL summary files should be kept.',
- long_desc => '0 disables automatic summary file deletion.',
- flags => 'GUC_UNIT_MIN',
- variable => 'wal_summary_keep_time',
- boot_val => '10 * HOURS_PER_DAY * MINS_PER_HOUR /* 10 days */',
+{ name => 'max_parallel_maintenance_workers', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_WORKER_PROCESSES',
+ short_desc => 'Sets the maximum number of parallel processes per maintenance operation.',
+ variable => 'max_parallel_maintenance_workers',
+ boot_val => '2',
min => '0',
- max => 'INT_MAX / SECS_PER_MINUTE',
+ max => 'MAX_PARALLEL_WORKER_LIMIT',
},
-{ name => 'autovacuum_naptime', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Time to sleep between autovacuum runs.',
- flags => 'GUC_UNIT_S',
- variable => 'autovacuum_naptime',
- boot_val => '60',
- min => '1',
- max => 'INT_MAX / 1000',
+{ name => 'max_parallel_workers', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_WORKER_PROCESSES',
+ short_desc => 'Sets the maximum number of parallel workers that can be active at one time.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'max_parallel_workers',
+ boot_val => '8',
+ min => '0',
+ max => 'MAX_PARALLEL_WORKER_LIMIT',
},
-{ name => 'autovacuum_vacuum_threshold', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Minimum number of tuple updates or deletes prior to vacuum.',
- variable => 'autovacuum_vac_thresh',
- boot_val => '50',
+{ name => 'max_parallel_workers_per_gather', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_WORKER_PROCESSES',
+ short_desc => 'Sets the maximum number of parallel processes per executor node.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'max_parallel_workers_per_gather',
+ boot_val => '2',
+ min => '0',
+ max => 'MAX_PARALLEL_WORKER_LIMIT',
+},
+
+{ name => 'max_pred_locks_per_page', type => 'int', context => 'PGC_SIGHUP', group => 'LOCK_MANAGEMENT',
+ short_desc => 'Sets the maximum number of predicate-locked tuples per page.',
+ long_desc => 'If more than this number of tuples on the same page are locked by a connection, those locks are replaced by a page-level lock.',
+ variable => 'max_predicate_locks_per_page',
+ boot_val => '2',
min => '0',
max => 'INT_MAX',
},
-{ name => 'autovacuum_vacuum_max_threshold', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Maximum number of tuple updates or deletes prior to vacuum.',
- long_desc => '-1 disables the maximum threshold.',
- variable => 'autovacuum_vac_max_thresh',
- boot_val => '100000000',
- min => '-1',
+{ name => 'max_pred_locks_per_relation', type => 'int', context => 'PGC_SIGHUP', group => 'LOCK_MANAGEMENT',
+ short_desc => 'Sets the maximum number of predicate-locked pages and tuples per relation.',
+ long_desc => 'If more than this total of pages and tuples in the same relation are locked by a connection, those locks are replaced by a relation-level lock.',
+ variable => 'max_predicate_locks_per_relation',
+ boot_val => '-2',
+ min => 'INT_MIN',
max => 'INT_MAX',
},
-{ name => 'autovacuum_vacuum_insert_threshold', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Minimum number of tuple inserts prior to vacuum.',
- long_desc => '-1 disables insert vacuums.',
- variable => 'autovacuum_vac_ins_thresh',
- boot_val => '1000',
- min => '-1',
+{ name => 'max_pred_locks_per_transaction', type => 'int', context => 'PGC_POSTMASTER', group => 'LOCK_MANAGEMENT',
+ short_desc => 'Sets the maximum number of predicate locks per transaction.',
+ long_desc => 'The shared predicate lock table is sized on the assumption that at most "max_pred_locks_per_transaction" objects per server process or prepared transaction will need to be locked at any one time.',
+ variable => 'max_predicate_locks_per_xact',
+ boot_val => '64',
+ min => '10',
max => 'INT_MAX',
},
-{ name => 'autovacuum_analyze_threshold', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Minimum number of tuple inserts, updates, or deletes prior to analyze.',
- variable => 'autovacuum_anl_thresh',
- boot_val => '50',
+# See also CheckRequiredParameterValues() if this parameter changes
+{ name => 'max_prepared_transactions', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the maximum number of simultaneously prepared transactions.',
+ variable => 'max_prepared_xacts',
+ boot_val => '0',
min => '0',
- max => 'INT_MAX',
+ max => 'MAX_BACKENDS',
},
-# see varsup.c for why this is PGC_POSTMASTER not PGC_SIGHUP
-# see vacuum_failsafe_age if you change the upper-limit value.
-{ name => 'autovacuum_freeze_max_age', type => 'int', context => 'PGC_POSTMASTER', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Age at which to autovacuum a table to prevent transaction ID wraparound.',
- variable => 'autovacuum_freeze_max_age',
- boot_val => '200000000',
- min => '100000',
- max => '2000000000',
+/* see max_wal_senders */
+{ name => 'max_replication_slots', type => 'int', context => 'PGC_POSTMASTER', group => 'REPLICATION_SENDING',
+ short_desc => 'Sets the maximum number of simultaneously defined replication slots.',
+ variable => 'max_replication_slots',
+ boot_val => '10',
+ min => '0',
+ max => 'MAX_BACKENDS /* XXX? */',
},
-# see multixact.c for why this is PGC_POSTMASTER not PGC_SIGHUP
-{ name => 'autovacuum_multixact_freeze_max_age', type => 'int', context => 'PGC_POSTMASTER', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Multixact age at which to autovacuum a table to prevent multixact wraparound.',
- variable => 'autovacuum_multixact_freeze_max_age',
- boot_val => '400000000',
- min => '10000',
- max => '2000000000',
+{ name => 'max_slot_wal_keep_size', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SENDING',
+ short_desc => 'Sets the maximum WAL size that can be reserved by replication slots.',
+ long_desc => 'Replication slots will be marked as failed, and segments released for deletion or recycling, if this much space is occupied by WAL on disk. -1 means no maximum.',
+ flags => 'GUC_UNIT_MB',
+ variable => 'max_slot_wal_keep_size_mb',
+ boot_val => '-1',
+ min => '-1',
+ max => 'MAX_KILOBYTES',
},
-# see max_connections
-{ name => 'autovacuum_worker_slots', type => 'int', context => 'PGC_POSTMASTER', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Sets the number of backend slots to allocate for autovacuum workers.',
- variable => 'autovacuum_worker_slots',
- boot_val => '16',
- min => '1',
- max => 'MAX_BACKENDS',
+# We use the hopefully-safely-small value of 100kB as the compiled-in
+# default for max_stack_depth. InitializeGUCOptions will increase it
+# if possible, depending on the actual platform-specific stack limit.
+{ name => 'max_stack_depth', type => 'int', context => 'PGC_SUSET', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the maximum stack depth, in kilobytes.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'max_stack_depth',
+ boot_val => '100',
+ min => '100',
+ max => 'MAX_KILOBYTES',
+ check_hook => 'check_max_stack_depth',
+ assign_hook => 'assign_max_stack_depth',
},
-{ name => 'autovacuum_max_workers', type => 'int', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Sets the maximum number of simultaneously running autovacuum worker processes.',
- variable => 'autovacuum_max_workers',
- boot_val => '3',
- min => '1',
- max => 'MAX_BACKENDS',
+{ name => 'max_standby_archive_delay', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets the maximum delay before canceling queries when a hot standby server is processing archived WAL data.',
+ long_desc => '-1 means wait forever.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'max_standby_archive_delay',
+ boot_val => '30 * 1000',
+ min => '-1',
+ max => 'INT_MAX',
},
-{ name => 'max_parallel_maintenance_workers', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_WORKER_PROCESSES',
- short_desc => 'Sets the maximum number of parallel processes per maintenance operation.',
- variable => 'max_parallel_maintenance_workers',
- boot_val => '2',
- min => '0',
- max => 'MAX_PARALLEL_WORKER_LIMIT',
+{ name => 'max_standby_streaming_delay', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets the maximum delay before canceling queries when a hot standby server is processing streamed WAL data.',
+ long_desc => '-1 means wait forever.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'max_standby_streaming_delay',
+ boot_val => '30 * 1000',
+ min => '-1',
+ max => 'INT_MAX',
},
-{ name => 'max_parallel_workers_per_gather', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_WORKER_PROCESSES',
- short_desc => 'Sets the maximum number of parallel processes per executor node.',
- flags => 'GUC_EXPLAIN',
- variable => 'max_parallel_workers_per_gather',
+{ name => 'max_sync_workers_per_subscription', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SUBSCRIBERS',
+ short_desc => 'Maximum number of table synchronization workers per subscription.',
+ variable => 'max_sync_workers_per_subscription',
boot_val => '2',
min => '0',
- max => 'MAX_PARALLEL_WORKER_LIMIT',
+ max => 'MAX_BACKENDS',
},
-{ name => 'max_parallel_workers', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_WORKER_PROCESSES',
- short_desc => 'Sets the maximum number of parallel workers that can be active at one time.',
- flags => 'GUC_EXPLAIN',
- variable => 'max_parallel_workers',
- boot_val => '8',
+{ name => 'max_wal_senders', type => 'int', context => 'PGC_POSTMASTER', group => 'REPLICATION_SENDING',
+ short_desc => 'Sets the maximum number of simultaneously running WAL sender processes.',
+ variable => 'max_wal_senders',
+ boot_val => '10',
min => '0',
- max => 'MAX_PARALLEL_WORKER_LIMIT',
+ max => 'MAX_BACKENDS',
},
-{ name => 'autovacuum_work_mem', type => 'int', context => 'PGC_SIGHUP', group => 'RESOURCES_MEM',
- short_desc => 'Sets the maximum memory to be used by each autovacuum worker process.',
- long_desc => '-1 means use "maintenance_work_mem".',
- flags => 'GUC_UNIT_KB',
- variable => 'autovacuum_work_mem',
- boot_val => '-1',
- min => '-1',
+{ name => 'max_wal_size', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
+ short_desc => 'Sets the WAL size that triggers a checkpoint.',
+ flags => 'GUC_UNIT_MB',
+ variable => 'max_wal_size_mb',
+ boot_val => 'DEFAULT_MAX_WAL_SEGS * (DEFAULT_XLOG_SEG_SIZE / (1024 * 1024))',
+ min => '2',
max => 'MAX_KILOBYTES',
- check_hook => 'check_autovacuum_work_mem',
-},
-
-{ name => 'tcp_keepalives_idle', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
- short_desc => 'Time between issuing TCP keepalives.',
- long_desc => '0 means use the system default.',
- flags => 'GUC_UNIT_S',
- variable => 'tcp_keepalives_idle',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX',
- assign_hook => 'assign_tcp_keepalives_idle',
- show_hook => 'show_tcp_keepalives_idle',
+ assign_hook => 'assign_max_wal_size',
},
-{ name => 'tcp_keepalives_interval', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
- short_desc => 'Time between TCP keepalive retransmits.',
- long_desc => '0 means use the system default.',
- flags => 'GUC_UNIT_S',
- variable => 'tcp_keepalives_interval',
- boot_val => '0',
+{ name => 'max_worker_processes', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_WORKER_PROCESSES',
+ short_desc => 'Maximum number of concurrent worker processes.',
+ variable => 'max_worker_processes',
+ boot_val => '8',
min => '0',
- max => 'INT_MAX',
- assign_hook => 'assign_tcp_keepalives_interval',
- show_hook => 'show_tcp_keepalives_interval',
+ max => 'MAX_BACKENDS',
},
-{ name => 'ssl_renegotiation_limit', type => 'int', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
- short_desc => 'SSL renegotiation is no longer supported; this can only be 0.',
- flags => 'GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'ssl_renegotiation_limit',
- boot_val => '0',
- min => '0',
- max => '0',
+{ name => 'md5_password_warnings', type => 'bool', context => 'PGC_USERSET', group => 'CONN_AUTH_AUTH',
+ short_desc => 'Enables deprecation warnings for MD5 passwords.',
+ variable => 'md5_password_warnings',
+ boot_val => 'true',
},
-{ name => 'tcp_keepalives_count', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
- short_desc => 'Maximum number of TCP keepalive retransmits.',
- long_desc => 'Number of consecutive keepalive retransmits that can be lost before a connection is considered dead. 0 means use the system default.',
- variable => 'tcp_keepalives_count',
+{ name => 'min_dynamic_shared_memory', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Amount of dynamic shared memory reserved at startup.',
+ flags => 'GUC_UNIT_MB',
+ variable => 'min_dynamic_shared_memory',
boot_val => '0',
min => '0',
- max => 'INT_MAX',
- assign_hook => 'assign_tcp_keepalives_count',
- show_hook => 'show_tcp_keepalives_count',
+ max => '(int) Min((size_t) INT_MAX, SIZE_MAX / (1024 * 1024))',
},
-{ name => 'gin_fuzzy_search_limit', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_OTHER',
- short_desc => 'Sets the maximum allowed result for exact search by GIN.',
- long_desc => '0 means no limit.',
- variable => 'GinFuzzySearchLimit',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX',
+{ name => 'min_eager_agg_group_size', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the minimum average group size required to consider applying eager aggregation.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'min_eager_agg_group_size',
+ boot_val => '8.0',
+ min => '0.0',
+ max => 'DBL_MAX',
},
-{ name => 'effective_cache_size', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the planner\'s assumption about the total size of the data caches.',
- long_desc => 'That is, the total size of the caches (kernel cache and shared buffers) used for PostgreSQL data files. This is measured in disk pages, which are normally 8 kB each.',
+{ name => 'min_parallel_index_scan_size', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the minimum amount of index data for a parallel scan.',
+ long_desc => 'If the planner estimates that it will read a number of index pages too small to reach this limit, a parallel scan will not be considered.',
flags => 'GUC_UNIT_BLOCKS | GUC_EXPLAIN',
- variable => 'effective_cache_size',
- boot_val => 'DEFAULT_EFFECTIVE_CACHE_SIZE',
- min => '1',
- max => 'INT_MAX',
+ variable => 'min_parallel_index_scan_size',
+ boot_val => '(512 * 1024) / BLCKSZ',
+ min => '0',
+ max => 'INT_MAX / 3',
},
{ name => 'min_parallel_table_scan_size', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
@@ -2239,125 +2135,159 @@
max => 'INT_MAX / 3',
},
-{ name => 'min_parallel_index_scan_size', type => 'int', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the minimum amount of index data for a parallel scan.',
- long_desc => 'If the planner estimates that it will read a number of index pages too small to reach this limit, a parallel scan will not be considered.',
- flags => 'GUC_UNIT_BLOCKS | GUC_EXPLAIN',
- variable => 'min_parallel_index_scan_size',
- boot_val => '(512 * 1024) / BLCKSZ',
- min => '0',
- max => 'INT_MAX / 3',
+{ name => 'min_wal_size', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
+ short_desc => 'Sets the minimum size to shrink the WAL to.',
+ flags => 'GUC_UNIT_MB',
+ variable => 'min_wal_size_mb',
+ boot_val => 'DEFAULT_MIN_WAL_SEGS * (DEFAULT_XLOG_SEG_SIZE / (1024 * 1024))',
+ min => '2',
+ max => 'MAX_KILOBYTES',
},
-# Can't be set in postgresql.conf
-{ name => 'server_version_num', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the server version as an integer.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'server_version_num',
- boot_val => 'PG_VERSION_NUM',
- min => 'PG_VERSION_NUM',
- max => 'PG_VERSION_NUM',
+{ name => 'multixact_member_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the size of the dedicated buffer pool used for the MultiXact member cache.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'multixact_member_buffers',
+ boot_val => '32',
+ min => '16',
+ max => 'SLRU_MAX_ALLOWED_BUFFERS',
+ check_hook => 'check_multixact_member_buffers',
},
-{ name => 'log_temp_files', type => 'int', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
- short_desc => 'Log the use of temporary files larger than this number of kilobytes.',
- long_desc => '-1 disables logging temporary files. 0 means log all temporary files.',
- flags => 'GUC_UNIT_KB',
- variable => 'log_temp_files',
- boot_val => '-1',
- min => '-1',
+{ name => 'multixact_offset_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the size of the dedicated buffer pool used for the MultiXact offset cache.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'multixact_offset_buffers',
+ boot_val => '16',
+ min => '16',
+ max => 'SLRU_MAX_ALLOWED_BUFFERS',
+ check_hook => 'check_multixact_offset_buffers',
+},
+
+{ name => 'notify_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the size of the dedicated buffer pool used for the LISTEN/NOTIFY message cache.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'notify_buffers',
+ boot_val => '16',
+ min => '16',
+ max => 'SLRU_MAX_ALLOWED_BUFFERS',
+ check_hook => 'check_notify_buffers',
+},
+
+{ name => 'num_os_semaphores', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the number of semaphores required for the server.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
+ variable => 'num_os_semaphores',
+ boot_val => '0',
+ min => '0',
max => 'INT_MAX',
},
-{ name => 'track_activity_query_size', type => 'int', context => 'PGC_POSTMASTER', group => 'STATS_CUMULATIVE',
- short_desc => 'Sets the size reserved for pg_stat_activity.query, in bytes.',
- flags => 'GUC_UNIT_BYTE',
- variable => 'pgstat_track_activity_query_size',
- boot_val => '1024',
- min => '100',
- max => '1048576',
+{ name => 'oauth_validator_libraries', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
+ short_desc => 'Lists libraries that may be called to validate OAuth v2 bearer tokens.',
+ flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY',
+ variable => 'oauth_validator_libraries_string',
+ boot_val => '""',
},
-{ name => 'gin_pending_list_limit', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the maximum size of the pending list for GIN index.',
- flags => 'GUC_UNIT_KB',
- variable => 'gin_pending_list_limit',
- boot_val => '4096',
- min => '64',
- max => 'MAX_KILOBYTES',
+# this is undocumented because not exposed in a standard build
+{ name => 'optimize_bounded_sort', type => 'bool', context => 'PGC_USERSET', group => 'QUERY_TUNING_METHOD',
+ short_desc => 'Enables bounded sorting using heap sort.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_EXPLAIN',
+ variable => 'optimize_bounded_sort',
+ boot_val => 'true',
+ ifdef => 'DEBUG_BOUNDED_SORT',
},
-{ name => 'tcp_user_timeout', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
- short_desc => 'TCP user timeout.',
- long_desc => '0 means use the system default.',
- flags => 'GUC_UNIT_MS',
- variable => 'tcp_user_timeout',
- boot_val => '0',
+{ name => 'parallel_leader_participation', type => 'bool', context => 'PGC_USERSET', group => 'RESOURCES_WORKER_PROCESSES',
+ short_desc => 'Controls whether Gather and Gather Merge also run subplans.',
+ long_desc => 'Should gather nodes also run subplans or just gather tuples?',
+ flags => 'GUC_EXPLAIN',
+ variable => 'parallel_leader_participation',
+ boot_val => 'true',
+},
+
+{ name => 'parallel_setup_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the planner\'s estimate of the cost of starting up worker processes for parallel query.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'parallel_setup_cost',
+ boot_val => 'DEFAULT_PARALLEL_SETUP_COST',
min => '0',
- max => 'INT_MAX',
- assign_hook => 'assign_tcp_user_timeout',
- show_hook => 'show_tcp_user_timeout',
+ max => 'DBL_MAX',
+},
+
+{ name => 'parallel_tuple_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the planner\'s estimate of the cost of passing each tuple (row) from worker to leader backend.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'parallel_tuple_cost',
+ boot_val => 'DEFAULT_PARALLEL_TUPLE_COST',
+ min => '0',
+ max => 'DBL_MAX',
+},
+
+{ name => 'password_encryption', type => 'enum', context => 'PGC_USERSET', group => 'CONN_AUTH_AUTH',
+ short_desc => 'Chooses the algorithm for encrypting passwords.',
+ variable => 'Password_encryption',
+ boot_val => 'PASSWORD_TYPE_SCRAM_SHA_256',
+ options => 'password_encryption_options',
},
-{ name => 'huge_page_size', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'The size of huge page that should be requested.',
- long_desc => '0 means use the system default.',
- flags => 'GUC_UNIT_KB',
- variable => 'huge_page_size',
- boot_val => '0',
- min => '0',
- max => 'INT_MAX',
- check_hook => 'check_huge_page_size',
+{ name => 'plan_cache_mode', type => 'enum', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
+ short_desc => 'Controls the planner\'s selection of custom or generic plan.',
+ long_desc => 'Prepared statements can have custom and generic plans, and the planner will attempt to choose which is better. This can be set to override the default behavior.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'plan_cache_mode',
+ boot_val => 'PLAN_CACHE_MODE_AUTO',
+ options => 'plan_cache_mode_options',
},
-{ name => 'debug_discard_caches', type => 'int', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Aggressively flush system caches for debugging purposes.',
- long_desc => '0 means use normal caching behavior.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'debug_discard_caches',
- boot_val => 'DEFAULT_DEBUG_DISCARD_CACHES',
- min => 'MIN_DEBUG_DISCARD_CACHES',
- max => 'MAX_DEBUG_DISCARD_CACHES',
+{ name => 'port', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the TCP port the server listens on.',
+ variable => 'PostPortNumber',
+ boot_val => 'DEF_PGPORT',
+ min => '1',
+ max => '65535',
},
-{ name => 'client_connection_check_interval', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
- short_desc => 'Sets the time interval between checks for disconnection while running queries.',
- long_desc => '0 disables connection checks.',
- flags => 'GUC_UNIT_MS',
- variable => 'client_connection_check_interval',
+{ name => 'post_auth_delay', type => 'int', context => 'PGC_BACKEND', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Sets the amount of time to wait after authentication on connection startup.',
+ long_desc => 'This allows attaching a debugger to the process.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_UNIT_S',
+ variable => 'PostAuthDelay',
boot_val => '0',
min => '0',
- max => 'INT_MAX',
- check_hook => 'check_client_connection_check_interval',
+ max => 'INT_MAX / 1000000',
},
-{ name => 'log_startup_progress_interval', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHEN',
- short_desc => 'Time between progress updates for long-running startup operations.',
- long_desc => '0 disables progress updates.',
- flags => 'GUC_UNIT_MS',
- variable => 'log_startup_progress_interval',
- boot_val => '10000',
+# Not for general use
+{ name => 'pre_auth_delay', type => 'int', context => 'PGC_SIGHUP', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Sets the amount of time to wait before authentication on connection startup.',
+ long_desc => 'This allows attaching a debugger to the process.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_UNIT_S',
+ variable => 'PreAuthDelay',
+ boot_val => '0',
min => '0',
- max => 'INT_MAX',
+ max => '60',
},
-{ name => 'scram_iterations', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_AUTH',
- short_desc => 'Sets the iteration count for SCRAM secret generation.',
- flags => 'GUC_REPORT',
- variable => 'scram_sha_256_iterations',
- boot_val => 'SCRAM_SHA_256_DEFAULT_ITERATIONS',
- min => '1',
- max => 'INT_MAX',
+{ name => 'primary_conninfo', type => 'string', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets the connection string to be used to connect to the sending server.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'PrimaryConnInfo',
+ boot_val => '""',
},
+{ name => 'primary_slot_name', type => 'string', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets the name of the replication slot to use on the sending server.',
+ variable => 'PrimarySlotName',
+ boot_val => '""',
+ check_hook => 'check_primary_slot_name',
+},
-{ name => 'seq_page_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the planner\'s estimate of the cost of a sequentially fetched disk page.',
- flags => 'GUC_EXPLAIN',
- variable => 'seq_page_cost',
- boot_val => 'DEFAULT_SEQ_PAGE_COST',
- min => '0',
- max => 'DBL_MAX',
+{ name => 'quote_all_identifiers', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
+ short_desc => 'When generating SQL fragments, quote all identifiers.',
+ variable => 'quote_all_identifiers',
+ boot_val => 'false',
},
{ name => 'random_page_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
@@ -2369,97 +2299,97 @@
max => 'DBL_MAX',
},
-{ name => 'cpu_tuple_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the planner\'s estimate of the cost of processing each tuple (row).',
- flags => 'GUC_EXPLAIN',
- variable => 'cpu_tuple_cost',
- boot_val => 'DEFAULT_CPU_TUPLE_COST',
- min => '0',
- max => 'DBL_MAX',
+{ name => 'recovery_end_command', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVE_RECOVERY',
+ short_desc => 'Sets the shell command that will be executed once at the end of recovery.',
+ variable => 'recoveryEndCommand',
+ boot_val => '""',
},
-{ name => 'cpu_index_tuple_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the planner\'s estimate of the cost of processing each index entry during an index scan.',
- flags => 'GUC_EXPLAIN',
- variable => 'cpu_index_tuple_cost',
- boot_val => 'DEFAULT_CPU_INDEX_TUPLE_COST',
- min => '0',
- max => 'DBL_MAX',
+{ name => 'recovery_init_sync_method', type => 'enum', context => 'PGC_SIGHUP', group => 'ERROR_HANDLING_OPTIONS',
+ short_desc => 'Sets the method for synchronizing the data directory before crash recovery.',
+ variable => 'recovery_init_sync_method',
+ boot_val => 'DATA_DIR_SYNC_METHOD_FSYNC',
+ options => 'recovery_init_sync_method_options',
},
-{ name => 'cpu_operator_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the planner\'s estimate of the cost of processing each operator or function call.',
- flags => 'GUC_EXPLAIN',
- variable => 'cpu_operator_cost',
- boot_val => 'DEFAULT_CPU_OPERATOR_COST',
+{ name => 'recovery_min_apply_delay', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets the minimum delay for applying changes during recovery.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'recovery_min_apply_delay',
+ boot_val => '0',
min => '0',
- max => 'DBL_MAX',
+ max => 'INT_MAX',
},
-{ name => 'parallel_tuple_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the planner\'s estimate of the cost of passing each tuple (row) from worker to leader backend.',
- flags => 'GUC_EXPLAIN',
- variable => 'parallel_tuple_cost',
- boot_val => 'DEFAULT_PARALLEL_TUPLE_COST',
- min => '0',
- max => 'DBL_MAX',
+{ name => 'recovery_prefetch', type => 'enum', context => 'PGC_SIGHUP', group => 'WAL_RECOVERY',
+ short_desc => 'Prefetch referenced blocks during recovery.',
+ long_desc => 'Look ahead in the WAL to find references to uncached data.',
+ variable => 'recovery_prefetch',
+ boot_val => 'RECOVERY_PREFETCH_TRY',
+ options => 'recovery_prefetch_options',
+ check_hook => 'check_recovery_prefetch',
+ assign_hook => 'assign_recovery_prefetch',
},
-{ name => 'parallel_setup_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the planner\'s estimate of the cost of starting up worker processes for parallel query.',
- flags => 'GUC_EXPLAIN',
- variable => 'parallel_setup_cost',
- boot_val => 'DEFAULT_PARALLEL_SETUP_COST',
- min => '0',
- max => 'DBL_MAX',
+{ name => 'recovery_target', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
+ short_desc => 'Set to "immediate" to end recovery as soon as a consistent state is reached.',
+ variable => 'recovery_target_string',
+ boot_val => '""',
+ check_hook => 'check_recovery_target',
+ assign_hook => 'assign_recovery_target',
},
-{ name => 'jit_above_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Perform JIT compilation if query is more expensive.',
- long_desc => '-1 disables JIT compilation.',
- flags => 'GUC_EXPLAIN',
- variable => 'jit_above_cost',
- boot_val => '100000',
- min => '-1',
- max => 'DBL_MAX',
+{ name => 'recovery_target_action', type => 'enum', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
+ short_desc => 'Sets the action to perform upon reaching the recovery target.',
+ variable => 'recoveryTargetAction',
+ boot_val => 'RECOVERY_TARGET_ACTION_PAUSE',
+ options => 'recovery_target_action_options',
},
-{ name => 'jit_optimize_above_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Optimize JIT-compiled functions if query is more expensive.',
- long_desc => '-1 disables optimization.',
- flags => 'GUC_EXPLAIN',
- variable => 'jit_optimize_above_cost',
- boot_val => '500000',
- min => '-1',
- max => 'DBL_MAX',
+{ name => 'recovery_target_inclusive', type => 'bool', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
+ short_desc => 'Sets whether to include or exclude transaction with recovery target.',
+ variable => 'recoveryTargetInclusive',
+ boot_val => 'true',
},
-{ name => 'jit_inline_above_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Perform JIT inlining if query is more expensive.',
- long_desc => '-1 disables inlining.',
- flags => 'GUC_EXPLAIN',
- variable => 'jit_inline_above_cost',
- boot_val => '500000',
- min => '-1',
- max => 'DBL_MAX',
+{ name => 'recovery_target_lsn', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
+ short_desc => 'Sets the LSN of the write-ahead log location up to which recovery will proceed.',
+ variable => 'recovery_target_lsn_string',
+ boot_val => '""',
+ check_hook => 'check_recovery_target_lsn',
+ assign_hook => 'assign_recovery_target_lsn',
},
-{ name => 'min_eager_agg_group_size', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
- short_desc => 'Sets the minimum average group size required to consider applying eager aggregation.',
- flags => 'GUC_EXPLAIN',
- variable => 'min_eager_agg_group_size',
- boot_val => '8.0',
- min => '0.0',
- max => 'DBL_MAX',
+{ name => 'recovery_target_name', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
+ short_desc => 'Sets the named restore point up to which recovery will proceed.',
+ variable => 'recovery_target_name_string',
+ boot_val => '""',
+ check_hook => 'check_recovery_target_name',
+ assign_hook => 'assign_recovery_target_name',
},
-{ name => 'cursor_tuple_fraction', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
- short_desc => 'Sets the planner\'s estimate of the fraction of a cursor\'s rows that will be retrieved.',
- flags => 'GUC_EXPLAIN',
- variable => 'cursor_tuple_fraction',
- boot_val => 'DEFAULT_CURSOR_TUPLE_FRACTION',
- min => '0.0',
- max => '1.0',
+{ name => 'recovery_target_time', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
+ short_desc => 'Sets the time stamp up to which recovery will proceed.',
+ variable => 'recovery_target_time_string',
+ boot_val => '""',
+ check_hook => 'check_recovery_target_time',
+ assign_hook => 'assign_recovery_target_time',
+},
+
+{ name => 'recovery_target_timeline', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
+ short_desc => 'Specifies the timeline to recover into.',
+ variable => 'recovery_target_timeline_string',
+ boot_val => '"latest"',
+ check_hook => 'check_recovery_target_timeline',
+ assign_hook => 'assign_recovery_target_timeline',
+},
+
+{ name => 'recovery_target_xid', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
+ short_desc => 'Sets the transaction ID up to which recovery will proceed.',
+ variable => 'recovery_target_xid_string',
+ boot_val => '""',
+ check_hook => 'check_recovery_target_xid',
+ assign_hook => 'assign_recovery_target_xid',
},
{ name => 'recursive_worktable_factor', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
@@ -2471,39 +2401,76 @@
max => '1000000.0',
},
-{ name => 'geqo_selection_bias', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
- short_desc => 'GEQO: selective pressure within the population.',
- flags => 'GUC_EXPLAIN',
- variable => 'Geqo_selection_bias',
- boot_val => 'DEFAULT_GEQO_SELECTION_BIAS',
- min => 'MIN_GEQO_SELECTION_BIAS',
- max => 'MAX_GEQO_SELECTION_BIAS',
+{ name => 'remove_temp_files_after_crash', type => 'bool', context => 'PGC_SIGHUP', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Remove temporary files after backend crash.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'remove_temp_files_after_crash',
+ boot_val => 'true',
+},
+
+{ name => 'reserved_connections', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the number of connection slots reserved for roles with privileges of pg_use_reserved_connections.',
+ variable => 'ReservedConnections',
+ boot_val => '0',
+ min => '0',
+ max => 'MAX_BACKENDS',
+},
+
+{ name => 'restart_after_crash', type => 'bool', context => 'PGC_SIGHUP', group => 'ERROR_HANDLING_OPTIONS',
+ short_desc => 'Reinitialize server after backend crash.',
+ variable => 'restart_after_crash',
+ boot_val => 'true',
+},
+
+{ name => 'restore_command', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVE_RECOVERY',
+ short_desc => 'Sets the shell command that will be called to retrieve an archived WAL file.',
+ variable => 'recoveryRestoreCommand',
+ boot_val => '""',
+},
+
+{ name => 'restrict_nonsystem_relation_kind', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Prohibits access to non-system relations of specified kinds.',
+ flags => 'GUC_LIST_INPUT | GUC_NOT_IN_SAMPLE',
+ variable => 'restrict_nonsystem_relation_kind_string',
+ boot_val => '""',
+ check_hook => 'check_restrict_nonsystem_relation_kind',
+ assign_hook => 'assign_restrict_nonsystem_relation_kind',
},
-{ name => 'geqo_seed', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_GEQO',
- short_desc => 'GEQO: seed for random path selection.',
- flags => 'GUC_EXPLAIN',
- variable => 'Geqo_seed',
- boot_val => '0.0',
- min => '0.0',
- max => '1.0',
+# Not for general use --- used by SET ROLE
+{ name => 'role', type => 'string', context => 'PGC_USERSET', group => 'UNGROUPED',
+ short_desc => 'Sets the current role.',
+ flags => 'GUC_IS_NAME | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_NOT_WHILE_SEC_REST',
+ variable => 'role_string',
+ boot_val => '"none"',
+ check_hook => 'check_role',
+ assign_hook => 'assign_role',
+ show_hook => 'show_role',
},
-{ name => 'hash_mem_multiplier', type => 'real', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
- short_desc => 'Multiple of "work_mem" to use for hash tables.',
- flags => 'GUC_EXPLAIN',
- variable => 'hash_mem_multiplier',
- boot_val => '2.0',
- min => '1.0',
- max => '1000.0',
+{ name => 'row_security', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Enables row security.',
+ long_desc => 'When enabled, row security will be applied to all users.',
+ variable => 'row_security',
+ boot_val => 'true',
},
-{ name => 'bgwriter_lru_multiplier', type => 'real', context => 'PGC_SIGHUP', group => 'RESOURCES_BGWRITER',
- short_desc => 'Multiple of the average buffer usage to free per round.',
- variable => 'bgwriter_lru_multiplier',
- boot_val => '2.0',
- min => '0.0',
- max => '10.0',
+{ name => 'scram_iterations', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_AUTH',
+ short_desc => 'Sets the iteration count for SCRAM secret generation.',
+ flags => 'GUC_REPORT',
+ variable => 'scram_sha_256_iterations',
+ boot_val => 'SCRAM_SHA_256_DEFAULT_ITERATIONS',
+ min => '1',
+ max => 'INT_MAX',
+},
+
+{ name => 'search_path', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the schema search order for names that are not schema-qualified.',
+ flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_EXPLAIN | GUC_REPORT',
+ variable => 'namespace_search_path',
+ boot_val => '"\"$user\", public"',
+ check_hook => 'check_search_path',
+ assign_hook => 'assign_search_path',
},
{ name => 'seed', type => 'real', context => 'PGC_USERSET', group => 'UNGROUPED',
@@ -2518,423 +2485,456 @@
show_hook => 'show_random_seed',
},
-{ name => 'vacuum_cost_delay', type => 'real', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
- short_desc => 'Vacuum cost delay in milliseconds.',
- flags => 'GUC_UNIT_MS',
- variable => 'VacuumCostDelay',
- boot_val => '0',
- min => '0',
- max => '100',
+{ name => 'segment_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the number of pages per disk file.',
+ flags => 'GUC_UNIT_BLOCKS | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'segment_size',
+ boot_val => 'RELSEG_SIZE',
+ min => 'RELSEG_SIZE',
+ max => 'RELSEG_SIZE',
},
-{ name => 'autovacuum_vacuum_cost_delay', type => 'real', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Vacuum cost delay in milliseconds, for autovacuum.',
- long_desc => '-1 means use "vacuum_cost_delay".',
- flags => 'GUC_UNIT_MS',
- variable => 'autovacuum_vac_cost_delay',
- boot_val => '2',
- min => '-1',
- max => '100',
+{ name => 'send_abort_for_crash', type => 'bool', context => 'PGC_SIGHUP', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Send SIGABRT not SIGQUIT to child processes after backend crash.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'send_abort_for_crash',
+ boot_val => 'false',
},
-{ name => 'autovacuum_vacuum_scale_factor', type => 'real', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Number of tuple updates or deletes prior to vacuum as a fraction of reltuples.',
- variable => 'autovacuum_vac_scale',
- boot_val => '0.2',
- min => '0.0',
- max => '100.0',
+{ name => 'send_abort_for_kill', type => 'bool', context => 'PGC_SIGHUP', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Send SIGABRT not SIGKILL to stuck child processes.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'send_abort_for_kill',
+ boot_val => 'false',
},
-{ name => 'autovacuum_vacuum_insert_scale_factor', type => 'real', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Number of tuple inserts prior to vacuum as a fraction of reltuples.',
- variable => 'autovacuum_vac_ins_scale',
- boot_val => '0.2',
- min => '0.0',
- max => '100.0',
-},
-{ name => 'autovacuum_analyze_scale_factor', type => 'real', context => 'PGC_SIGHUP', group => 'VACUUM_AUTOVACUUM',
- short_desc => 'Number of tuple inserts, updates, or deletes prior to analyze as a fraction of reltuples.',
- variable => 'autovacuum_anl_scale',
- boot_val => '0.1',
- min => '0.0',
- max => '100.0',
+{ name => 'seq_page_cost', type => 'real', context => 'PGC_USERSET', group => 'QUERY_TUNING_COST',
+ short_desc => 'Sets the planner\'s estimate of the cost of a sequentially fetched disk page.',
+ flags => 'GUC_EXPLAIN',
+ variable => 'seq_page_cost',
+ boot_val => 'DEFAULT_SEQ_PAGE_COST',
+ min => '0',
+ max => 'DBL_MAX',
},
-{ name => 'checkpoint_completion_target', type => 'real', context => 'PGC_SIGHUP', group => 'WAL_CHECKPOINTS',
- short_desc => 'Time spent flushing dirty buffers during checkpoint, as fraction of checkpoint interval.',
- variable => 'CheckPointCompletionTarget',
- boot_val => '0.9',
- min => '0.0',
- max => '1.0',
- assign_hook => 'assign_checkpoint_completion_target',
+{ name => 'serializable_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the size of the dedicated buffer pool used for the serializable transaction cache.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'serializable_buffers',
+ boot_val => '32',
+ min => '16',
+ max => 'SLRU_MAX_ALLOWED_BUFFERS',
+ check_hook => 'check_serial_buffers',
},
-{ name => 'log_statement_sample_rate', type => 'real', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
- short_desc => 'Fraction of statements exceeding "log_min_duration_sample" to be logged.',
- long_desc => 'Use a value between 0.0 (never log) and 1.0 (always log).',
- variable => 'log_statement_sample_rate',
- boot_val => '1.0',
- min => '0.0',
- max => '1.0',
+# Can't be set in postgresql.conf
+{ name => 'server_encoding', type => 'string', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the server (database) character set encoding.',
+ flags => 'GUC_IS_NAME | GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'server_encoding_string',
+ boot_val => '"SQL_ASCII"',
},
-{ name => 'log_transaction_sample_rate', type => 'real', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
- short_desc => 'Sets the fraction of transactions from which to log all statements.',
- long_desc => 'Use a value between 0.0 (never log) and 1.0 (log all statements for all transactions).',
- variable => 'log_xact_sample_rate',
- boot_val => '0.0',
- min => '0.0',
- max => '1.0',
+# Can't be set in postgresql.conf
+{ name => 'server_version', type => 'string', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the server version.',
+ flags => 'GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'server_version_string',
+ boot_val => 'PG_VERSION',
},
-{ name => 'vacuum_max_eager_freeze_failure_rate', type => 'real', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
- short_desc => 'Fraction of pages in a relation vacuum can scan and fail to freeze before disabling eager scanning.',
- long_desc => 'A value of 0.0 disables eager scanning and a value of 1.0 will eagerly scan up to 100 percent of the all-visible pages in the relation. If vacuum successfully freezes these pages, the cap is lower than 100 percent, because the goal is to amortize page freezing across multiple vacuums.',
- variable => 'vacuum_max_eager_freeze_failure_rate',
- boot_val => '0.03',
- min => '0.0',
- max => '1.0',
+# Can't be set in postgresql.conf
+{ name => 'server_version_num', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the server version as an integer.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'server_version_num',
+ boot_val => 'PG_VERSION_NUM',
+ min => 'PG_VERSION_NUM',
+ max => 'PG_VERSION_NUM',
},
+# Not for general use --- used by SET SESSION AUTHORIZATION
+{ name => 'session_authorization', type => 'string', context => 'PGC_USERSET', group => 'UNGROUPED',
+ short_desc => 'Sets the session user name.',
+ flags => 'GUC_IS_NAME | GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_NOT_WHILE_SEC_REST',
+ variable => 'session_authorization_string',
+ boot_val => 'NULL',
+ check_hook => 'check_session_authorization',
+ assign_hook => 'assign_session_authorization',
+},
-{ name => 'archive_command', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVING',
- short_desc => 'Sets the shell command that will be called to archive a WAL file.',
- long_desc => 'An empty string means use "archive_library".',
- variable => 'XLogArchiveCommand',
+{ name => 'session_preload_libraries', type => 'string', context => 'PGC_SUSET', group => 'CLIENT_CONN_PRELOAD',
+ short_desc => 'Lists shared libraries to preload into each backend.',
+ flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY',
+ variable => 'session_preload_libraries_string',
boot_val => '""',
- show_hook => 'show_archive_command',
},
-{ name => 'archive_library', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVING',
- short_desc => 'Sets the library that will be called to archive a WAL file.',
- long_desc => 'An empty string means use "archive_command".',
- variable => 'XLogArchiveLibrary',
- boot_val => '""',
+{ name => 'session_replication_role', type => 'enum', context => 'PGC_SUSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the session\'s behavior for triggers and rewrite rules.',
+ variable => 'SessionReplicationRole',
+ boot_val => 'SESSION_REPLICATION_ROLE_ORIGIN',
+ options => 'session_replication_role_options',
+ assign_hook => 'assign_session_replication_role',
},
-{ name => 'restore_command', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVE_RECOVERY',
- short_desc => 'Sets the shell command that will be called to retrieve an archived WAL file.',
- variable => 'recoveryRestoreCommand',
- boot_val => '""',
+# We sometimes multiply the number of shared buffers by two without
+# checking for overflow, so we mustn't allow more than INT_MAX / 2.
+{ name => 'shared_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the number of shared memory buffers used by the server.',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'NBuffers',
+ boot_val => '16384',
+ min => '16',
+ max => 'INT_MAX / 2',
},
-{ name => 'archive_cleanup_command', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVE_RECOVERY',
- short_desc => 'Sets the shell command that will be executed at every restart point.',
- variable => 'archiveCleanupCommand',
+{ name => 'shared_memory_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the size of the server\'s main shared memory area (rounded up to the nearest MB).',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_UNIT_MB | GUC_RUNTIME_COMPUTED',
+ variable => 'shared_memory_size_mb',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
+},
+
+{ name => 'shared_memory_size_in_huge_pages', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the number of huge pages needed for the main shared memory area.',
+ long_desc => '-1 means huge pages are not supported.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
+ variable => 'shared_memory_size_in_huge_pages',
+ boot_val => '-1',
+ min => '-1',
+ max => 'INT_MAX',
+},
+
+{ name => 'shared_memory_type', type => 'enum', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Selects the shared memory implementation used for the main shared memory region.',
+ variable => 'shared_memory_type',
+ boot_val => 'DEFAULT_SHARED_MEMORY_TYPE',
+ options => 'shared_memory_options',
+},
+
+{ name => 'shared_preload_libraries', type => 'string', context => 'PGC_POSTMASTER', group => 'CLIENT_CONN_PRELOAD',
+ short_desc => 'Lists shared libraries to preload into server.',
+ flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY',
+ variable => 'shared_preload_libraries_string',
boot_val => '""',
},
-{ name => 'recovery_end_command', type => 'string', context => 'PGC_SIGHUP', group => 'WAL_ARCHIVE_RECOVERY',
- short_desc => 'Sets the shell command that will be executed once at the end of recovery.',
- variable => 'recoveryEndCommand',
- boot_val => '""',
+{ name => 'ssl', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Enables SSL connections.',
+ variable => 'EnableSSL',
+ boot_val => 'false',
+ check_hook => 'check_ssl',
},
-{ name => 'recovery_target_timeline', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
- short_desc => 'Specifies the timeline to recover into.',
- variable => 'recovery_target_timeline_string',
- boot_val => '"latest"',
- check_hook => 'check_recovery_target_timeline',
- assign_hook => 'assign_recovery_target_timeline',
+{ name => 'ssl_ca_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Location of the SSL certificate authority file.',
+ variable => 'ssl_ca_file',
+ boot_val => '""',
},
-{ name => 'recovery_target', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
- short_desc => 'Set to "immediate" to end recovery as soon as a consistent state is reached.',
- variable => 'recovery_target_string',
- boot_val => '""',
- check_hook => 'check_recovery_target',
- assign_hook => 'assign_recovery_target',
+{ name => 'ssl_cert_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Location of the SSL server certificate file.',
+ variable => 'ssl_cert_file',
+ boot_val => '"server.crt"',
},
-{ name => 'recovery_target_xid', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
- short_desc => 'Sets the transaction ID up to which recovery will proceed.',
- variable => 'recovery_target_xid_string',
- boot_val => '""',
- check_hook => 'check_recovery_target_xid',
- assign_hook => 'assign_recovery_target_xid',
+{ name => 'ssl_ciphers', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Sets the list of allowed TLSv1.2 (and lower) ciphers.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'SSLCipherList',
+ boot_val => 'DEFAULT_SSL_CIPHERS',
},
-{ name => 'recovery_target_time', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
- short_desc => 'Sets the time stamp up to which recovery will proceed.',
- variable => 'recovery_target_time_string',
+{ name => 'ssl_crl_dir', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Location of the SSL certificate revocation list directory.',
+ variable => 'ssl_crl_dir',
boot_val => '""',
- check_hook => 'check_recovery_target_time',
- assign_hook => 'assign_recovery_target_time',
},
-{ name => 'recovery_target_name', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
- short_desc => 'Sets the named restore point up to which recovery will proceed.',
- variable => 'recovery_target_name_string',
+{ name => 'ssl_crl_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Location of the SSL certificate revocation list file.',
+ variable => 'ssl_crl_file',
boot_val => '""',
- check_hook => 'check_recovery_target_name',
- assign_hook => 'assign_recovery_target_name',
},
-{ name => 'recovery_target_lsn', type => 'string', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
- short_desc => 'Sets the LSN of the write-ahead log location up to which recovery will proceed.',
- variable => 'recovery_target_lsn_string',
+{ name => 'ssl_dh_params_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Location of the SSL DH parameters file.',
+ long_desc => 'An empty string means use compiled-in default parameters.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'ssl_dh_params_file',
boot_val => '""',
- check_hook => 'check_recovery_target_lsn',
- assign_hook => 'assign_recovery_target_lsn',
},
-{ name => 'primary_conninfo', type => 'string', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets the connection string to be used to connect to the sending server.',
+{ name => 'ssl_groups', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Sets the group(s) to use for Diffie-Hellman key exchange.',
+ long_desc => 'Multiple groups can be specified using a colon-separated list.',
flags => 'GUC_SUPERUSER_ONLY',
- variable => 'PrimaryConnInfo',
- boot_val => '""',
+ variable => 'SSLECDHCurve',
+ boot_val => 'DEFAULT_SSL_GROUPS',
},
-{ name => 'primary_slot_name', type => 'string', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
- short_desc => 'Sets the name of the replication slot to use on the sending server.',
- variable => 'PrimarySlotName',
- boot_val => '""',
- check_hook => 'check_primary_slot_name',
+{ name => 'ssl_key_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Location of the SSL server private key file.',
+ variable => 'ssl_key_file',
+ boot_val => '"server.key"',
},
-{ name => 'client_encoding', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets the client\'s character set encoding.',
- flags => 'GUC_IS_NAME | GUC_REPORT',
- variable => 'client_encoding_string',
- boot_val => '"SQL_ASCII"',
- check_hook => 'check_client_encoding',
- assign_hook => 'assign_client_encoding',
+{ name => 'ssl_library', type => 'string', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the name of the SSL library.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'ssl_library',
+ boot_val => 'SSL_LIBRARY',
},
-{ name => 'log_line_prefix', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
- short_desc => 'Controls information prefixed to each log line.',
- long_desc => 'An empty string means no prefix.',
- variable => 'Log_line_prefix',
- boot_val => '"%m [%p] "',
+{ name => 'ssl_max_protocol_version', type => 'enum', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Sets the maximum SSL/TLS protocol version to use.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'ssl_max_protocol_version',
+ boot_val => 'PG_TLS_ANY',
+ options => 'ssl_protocol_versions_info',
},
-{ name => 'log_timezone', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT',
- short_desc => 'Sets the time zone to use in log messages.',
- variable => 'log_timezone_string',
- boot_val => '"GMT"',
- check_hook => 'check_log_timezone',
- assign_hook => 'assign_log_timezone',
- show_hook => 'show_log_timezone',
+{ name => 'ssl_min_protocol_version', type => 'enum', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Sets the minimum SSL/TLS protocol version to use.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'ssl_min_protocol_version',
+ boot_val => 'PG_TLS1_2_VERSION',
+ options => 'ssl_protocol_versions_info + 1', # don't allow PG_TLS_ANY
},
-{ name => 'DateStyle', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets the display format for date and time values.',
- long_desc => 'Also controls interpretation of ambiguous date inputs.',
- flags => 'GUC_LIST_INPUT | GUC_REPORT',
- variable => 'datestyle_string',
- boot_val => '"ISO, MDY"',
- check_hook => 'check_datestyle',
- assign_hook => 'assign_datestyle',
+{ name => 'ssl_passphrase_command', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Command to obtain passphrases for SSL.',
+ long_desc => 'An empty string means use the built-in prompting mechanism.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'ssl_passphrase_command',
+ boot_val => '""',
},
-{ name => 'default_table_access_method', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the default table access method for new tables.',
- flags => 'GUC_IS_NAME',
- variable => 'default_table_access_method',
- boot_val => 'DEFAULT_TABLE_ACCESS_METHOD',
- check_hook => 'check_default_table_access_method',
+{ name => 'ssl_passphrase_command_supports_reload', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Controls whether "ssl_passphrase_command" is called during server reload.',
+ variable => 'ssl_passphrase_command_supports_reload',
+ boot_val => 'false',
},
-{ name => 'default_tablespace', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the default tablespace to create tables and indexes in.',
- long_desc => 'An empty string means use the database\'s default tablespace.',
- flags => 'GUC_IS_NAME',
- variable => 'default_tablespace',
- boot_val => '""',
- check_hook => 'check_default_tablespace',
+{ name => 'ssl_prefer_server_ciphers', type => 'bool', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Give priority to server ciphersuite order.',
+ variable => 'SSLPreferServerCiphers',
+ boot_val => 'true',
},
-{ name => 'temp_tablespaces', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the tablespace(s) to use for temporary tables and sort files.',
- long_desc => 'An empty string means use the database\'s default tablespace.',
- flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE',
- variable => 'temp_tablespaces',
- boot_val => '""',
- check_hook => 'check_temp_tablespaces',
- assign_hook => 'assign_temp_tablespaces',
+{ name => 'ssl_renegotiation_limit', type => 'int', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
+ short_desc => 'SSL renegotiation is no longer supported; this can only be 0.',
+ flags => 'GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'ssl_renegotiation_limit',
+ boot_val => '0',
+ min => '0',
+ max => '0',
},
-{ name => 'createrole_self_grant', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets whether a CREATEROLE user automatically grants the role to themselves, and with which options.',
- long_desc => 'An empty string disables automatic self grants.',
- flags => 'GUC_LIST_INPUT',
- variable => 'createrole_self_grant',
+{ name => 'ssl_tls13_ciphers', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
+ short_desc => 'Sets the list of allowed TLSv1.3 cipher suites.',
+ long_desc => 'An empty string means use the default cipher suites.',
+ flags => 'GUC_SUPERUSER_ONLY',
+ variable => 'SSLCipherSuites',
boot_val => '""',
- check_hook => 'check_createrole_self_grant',
- assign_hook => 'assign_createrole_self_grant',
},
-{ name => 'dynamic_library_path', type => 'string', context => 'PGC_SUSET', group => 'CLIENT_CONN_OTHER',
- short_desc => 'Sets the path for dynamically loadable modules.',
- long_desc => 'If a dynamically loadable module needs to be opened and the specified name does not have a directory component (i.e., the name does not contain a slash), the system will search this path for the specified file.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'Dynamic_library_path',
- boot_val => '"$libdir"',
+{ name => 'standard_conforming_strings', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
+ short_desc => 'Causes \'...\' strings to treat backslashes literally.',
+ flags => 'GUC_REPORT',
+ variable => 'standard_conforming_strings',
+ boot_val => 'true',
},
-{ name => 'extension_control_path', type => 'string', context => 'PGC_SUSET', group => 'CLIENT_CONN_OTHER',
- short_desc => 'Sets the path for extension control files.',
- long_desc => 'The remaining extension script and secondary control files are then loaded from the same directory where the primary control file was found.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'Extension_control_path',
- boot_val => '"$system"',
+{ name => 'statement_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the maximum allowed duration of any statement.',
+ long_desc => '0 disables the timeout.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'StatementTimeout',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
},
-{ name => 'krb_server_keyfile', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
- short_desc => 'Sets the location of the Kerberos server key file.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'pg_krb_server_keyfile',
- boot_val => 'PG_KRB_SRVTAB',
+{ name => 'stats_fetch_consistency', type => 'enum', context => 'PGC_USERSET', group => 'STATS_CUMULATIVE',
+ short_desc => 'Sets the consistency of accesses to statistics data.',
+ variable => 'pgstat_fetch_consistency',
+ boot_val => 'PGSTAT_FETCH_CONSISTENCY_CACHE',
+ options => 'stats_fetch_consistency',
+ assign_hook => 'assign_stats_fetch_consistency',
},
-{ name => 'bonjour_name', type => 'string', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the Bonjour service name.',
- long_desc => 'An empty string means use the computer name.',
- variable => 'bonjour_name',
- boot_val => '""',
+{ name => 'subtransaction_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the size of the dedicated buffer pool used for the subtransaction cache.',
+ long_desc => '0 means use a fraction of "shared_buffers".',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'subtransaction_buffers',
+ boot_val => '0',
+ min => '0',
+ max => 'SLRU_MAX_ALLOWED_BUFFERS',
+ check_hook => 'check_subtrans_buffers',
},
-{ name => 'lc_messages', type => 'string', context => 'PGC_SUSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets the language in which messages are displayed.',
- long_desc => 'An empty string means use the operating system setting.',
- variable => 'locale_messages',
- boot_val => '""',
- check_hook => 'check_locale_messages',
- assign_hook => 'assign_locale_messages',
+{ name => 'summarize_wal', type => 'bool', context => 'PGC_SIGHUP', group => 'WAL_SUMMARIZATION',
+ short_desc => 'Starts the WAL summarizer process to enable incremental backup.',
+ variable => 'summarize_wal',
+ boot_val => 'false',
},
-{ name => 'lc_monetary', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets the locale for formatting monetary amounts.',
- long_desc => 'An empty string means use the operating system setting.',
- variable => 'locale_monetary',
- boot_val => '"C"',
- check_hook => 'check_locale_monetary',
- assign_hook => 'assign_locale_monetary',
+# see max_connections
+{ name => 'superuser_reserved_connections', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the number of connection slots reserved for superusers.',
+ variable => 'SuperuserReservedConnections',
+ boot_val => '3',
+ min => '0',
+ max => 'MAX_BACKENDS',
},
-{ name => 'lc_numeric', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets the locale for formatting numbers.',
- long_desc => 'An empty string means use the operating system setting.',
- variable => 'locale_numeric',
- boot_val => '"C"',
- check_hook => 'check_locale_numeric',
- assign_hook => 'assign_locale_numeric',
+{ name => 'sync_replication_slots', type => 'bool', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Enables a physical standby to synchronize logical failover replication slots from the primary server.',
+ variable => 'sync_replication_slots',
+ boot_val => 'false',
},
-{ name => 'lc_time', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets the locale for formatting date and time values.',
- long_desc => 'An empty string means use the operating system setting.',
- variable => 'locale_time',
- boot_val => '"C"',
- check_hook => 'check_locale_time',
- assign_hook => 'assign_locale_time',
+{ name => 'synchronize_seqscans', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
+ short_desc => 'Enables synchronized sequential scans.',
+ variable => 'synchronize_seqscans',
+ boot_val => 'true',
},
-{ name => 'session_preload_libraries', type => 'string', context => 'PGC_SUSET', group => 'CLIENT_CONN_PRELOAD',
- short_desc => 'Lists shared libraries to preload into each backend.',
- flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY',
- variable => 'session_preload_libraries_string',
+{ name => 'synchronized_standby_slots', type => 'string', context => 'PGC_SIGHUP', group => 'REPLICATION_PRIMARY',
+ short_desc => 'Lists streaming replication standby server replication slot names that logical WAL sender processes will wait for.',
+ long_desc => 'Logical WAL sender processes will send decoded changes to output plugins only after the specified replication slots have confirmed receiving WAL.',
+ flags => 'GUC_LIST_INPUT',
+ variable => 'synchronized_standby_slots',
boot_val => '""',
+ check_hook => 'check_synchronized_standby_slots',
+ assign_hook => 'assign_synchronized_standby_slots',
},
-{ name => 'shared_preload_libraries', type => 'string', context => 'PGC_POSTMASTER', group => 'CLIENT_CONN_PRELOAD',
- short_desc => 'Lists shared libraries to preload into server.',
- flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY',
- variable => 'shared_preload_libraries_string',
- boot_val => '""',
+{ name => 'synchronous_commit', type => 'enum', context => 'PGC_USERSET', group => 'WAL_SETTINGS',
+ short_desc => 'Sets the current transaction\'s synchronization level.',
+ variable => 'synchronous_commit',
+ boot_val => 'SYNCHRONOUS_COMMIT_ON',
+ options => 'synchronous_commit_options',
+ assign_hook => 'assign_synchronous_commit',
},
-{ name => 'local_preload_libraries', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_PRELOAD',
- short_desc => 'Lists unprivileged shared libraries to preload into each backend.',
- flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE',
- variable => 'local_preload_libraries_string',
+{ name => 'synchronous_standby_names', type => 'string', context => 'PGC_SIGHUP', group => 'REPLICATION_PRIMARY',
+ short_desc => 'Number of synchronous standbys and list of names of potential synchronous ones.',
+ flags => 'GUC_LIST_INPUT',
+ variable => 'SyncRepStandbyNames',
boot_val => '""',
+ check_hook => 'check_synchronous_standby_names',
+ assign_hook => 'assign_synchronous_standby_names',
},
-{ name => 'search_path', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the schema search order for names that are not schema-qualified.',
- flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_EXPLAIN | GUC_REPORT',
- variable => 'namespace_search_path',
- boot_val => '"\"$user\", public"',
- check_hook => 'check_search_path',
- assign_hook => 'assign_search_path',
+{ name => 'syslog_facility', type => 'enum', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the syslog "facility" to be used when syslog enabled.',
+ variable => 'syslog_facility',
+ boot_val => 'DEFAULT_SYSLOG_FACILITY',
+ options => 'syslog_facility_options',
+ assign_hook => 'assign_syslog_facility',
},
-# Can't be set in postgresql.conf
-{ name => 'server_encoding', type => 'string', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the server (database) character set encoding.',
- flags => 'GUC_IS_NAME | GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'server_encoding_string',
- boot_val => '"SQL_ASCII"',
+{ name => 'syslog_ident', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Sets the program name used to identify PostgreSQL messages in syslog.',
+ variable => 'syslog_ident_str',
+ boot_val => '"postgres"',
+ assign_hook => 'assign_syslog_ident',
},
-# Can't be set in postgresql.conf
-{ name => 'server_version', type => 'string', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the server version.',
- flags => 'GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'server_version_string',
- boot_val => 'PG_VERSION',
+{ name => 'syslog_sequence_numbers', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Add sequence number to syslog messages to avoid duplicate suppression.',
+ variable => 'syslog_sequence_numbers',
+ boot_val => 'true',
},
-# Not for general use --- used by SET ROLE
-{ name => 'role', type => 'string', context => 'PGC_USERSET', group => 'UNGROUPED',
- short_desc => 'Sets the current role.',
- flags => 'GUC_IS_NAME | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_NOT_WHILE_SEC_REST',
- variable => 'role_string',
- boot_val => '"none"',
- check_hook => 'check_role',
- assign_hook => 'assign_role',
- show_hook => 'show_role',
+{ name => 'syslog_split_messages', type => 'bool', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
+ short_desc => 'Split messages sent to syslog by lines and to fit into 1024 bytes.',
+ variable => 'syslog_split_messages',
+ boot_val => 'true',
},
-# Not for general use --- used by SET SESSION AUTHORIZATION
-{ name => 'session_authorization', type => 'string', context => 'PGC_USERSET', group => 'UNGROUPED',
- short_desc => 'Sets the session user name.',
- flags => 'GUC_IS_NAME | GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_NOT_WHILE_SEC_REST',
- variable => 'session_authorization_string',
- boot_val => 'NULL',
- check_hook => 'check_session_authorization',
- assign_hook => 'assign_session_authorization',
+{ name => 'tcp_keepalives_count', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
+ short_desc => 'Maximum number of TCP keepalive retransmits.',
+ long_desc => 'Number of consecutive keepalive retransmits that can be lost before a connection is considered dead. 0 means use the system default.',
+ variable => 'tcp_keepalives_count',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
+ assign_hook => 'assign_tcp_keepalives_count',
+ show_hook => 'show_tcp_keepalives_count',
},
-{ name => 'log_destination', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Sets the destination for server log output.',
- long_desc => 'Valid values are combinations of "stderr", "syslog", "csvlog", "jsonlog", and "eventlog", depending on the platform.',
- flags => 'GUC_LIST_INPUT',
- variable => 'Log_destination_string',
- boot_val => '"stderr"',
- check_hook => 'check_log_destination',
- assign_hook => 'assign_log_destination',
+{ name => 'tcp_keepalives_idle', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
+ short_desc => 'Time between issuing TCP keepalives.',
+ long_desc => '0 means use the system default.',
+ flags => 'GUC_UNIT_S',
+ variable => 'tcp_keepalives_idle',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
+ assign_hook => 'assign_tcp_keepalives_idle',
+ show_hook => 'show_tcp_keepalives_idle',
},
-{ name => 'log_directory', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Sets the destination directory for log files.',
- long_desc => 'Can be specified as relative to the data directory or as absolute path.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'Log_directory',
- boot_val => '"log"',
- check_hook => 'check_canonical_path',
+{ name => 'tcp_keepalives_interval', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
+ short_desc => 'Time between TCP keepalive retransmits.',
+ long_desc => '0 means use the system default.',
+ flags => 'GUC_UNIT_S',
+ variable => 'tcp_keepalives_interval',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
+ assign_hook => 'assign_tcp_keepalives_interval',
+ show_hook => 'show_tcp_keepalives_interval',
},
-{ name => 'log_filename', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Sets the file name pattern for log files.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'Log_filename',
- boot_val => '"postgresql-%Y-%m-%d_%H%M%S.log"',
+{ name => 'tcp_user_timeout', type => 'int', context => 'PGC_USERSET', group => 'CONN_AUTH_TCP',
+ short_desc => 'TCP user timeout.',
+ long_desc => '0 means use the system default.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'tcp_user_timeout',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
+ assign_hook => 'assign_tcp_user_timeout',
+ show_hook => 'show_tcp_user_timeout',
},
-{ name => 'syslog_ident', type => 'string', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Sets the program name used to identify PostgreSQL messages in syslog.',
- variable => 'syslog_ident_str',
- boot_val => '"postgres"',
- assign_hook => 'assign_syslog_ident',
+{ name => 'temp_buffers', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the maximum number of temporary buffers used by each session.',
+ flags => 'GUC_UNIT_BLOCKS | GUC_EXPLAIN',
+ variable => 'num_temp_buffers',
+ boot_val => '1024',
+ min => '100',
+ max => 'INT_MAX / 2',
+ check_hook => 'check_temp_buffers',
},
-{ name => 'event_source', type => 'string', context => 'PGC_POSTMASTER', group => 'LOGGING_WHERE',
- short_desc => 'Sets the application name used to identify PostgreSQL messages in the event log.',
- variable => 'event_source',
- boot_val => 'DEFAULT_EVENT_SOURCE',
+{ name => 'temp_file_limit', type => 'int', context => 'PGC_SUSET', group => 'RESOURCES_DISK',
+ short_desc => 'Limits the total size of all temporary files used by each process.',
+ long_desc => '-1 means no limit.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'temp_file_limit',
+ boot_val => '-1',
+ min => '-1',
+ max => 'INT_MAX',
+},
+
+{ name => 'temp_tablespaces', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the tablespace(s) to use for temporary tables and sort files.',
+ long_desc => 'An empty string means use the database\'s default tablespace.',
+ flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE',
+ variable => 'temp_tablespaces',
+ boot_val => '""',
+ check_hook => 'check_temp_tablespaces',
+ assign_hook => 'assign_temp_tablespaces',
},
{ name => 'TimeZone', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
@@ -2955,410 +2955,401 @@
assign_hook => 'assign_timezone_abbreviations',
},
-{ name => 'unix_socket_group', type => 'string', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the owning group of the Unix-domain socket.',
- long_desc => 'The owning user of the socket is always the user that starts the server. An empty string means use the user\'s default group.',
- variable => 'Unix_socket_group',
- boot_val => '""',
-},
-
-{ name => 'unix_socket_directories', type => 'string', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the directories where Unix-domain sockets will be created.',
- flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY',
- variable => 'Unix_socket_directories',
- boot_val => 'DEFAULT_PGSOCKET_DIR',
-},
-
-{ name => 'listen_addresses', type => 'string', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
- short_desc => 'Sets the host name or IP address(es) to listen to.',
- flags => 'GUC_LIST_INPUT',
- variable => 'ListenAddresses',
- boot_val => '"localhost"',
-},
-
-# Can't be set by ALTER SYSTEM as it can lead to recursive definition
-# of data_directory.
-{ name => 'data_directory', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
- short_desc => 'Sets the server\'s data directory.',
- flags => 'GUC_SUPERUSER_ONLY | GUC_DISALLOW_IN_AUTO_FILE',
- variable => 'data_directory',
- boot_val => 'NULL',
-},
-
-{ name => 'config_file', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
- short_desc => 'Sets the server\'s main configuration file.',
- flags => 'GUC_DISALLOW_IN_FILE | GUC_SUPERUSER_ONLY',
- variable => 'ConfigFileName',
- boot_val => 'NULL',
-},
-
-{ name => 'hba_file', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
- short_desc => 'Sets the server\'s "hba" configuration file.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'HbaFileName',
- boot_val => 'NULL',
-},
-
-{ name => 'ident_file', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
- short_desc => 'Sets the server\'s "ident" configuration file.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'IdentFileName',
- boot_val => 'NULL',
+{ name => 'trace_connection_negotiation', type => 'bool', context => 'PGC_POSTMASTER', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Logs details of pre-authentication connection handshake.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Trace_connection_negotiation',
+ boot_val => 'false',
},
-{ name => 'external_pid_file', type => 'string', context => 'PGC_POSTMASTER', group => 'FILE_LOCATIONS',
- short_desc => 'Writes the postmaster PID to the specified file.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'external_pid_file',
- boot_val => 'NULL',
- check_hook => 'check_canonical_path',
+{ name => 'trace_lock_oidmin', type => 'int', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Sets the minimum OID of tables for tracking locks.',
+ long_desc => 'Is used to avoid output on system tables.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Trace_lock_oidmin',
+ boot_val => 'FirstNormalObjectId',
+ min => '0',
+ max => 'INT_MAX',
+ ifdef => 'LOCK_DEBUG',
},
-{ name => 'ssl_library', type => 'string', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Shows the name of the SSL library.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'ssl_library',
- boot_val => 'SSL_LIBRARY',
+{ name => 'trace_lock_table', type => 'int', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Sets the OID of the table with unconditionally lock tracing.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Trace_lock_table',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
+ ifdef => 'LOCK_DEBUG',
},
-{ name => 'ssl_cert_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Location of the SSL server certificate file.',
- variable => 'ssl_cert_file',
- boot_val => '"server.crt"',
+{ name => 'trace_locks', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Emits information about lock usage.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Trace_locks',
+ boot_val => 'false',
+ ifdef => 'LOCK_DEBUG',
},
-{ name => 'ssl_key_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Location of the SSL server private key file.',
- variable => 'ssl_key_file',
- boot_val => '"server.key"',
+{ name => 'trace_lwlocks', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Emits information about lightweight lock usage.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Trace_lwlocks',
+ boot_val => 'false',
+ ifdef => 'LOCK_DEBUG',
},
-{ name => 'ssl_ca_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Location of the SSL certificate authority file.',
- variable => 'ssl_ca_file',
- boot_val => '""',
+{ name => 'trace_notify', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Generates debugging output for LISTEN and NOTIFY.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Trace_notify',
+ boot_val => 'false',
},
-{ name => 'ssl_crl_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Location of the SSL certificate revocation list file.',
- variable => 'ssl_crl_file',
- boot_val => '""',
+{ name => 'trace_sort', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Emit information about resource usage in sorting.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'trace_sort',
+ boot_val => 'false',
},
-{ name => 'ssl_crl_dir', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Location of the SSL certificate revocation list directory.',
- variable => 'ssl_crl_dir',
- boot_val => '""',
+# this is undocumented because not exposed in a standard build
+{ name => 'trace_syncscan', type => 'bool', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Generate debugging output for synchronized scanning.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'trace_syncscan',
+ boot_val => 'false',
+ ifdef => 'TRACE_SYNCSCAN',
},
-{ name => 'synchronous_standby_names', type => 'string', context => 'PGC_SIGHUP', group => 'REPLICATION_PRIMARY',
- short_desc => 'Number of synchronous standbys and list of names of potential synchronous ones.',
- flags => 'GUC_LIST_INPUT',
- variable => 'SyncRepStandbyNames',
- boot_val => '""',
- check_hook => 'check_synchronous_standby_names',
- assign_hook => 'assign_synchronous_standby_names',
+{ name => 'trace_userlocks', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Emits information about user lock usage.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'Trace_userlocks',
+ boot_val => 'false',
+ ifdef => 'LOCK_DEBUG',
},
-{ name => 'default_text_search_config', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets default text search configuration.',
- variable => 'TSCurrentConfig',
- boot_val => '"pg_catalog.simple"',
- check_hook => 'check_default_text_search_config',
- assign_hook => 'assign_default_text_search_config',
+{ name => 'track_activities', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
+ short_desc => 'Collects information about executing commands.',
+ long_desc => 'Enables the collection of information on the currently executing command of each session, along with the time at which that command began execution.',
+ variable => 'pgstat_track_activities',
+ boot_val => 'true',
},
-{ name => 'ssl_tls13_ciphers', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Sets the list of allowed TLSv1.3 cipher suites.',
- long_desc => 'An empty string means use the default cipher suites.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'SSLCipherSuites',
- boot_val => '""',
+{ name => 'track_activity_query_size', type => 'int', context => 'PGC_POSTMASTER', group => 'STATS_CUMULATIVE',
+ short_desc => 'Sets the size reserved for pg_stat_activity.query, in bytes.',
+ flags => 'GUC_UNIT_BYTE',
+ variable => 'pgstat_track_activity_query_size',
+ boot_val => '1024',
+ min => '100',
+ max => '1048576',
},
-{ name => 'ssl_ciphers', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Sets the list of allowed TLSv1.2 (and lower) ciphers.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'SSLCipherList',
- boot_val => 'DEFAULT_SSL_CIPHERS',
+{ name => 'track_commit_timestamp', type => 'bool', context => 'PGC_POSTMASTER', group => 'REPLICATION_SENDING',
+ short_desc => 'Collects transaction commit time.',
+ variable => 'track_commit_timestamp',
+ boot_val => 'false',
},
-{ name => 'ssl_groups', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Sets the group(s) to use for Diffie-Hellman key exchange.',
- long_desc => 'Multiple groups can be specified using a colon-separated list.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'SSLECDHCurve',
- boot_val => 'DEFAULT_SSL_GROUPS',
+{ name => 'track_cost_delay_timing', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
+ short_desc => 'Collects timing statistics for cost-based vacuum delay.',
+ variable => 'track_cost_delay_timing',
+ boot_val => 'false',
},
-{ name => 'ssl_dh_params_file', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Location of the SSL DH parameters file.',
- long_desc => 'An empty string means use compiled-in default parameters.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'ssl_dh_params_file',
- boot_val => '""',
+{ name => 'track_counts', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
+ short_desc => 'Collects statistics on database activity.',
+ variable => 'pgstat_track_counts',
+ boot_val => 'true',
},
-{ name => 'ssl_passphrase_command', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Command to obtain passphrases for SSL.',
- long_desc => 'An empty string means use the built-in prompting mechanism.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'ssl_passphrase_command',
- boot_val => '""',
+{ name => 'track_functions', type => 'enum', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
+ short_desc => 'Collects function-level statistics on database activity.',
+ variable => 'pgstat_track_functions',
+ boot_val => 'TRACK_FUNC_OFF',
+ options => 'track_function_options',
},
-{ name => 'application_name', type => 'string', context => 'PGC_USERSET', group => 'LOGGING_WHAT',
- short_desc => 'Sets the application name to be reported in statistics and logs.',
- flags => 'GUC_IS_NAME | GUC_REPORT | GUC_NOT_IN_SAMPLE',
- variable => 'application_name',
- boot_val => '""',
- check_hook => 'check_application_name',
- assign_hook => 'assign_application_name',
+{ name => 'track_io_timing', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
+ short_desc => 'Collects timing statistics for database I/O activity.',
+ variable => 'track_io_timing',
+ boot_val => 'false',
},
-{ name => 'cluster_name', type => 'string', context => 'PGC_POSTMASTER', group => 'PROCESS_TITLE',
- short_desc => 'Sets the name of the cluster, which is included in the process title.',
- flags => 'GUC_IS_NAME',
- variable => 'cluster_name',
- boot_val => '""',
- check_hook => 'check_cluster_name',
+{ name => 'track_wal_io_timing', type => 'bool', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
+ short_desc => 'Collects timing statistics for WAL I/O activity.',
+ variable => 'track_wal_io_timing',
+ boot_val => 'false',
},
-{ name => 'wal_consistency_checking', type => 'string', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Sets the WAL resource managers for which WAL consistency checks are done.',
- long_desc => 'Full-page images will be logged for all data blocks and cross-checked against the results of WAL replay.',
- flags => 'GUC_LIST_INPUT | GUC_NOT_IN_SAMPLE',
- variable => 'wal_consistency_checking_string',
- boot_val => '""',
- check_hook => 'check_wal_consistency_checking',
- assign_hook => 'assign_wal_consistency_checking',
+{ name => 'transaction_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the size of the dedicated buffer pool used for the transaction status cache.',
+ long_desc => '0 means use a fraction of "shared_buffers".',
+ flags => 'GUC_UNIT_BLOCKS',
+ variable => 'transaction_buffers',
+ boot_val => '0',
+ min => '0',
+ max => 'SLRU_MAX_ALLOWED_BUFFERS',
+ check_hook => 'check_transaction_buffers',
},
-{ name => 'jit_provider', type => 'string', context => 'PGC_POSTMASTER', group => 'CLIENT_CONN_PRELOAD',
- short_desc => 'JIT provider to use.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'jit_provider',
- boot_val => '"llvmjit"',
+{ name => 'transaction_deferrable', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Whether to defer a read-only serializable transaction until it can be executed with no possible serialization failures.',
+ flags => 'GUC_NO_RESET | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'XactDeferrable',
+ boot_val => 'false',
+ check_hook => 'check_transaction_deferrable',
},
-{ name => 'backtrace_functions', type => 'string', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Log backtrace for errors in these functions.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'backtrace_functions',
- boot_val => '""',
- check_hook => 'check_backtrace_functions',
- assign_hook => 'assign_backtrace_functions',
+{ name => 'transaction_isolation', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the current transaction\'s isolation level.',
+ flags => 'GUC_NO_RESET | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'XactIsoLevel',
+ boot_val => 'XACT_READ_COMMITTED',
+ options => 'isolation_level_options',
+ check_hook => 'check_transaction_isolation',
},
-{ name => 'debug_io_direct', type => 'string', context => 'PGC_POSTMASTER', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Use direct I/O for file access.',
- long_desc => 'An empty string disables direct I/O.',
- flags => 'GUC_LIST_INPUT | GUC_NOT_IN_SAMPLE',
- variable => 'debug_io_direct_string',
- boot_val => '""',
- check_hook => 'check_debug_io_direct',
- assign_hook => 'assign_debug_io_direct',
+{ name => 'transaction_read_only', type => 'bool', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the current transaction\'s read-only status.',
+ flags => 'GUC_NO_RESET | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'XactReadOnly',
+ boot_val => 'false',
+ check_hook => 'check_transaction_read_only',
},
-{ name => 'synchronized_standby_slots', type => 'string', context => 'PGC_SIGHUP', group => 'REPLICATION_PRIMARY',
- short_desc => 'Lists streaming replication standby server replication slot names that logical WAL sender processes will wait for.',
- long_desc => 'Logical WAL sender processes will send decoded changes to output plugins only after the specified replication slots have confirmed receiving WAL.',
- flags => 'GUC_LIST_INPUT',
- variable => 'synchronized_standby_slots',
- boot_val => '""',
- check_hook => 'check_synchronized_standby_slots',
- assign_hook => 'assign_synchronized_standby_slots',
+{ name => 'transaction_timeout', type => 'int', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets the maximum allowed duration of any transaction within a session (not a prepared transaction).',
+ long_desc => '0 disables the timeout.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'TransactionTimeout',
+ boot_val => '0',
+ min => '0',
+ max => 'INT_MAX',
+ assign_hook => 'assign_transaction_timeout',
+},
+
+{ name => 'transform_null_equals', type => 'bool', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_OTHER',
+ short_desc => 'Treats "expr=NULL" as "expr IS NULL".',
+ long_desc => 'When turned on, expressions of the form expr = NULL (or NULL = expr) are treated as expr IS NULL, that is, they return true if expr evaluates to the null value, and false otherwise. The correct behavior of expr = NULL is to always return null (unknown).',
+ variable => 'Transform_null_equals',
+ boot_val => 'false',
},
-{ name => 'restrict_nonsystem_relation_kind', type => 'string', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Prohibits access to non-system relations of specified kinds.',
- flags => 'GUC_LIST_INPUT | GUC_NOT_IN_SAMPLE',
- variable => 'restrict_nonsystem_relation_kind_string',
- boot_val => '""',
- check_hook => 'check_restrict_nonsystem_relation_kind',
- assign_hook => 'assign_restrict_nonsystem_relation_kind',
+{ name => 'unix_socket_directories', type => 'string', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the directories where Unix-domain sockets will be created.',
+ flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY',
+ variable => 'Unix_socket_directories',
+ boot_val => 'DEFAULT_PGSOCKET_DIR',
},
-{ name => 'oauth_validator_libraries', type => 'string', context => 'PGC_SIGHUP', group => 'CONN_AUTH_AUTH',
- short_desc => 'Lists libraries that may be called to validate OAuth v2 bearer tokens.',
- flags => 'GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY',
- variable => 'oauth_validator_libraries_string',
+{ name => 'unix_socket_group', type => 'string', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the owning group of the Unix-domain socket.',
+ long_desc => 'The owning user of the socket is always the user that starts the server. An empty string means use the user\'s default group.',
+ variable => 'Unix_socket_group',
boot_val => '""',
},
-{ name => 'log_connections', type => 'string', context => 'PGC_SU_BACKEND', group => 'LOGGING_WHAT',
- short_desc => 'Logs specified aspects of connection establishment and setup.',
- flags => 'GUC_LIST_INPUT',
- variable => 'log_connections_string',
- boot_val => '""',
- check_hook => 'check_log_connections',
- assign_hook => 'assign_log_connections',
+{ name => 'unix_socket_permissions', type => 'int', context => 'PGC_POSTMASTER', group => 'CONN_AUTH_SETTINGS',
+ short_desc => 'Sets the access permissions of the Unix-domain socket.',
+ long_desc => 'Unix-domain sockets use the usual Unix file system permission set. The parameter value is expected to be a numeric mode specification in the form accepted by the chmod and umask system calls. (To use the customary octal format the number must start with a 0 (zero).)',
+ variable => 'Unix_socket_permissions',
+ boot_val => '0777',
+ min => '0000',
+ max => '0777',
+ show_hook => 'show_unix_socket_permissions',
},
-{ name => 'backslash_quote', type => 'enum', context => 'PGC_USERSET', group => 'COMPAT_OPTIONS_PREVIOUS',
- short_desc => 'Sets whether "\\\\\'" is allowed in string literals.',
- variable => 'backslash_quote',
- boot_val => 'BACKSLASH_QUOTE_SAFE_ENCODING',
- options => 'backslash_quote_options',
+{ name => 'update_process_title', type => 'bool', context => 'PGC_SUSET', group => 'PROCESS_TITLE',
+ short_desc => 'Updates the process title to show the active SQL command.',
+ long_desc => 'Enables updating of the process title every time a new SQL command is received by the server.',
+ variable => 'update_process_title',
+ boot_val => 'DEFAULT_UPDATE_PROCESS_TITLE',
},
-{ name => 'bytea_output', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the output format for bytea.',
- variable => 'bytea_output',
- boot_val => 'BYTEA_OUTPUT_HEX',
- options => 'bytea_output_options',
+{ name => 'vacuum_buffer_usage_limit', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the buffer pool size for VACUUM, ANALYZE, and autovacuum.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'VacuumBufferUsageLimit',
+ boot_val => '2048',
+ min => '0',
+ max => 'MAX_BAS_VAC_RING_SIZE_KB',
+ check_hook => 'check_vacuum_buffer_usage_limit',
},
-{ name => 'client_min_messages', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the message levels that are sent to the client.',
- long_desc => 'Each level includes all the levels that follow it. The later the level, the fewer messages are sent.',
- variable => 'client_min_messages',
- boot_val => 'NOTICE',
- options => 'client_message_level_options',
+{ name => 'vacuum_cost_delay', type => 'real', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
+ short_desc => 'Vacuum cost delay in milliseconds.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'VacuumCostDelay',
+ boot_val => '0',
+ min => '0',
+ max => '100',
},
-{ name => 'compute_query_id', type => 'enum', context => 'PGC_SUSET', group => 'STATS_MONITORING',
- short_desc => 'Enables in-core computation of query identifiers.',
- variable => 'compute_query_id',
- boot_val => 'COMPUTE_QUERY_ID_AUTO',
- options => 'compute_query_id_options',
+{ name => 'vacuum_cost_limit', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
+ short_desc => 'Vacuum cost amount available before napping.',
+ variable => 'VacuumCostLimit',
+ boot_val => '200',
+ min => '1',
+ max => '10000',
},
-{ name => 'constraint_exclusion', type => 'enum', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
- short_desc => 'Enables the planner to use constraints to optimize queries.',
- long_desc => 'Table scans will be skipped if their constraints guarantee that no rows match the query.',
- flags => 'GUC_EXPLAIN',
- variable => 'constraint_exclusion',
- boot_val => 'CONSTRAINT_EXCLUSION_PARTITION',
- options => 'constraint_exclusion_options',
+{ name => 'vacuum_cost_page_dirty', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
+ short_desc => 'Vacuum cost for a page dirtied by vacuum.',
+ variable => 'VacuumCostPageDirty',
+ boot_val => '20',
+ min => '0',
+ max => '10000',
},
-{ name => 'default_toast_compression', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the default compression method for compressible values.',
- variable => 'default_toast_compression',
- boot_val => 'TOAST_PGLZ_COMPRESSION',
- options => 'default_toast_compression_options',
+{ name => 'vacuum_cost_page_hit', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
+ short_desc => 'Vacuum cost for a page found in the buffer cache.',
+ variable => 'VacuumCostPageHit',
+ boot_val => '1',
+ min => '0',
+ max => '10000',
},
-{ name => 'default_transaction_isolation', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the transaction isolation level of each new transaction.',
- variable => 'DefaultXactIsoLevel',
- boot_val => 'XACT_READ_COMMITTED',
- options => 'isolation_level_options',
+{ name => 'vacuum_cost_page_miss', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_COST_DELAY',
+ short_desc => 'Vacuum cost for a page not found in the buffer cache.',
+ variable => 'VacuumCostPageMiss',
+ boot_val => '2',
+ min => '0',
+ max => '10000',
},
-{ name => 'transaction_isolation', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the current transaction\'s isolation level.',
- flags => 'GUC_NO_RESET | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'XactIsoLevel',
- boot_val => 'XACT_READ_COMMITTED',
- options => 'isolation_level_options',
- check_hook => 'check_transaction_isolation',
+{ name => 'vacuum_failsafe_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
+ short_desc => 'Age at which VACUUM should trigger failsafe to avoid a wraparound outage.',
+ variable => 'vacuum_failsafe_age',
+ boot_val => '1600000000',
+ min => '0',
+ max => '2100000000',
},
-{ name => 'IntervalStyle', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Sets the display format for interval values.',
- flags => 'GUC_REPORT',
- variable => 'IntervalStyle',
- boot_val => 'INTSTYLE_POSTGRES',
- options => 'intervalstyle_options',
+{ name => 'vacuum_freeze_min_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
+ short_desc => 'Minimum age at which VACUUM should freeze a table row.',
+ variable => 'vacuum_freeze_min_age',
+ boot_val => '50000000',
+ min => '0',
+ max => '1000000000',
},
-{ name => 'icu_validation_level', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_LOCALE',
- short_desc => 'Log level for reporting invalid ICU locale strings.',
- variable => 'icu_validation_level',
- boot_val => 'WARNING',
- options => 'icu_validation_level_options',
+{ name => 'vacuum_freeze_table_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
+ short_desc => 'Age at which VACUUM should scan whole table to freeze tuples.',
+ variable => 'vacuum_freeze_table_age',
+ boot_val => '150000000',
+ min => '0',
+ max => '2000000000',
},
-{ name => 'log_error_verbosity', type => 'enum', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
- short_desc => 'Sets the verbosity of logged messages.',
- variable => 'Log_error_verbosity',
- boot_val => 'PGERROR_DEFAULT',
- options => 'log_error_verbosity_options',
+{ name => 'vacuum_max_eager_freeze_failure_rate', type => 'real', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
+ short_desc => 'Fraction of pages in a relation vacuum can scan and fail to freeze before disabling eager scanning.',
+ long_desc => 'A value of 0.0 disables eager scanning and a value of 1.0 will eagerly scan up to 100 percent of the all-visible pages in the relation. If vacuum successfully freezes these pages, the cap is lower than 100 percent, because the goal is to amortize page freezing across multiple vacuums.',
+ variable => 'vacuum_max_eager_freeze_failure_rate',
+ boot_val => '0.03',
+ min => '0.0',
+ max => '1.0',
},
-{ name => 'log_min_messages', type => 'enum', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
- short_desc => 'Sets the message levels that are logged.',
- long_desc => 'Each level includes all the levels that follow it. The later the level, the fewer messages are sent.',
- variable => 'log_min_messages',
- boot_val => 'WARNING',
- options => 'server_message_level_options',
+{ name => 'vacuum_multixact_failsafe_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
+ short_desc => 'Multixact age at which VACUUM should trigger failsafe to avoid a wraparound outage.',
+ variable => 'vacuum_multixact_failsafe_age',
+ boot_val => '1600000000',
+ min => '0',
+ max => '2100000000',
},
-{ name => 'log_min_error_statement', type => 'enum', context => 'PGC_SUSET', group => 'LOGGING_WHEN',
- short_desc => 'Causes all statements generating error at or above this level to be logged.',
- long_desc => 'Each level includes all the levels that follow it. The later the level, the fewer messages are sent.',
- variable => 'log_min_error_statement',
- boot_val => 'ERROR',
- options => 'server_message_level_options',
+{ name => 'vacuum_multixact_freeze_min_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
+ short_desc => 'Minimum age at which VACUUM should freeze a MultiXactId in a table row.',
+ variable => 'vacuum_multixact_freeze_min_age',
+ boot_val => '5000000',
+ min => '0',
+ max => '1000000000',
},
-{ name => 'log_statement', type => 'enum', context => 'PGC_SUSET', group => 'LOGGING_WHAT',
- short_desc => 'Sets the type of statements logged.',
- variable => 'log_statement',
- boot_val => 'LOGSTMT_NONE',
- options => 'log_statement_options',
+{ name => 'vacuum_multixact_freeze_table_age', type => 'int', context => 'PGC_USERSET', group => 'VACUUM_FREEZING',
+ short_desc => 'Multixact age at which VACUUM should scan whole table to freeze tuples.',
+ variable => 'vacuum_multixact_freeze_table_age',
+ boot_val => '150000000',
+ min => '0',
+ max => '2000000000',
},
-{ name => 'syslog_facility', type => 'enum', context => 'PGC_SIGHUP', group => 'LOGGING_WHERE',
- short_desc => 'Sets the syslog "facility" to be used when syslog enabled.',
- variable => 'syslog_facility',
- boot_val => 'DEFAULT_SYSLOG_FACILITY',
- options => 'syslog_facility_options',
- assign_hook => 'assign_syslog_facility',
+{ name => 'vacuum_truncate', type => 'bool', context => 'PGC_USERSET', group => 'VACUUM_DEFAULT',
+ short_desc => 'Enables vacuum to truncate empty pages at the end of the table.',
+ variable => 'vacuum_truncate',
+ boot_val => 'true',
},
-{ name => 'session_replication_role', type => 'enum', context => 'PGC_SUSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets the session\'s behavior for triggers and rewrite rules.',
- variable => 'SessionReplicationRole',
- boot_val => 'SESSION_REPLICATION_ROLE_ORIGIN',
- options => 'session_replication_role_options',
- assign_hook => 'assign_session_replication_role',
+{ name => 'wal_block_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the block size in the write ahead log.',
+ flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
+ variable => 'wal_block_size',
+ boot_val => 'XLOG_BLCKSZ',
+ min => 'XLOG_BLCKSZ',
+ max => 'XLOG_BLCKSZ',
},
-{ name => 'synchronous_commit', type => 'enum', context => 'PGC_USERSET', group => 'WAL_SETTINGS',
- short_desc => 'Sets the current transaction\'s synchronization level.',
- variable => 'synchronous_commit',
- boot_val => 'SYNCHRONOUS_COMMIT_ON',
- options => 'synchronous_commit_options',
- assign_hook => 'assign_synchronous_commit',
+{ name => 'wal_buffers', type => 'int', context => 'PGC_POSTMASTER', group => 'WAL_SETTINGS',
+ short_desc => 'Sets the number of disk-page buffers in shared memory for WAL.',
+ long_desc => '-1 means use a fraction of "shared_buffers".',
+ flags => 'GUC_UNIT_XBLOCKS',
+ variable => 'XLOGbuffers',
+ boot_val => '-1',
+ min => '-1',
+ max => '(INT_MAX / XLOG_BLCKSZ)',
+ check_hook => 'check_wal_buffers',
},
-{ name => 'archive_mode', type => 'enum', context => 'PGC_POSTMASTER', group => 'WAL_ARCHIVING',
- short_desc => 'Allows archiving of WAL files using "archive_command".',
- variable => 'XLogArchiveMode',
- boot_val => 'ARCHIVE_MODE_OFF',
- options => 'archive_mode_options',
+{ name => 'wal_compression', type => 'enum', context => 'PGC_SUSET', group => 'WAL_SETTINGS',
+ short_desc => 'Compresses full-page writes written in WAL file with specified method.',
+ variable => 'wal_compression',
+ boot_val => 'WAL_COMPRESSION_NONE',
+ options => 'wal_compression_options',
+},
+
+{ name => 'wal_consistency_checking', type => 'string', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Sets the WAL resource managers for which WAL consistency checks are done.',
+ long_desc => 'Full-page images will be logged for all data blocks and cross-checked against the results of WAL replay.',
+ flags => 'GUC_LIST_INPUT | GUC_NOT_IN_SAMPLE',
+ variable => 'wal_consistency_checking_string',
+ boot_val => '""',
+ check_hook => 'check_wal_consistency_checking',
+ assign_hook => 'assign_wal_consistency_checking',
},
-{ name => 'recovery_target_action', type => 'enum', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY_TARGET',
- short_desc => 'Sets the action to perform upon reaching the recovery target.',
- variable => 'recoveryTargetAction',
- boot_val => 'RECOVERY_TARGET_ACTION_PAUSE',
- options => 'recovery_target_action_options',
+{ name => 'wal_debug', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Emit WAL-related debugging output.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'XLOG_DEBUG',
+ boot_val => 'false',
+ ifdef => 'WAL_DEBUG',
},
-{ name => 'track_functions', type => 'enum', context => 'PGC_SUSET', group => 'STATS_CUMULATIVE',
- short_desc => 'Collects function-level statistics on database activity.',
- variable => 'pgstat_track_functions',
- boot_val => 'TRACK_FUNC_OFF',
- options => 'track_function_options',
+{ name => 'wal_decode_buffer_size', type => 'int', context => 'PGC_POSTMASTER', group => 'WAL_RECOVERY',
+ short_desc => 'Buffer size for reading ahead in the WAL during recovery.',
+ long_desc => 'Maximum distance to read ahead in the WAL to prefetch referenced data blocks.',
+ flags => 'GUC_UNIT_BYTE',
+ variable => 'wal_decode_buffer_size',
+ boot_val => '512 * 1024',
+ min => '64 * 1024',
+ max => 'MaxAllocSize',
},
-{ name => 'stats_fetch_consistency', type => 'enum', context => 'PGC_USERSET', group => 'STATS_CUMULATIVE',
- short_desc => 'Sets the consistency of accesses to statistics data.',
- variable => 'pgstat_fetch_consistency',
- boot_val => 'PGSTAT_FETCH_CONSISTENCY_CACHE',
- options => 'stats_fetch_consistency',
- assign_hook => 'assign_stats_fetch_consistency',
+{ name => 'wal_init_zero', type => 'bool', context => 'PGC_SUSET', group => 'WAL_SETTINGS',
+ short_desc => 'Writes zeroes to new WAL files before first use.',
+ variable => 'wal_init_zero',
+ boot_val => 'true',
},
-{ name => 'wal_compression', type => 'enum', context => 'PGC_SUSET', group => 'WAL_SETTINGS',
- short_desc => 'Compresses full-page writes written in WAL file with specified method.',
- variable => 'wal_compression',
- boot_val => 'WAL_COMPRESSION_NONE',
- options => 'wal_compression_options',
+{ name => 'wal_keep_size', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_SENDING',
+ short_desc => 'Sets the size of WAL files held for standby servers.',
+ flags => 'GUC_UNIT_MB',
+ variable => 'wal_keep_size_mb',
+ boot_val => '0',
+ min => '0',
+ max => 'MAX_KILOBYTES',
},
{ name => 'wal_level', type => 'enum', context => 'PGC_POSTMASTER', group => 'WAL_SETTINGS',
@@ -3368,137 +3359,146 @@
options => 'wal_level_options',
},
-{ name => 'dynamic_shared_memory_type', type => 'enum', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Selects the dynamic shared memory implementation used.',
- variable => 'dynamic_shared_memory_type',
- boot_val => 'DEFAULT_DYNAMIC_SHARED_MEMORY_TYPE',
- options => 'dynamic_shared_memory_options',
+{ name => 'wal_log_hints', type => 'bool', context => 'PGC_POSTMASTER', group => 'WAL_SETTINGS',
+ short_desc => 'Writes full pages to WAL when first modified after a checkpoint, even for a non-critical modification.',
+ variable => 'wal_log_hints',
+ boot_val => 'false',
},
-{ name => 'shared_memory_type', type => 'enum', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Selects the shared memory implementation used for the main shared memory region.',
- variable => 'shared_memory_type',
- boot_val => 'DEFAULT_SHARED_MEMORY_TYPE',
- options => 'shared_memory_options',
+{ name => 'wal_receiver_create_temp_slot', type => 'bool', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets whether a WAL receiver should create a temporary replication slot if no permanent slot is configured.',
+ variable => 'wal_receiver_create_temp_slot',
+ boot_val => 'false',
},
-{ name => 'file_copy_method', type => 'enum', context => 'PGC_USERSET', group => 'RESOURCES_DISK',
- short_desc => 'Selects the file copy method.',
- variable => 'file_copy_method',
- boot_val => 'FILE_COPY_METHOD_COPY',
- options => 'file_copy_method_options',
+{ name => 'wal_receiver_status_interval', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets the maximum interval between WAL receiver status reports to the sending server.',
+ flags => 'GUC_UNIT_S',
+ variable => 'wal_receiver_status_interval',
+ boot_val => '10',
+ min => '0',
+ max => 'INT_MAX / 1000',
},
-{ name => 'wal_sync_method', type => 'enum', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
- short_desc => 'Selects the method used for forcing WAL updates to disk.',
- variable => 'wal_sync_method',
- boot_val => 'DEFAULT_WAL_SYNC_METHOD',
- options => 'wal_sync_method_options',
- assign_hook => 'assign_wal_sync_method',
+{ name => 'wal_receiver_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets the maximum wait time to receive data from the sending server.',
+ long_desc => '0 disables the timeout.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'wal_receiver_timeout',
+ boot_val => '60 * 1000',
+ min => '0',
+ max => 'INT_MAX',
},
-{ name => 'xmlbinary', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets how binary values are to be encoded in XML.',
- variable => 'xmlbinary',
- boot_val => 'XMLBINARY_BASE64',
- options => 'xmlbinary_options',
+{ name => 'wal_recycle', type => 'bool', context => 'PGC_SUSET', group => 'WAL_SETTINGS',
+ short_desc => 'Recycles WAL files by renaming them.',
+ variable => 'wal_recycle',
+ boot_val => 'true',
},
-{ name => 'xmloption', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
- short_desc => 'Sets whether XML data in implicit parsing and serialization operations is to be considered as documents or content fragments.',
- variable => 'xmloption',
- boot_val => 'XMLOPTION_CONTENT',
- options => 'xmloption_options',
+{ name => 'wal_retrieve_retry_interval', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+ short_desc => 'Sets the time to wait before retrying to retrieve WAL after a failed attempt.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'wal_retrieve_retry_interval',
+ boot_val => '5000',
+ min => '1',
+ max => 'INT_MAX',
},
-{ name => 'huge_pages', type => 'enum', context => 'PGC_POSTMASTER', group => 'RESOURCES_MEM',
- short_desc => 'Use of huge pages on Linux or Windows.',
- variable => 'huge_pages',
- boot_val => 'HUGE_PAGES_TRY',
- options => 'huge_pages_options',
+{ name => 'wal_segment_size', type => 'int', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
+ short_desc => 'Shows the size of write ahead log segments.',
+ flags => 'GUC_UNIT_BYTE | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED',
+ variable => 'wal_segment_size',
+ boot_val => 'DEFAULT_XLOG_SEG_SIZE',
+ min => 'WalSegMinSize',
+ max => 'WalSegMaxSize',
+ check_hook => 'check_wal_segment_size',
},
-{ name => 'huge_pages_status', type => 'enum', context => 'PGC_INTERNAL', group => 'PRESET_OPTIONS',
- short_desc => 'Indicates the status of huge pages.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE',
- variable => 'huge_pages_status',
- boot_val => 'HUGE_PAGES_UNKNOWN',
- options => 'huge_pages_status_options',
+{ name => 'wal_sender_timeout', type => 'int', context => 'PGC_USERSET', group => 'REPLICATION_SENDING',
+ short_desc => 'Sets the maximum time to wait for WAL replication.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'wal_sender_timeout',
+ boot_val => '60 * 1000',
+ min => '0',
+ max => 'INT_MAX',
},
-{ name => 'recovery_prefetch', type => 'enum', context => 'PGC_SIGHUP', group => 'WAL_RECOVERY',
- short_desc => 'Prefetch referenced blocks during recovery.',
- long_desc => 'Look ahead in the WAL to find references to uncached data.',
- variable => 'recovery_prefetch',
- boot_val => 'RECOVERY_PREFETCH_TRY',
- options => 'recovery_prefetch_options',
- check_hook => 'check_recovery_prefetch',
- assign_hook => 'assign_recovery_prefetch',
+{ name => 'wal_skip_threshold', type => 'int', context => 'PGC_USERSET', group => 'WAL_SETTINGS',
+ short_desc => 'Minimum size of new file to fsync instead of writing WAL.',
+ flags => 'GUC_UNIT_KB',
+ variable => 'wal_skip_threshold',
+ boot_val => '2048',
+ min => '0',
+ max => 'MAX_KILOBYTES',
},
-{ name => 'debug_parallel_query', type => 'enum', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Forces the planner\'s use parallel query nodes.',
- long_desc => 'This can be useful for testing the parallel query infrastructure by forcing the planner to generate plans that contain nodes that perform tuple communication between workers and the main process.',
- flags => 'GUC_NOT_IN_SAMPLE | GUC_EXPLAIN',
- variable => 'debug_parallel_query',
- boot_val => 'DEBUG_PARALLEL_OFF',
- options => 'debug_parallel_query_options',
+{ name => 'wal_summary_keep_time', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_SUMMARIZATION',
+ short_desc => 'Time for which WAL summary files should be kept.',
+ long_desc => '0 disables automatic summary file deletion.',
+ flags => 'GUC_UNIT_MIN',
+ variable => 'wal_summary_keep_time',
+ boot_val => '10 * HOURS_PER_DAY * MINS_PER_HOUR /* 10 days */',
+ min => '0',
+ max => 'INT_MAX / SECS_PER_MINUTE',
},
-{ name => 'password_encryption', type => 'enum', context => 'PGC_USERSET', group => 'CONN_AUTH_AUTH',
- short_desc => 'Chooses the algorithm for encrypting passwords.',
- variable => 'Password_encryption',
- boot_val => 'PASSWORD_TYPE_SCRAM_SHA_256',
- options => 'password_encryption_options',
+{ name => 'wal_sync_method', type => 'enum', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
+ short_desc => 'Selects the method used for forcing WAL updates to disk.',
+ variable => 'wal_sync_method',
+ boot_val => 'DEFAULT_WAL_SYNC_METHOD',
+ options => 'wal_sync_method_options',
+ assign_hook => 'assign_wal_sync_method',
},
-{ name => 'plan_cache_mode', type => 'enum', context => 'PGC_USERSET', group => 'QUERY_TUNING_OTHER',
- short_desc => 'Controls the planner\'s selection of custom or generic plan.',
- long_desc => 'Prepared statements can have custom and generic plans, and the planner will attempt to choose which is better. This can be set to override the default behavior.',
- flags => 'GUC_EXPLAIN',
- variable => 'plan_cache_mode',
- boot_val => 'PLAN_CACHE_MODE_AUTO',
- options => 'plan_cache_mode_options',
+{ name => 'wal_writer_delay', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
+ short_desc => 'Time between WAL flushes performed in the WAL writer.',
+ flags => 'GUC_UNIT_MS',
+ variable => 'WalWriterDelay',
+ boot_val => '200',
+ min => '1',
+ max => '10000',
},
-{ name => 'ssl_min_protocol_version', type => 'enum', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Sets the minimum SSL/TLS protocol version to use.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'ssl_min_protocol_version',
- boot_val => 'PG_TLS1_2_VERSION',
- options => 'ssl_protocol_versions_info + 1', # don't allow PG_TLS_ANY
+{ name => 'wal_writer_flush_after', type => 'int', context => 'PGC_SIGHUP', group => 'WAL_SETTINGS',
+ short_desc => 'Amount of WAL written out by WAL writer that triggers a flush.',
+ flags => 'GUC_UNIT_XBLOCKS',
+ variable => 'WalWriterFlushAfter',
+ boot_val => 'DEFAULT_WAL_WRITER_FLUSH_AFTER',
+ min => '0',
+ max => 'INT_MAX',
},
-{ name => 'ssl_max_protocol_version', type => 'enum', context => 'PGC_SIGHUP', group => 'CONN_AUTH_SSL',
- short_desc => 'Sets the maximum SSL/TLS protocol version to use.',
- flags => 'GUC_SUPERUSER_ONLY',
- variable => 'ssl_max_protocol_version',
- boot_val => 'PG_TLS_ANY',
- options => 'ssl_protocol_versions_info',
+{ name => 'work_mem', type => 'int', context => 'PGC_USERSET', group => 'RESOURCES_MEM',
+ short_desc => 'Sets the maximum memory to be used for query workspaces.',
+ long_desc => 'This much memory can be used by each internal sort operation and hash table before switching to temporary disk files.',
+ flags => 'GUC_UNIT_KB | GUC_EXPLAIN',
+ variable => 'work_mem',
+ boot_val => '4096',
+ min => '64',
+ max => 'MAX_KILOBYTES',
},
-{ name => 'recovery_init_sync_method', type => 'enum', context => 'PGC_SIGHUP', group => 'ERROR_HANDLING_OPTIONS',
- short_desc => 'Sets the method for synchronizing the data directory before crash recovery.',
- variable => 'recovery_init_sync_method',
- boot_val => 'DATA_DIR_SYNC_METHOD_FSYNC',
- options => 'recovery_init_sync_method_options',
+{ name => 'xmlbinary', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets how binary values are to be encoded in XML.',
+ variable => 'xmlbinary',
+ boot_val => 'XMLBINARY_BASE64',
+ options => 'xmlbinary_options',
},
-{ name => 'debug_logical_replication_streaming', type => 'enum', context => 'PGC_USERSET', group => 'DEVELOPER_OPTIONS',
- short_desc => 'Forces immediate streaming or serialization of changes in large transactions.',
- long_desc => 'On the publisher, it allows streaming or serializing each change in logical decoding. On the subscriber, it allows serialization of all changes to files and notifies the parallel apply workers to read and apply them at the end of the transaction.',
- flags => 'GUC_NOT_IN_SAMPLE',
- variable => 'debug_logical_replication_streaming',
- boot_val => 'DEBUG_LOGICAL_REP_STREAMING_BUFFERED',
- options => 'debug_logical_replication_streaming_options',
+{ name => 'xmloption', type => 'enum', context => 'PGC_USERSET', group => 'CLIENT_CONN_STATEMENT',
+ short_desc => 'Sets whether XML data in implicit parsing and serialization operations is to be considered as documents or content fragments.',
+ variable => 'xmloption',
+ boot_val => 'XMLOPTION_CONTENT',
+ options => 'xmloption_options',
},
-{ name => 'io_method', type => 'enum', context => 'PGC_POSTMASTER', group => 'RESOURCES_IO',
- short_desc => 'Selects the method for executing asynchronous I/O.',
- variable => 'io_method',
- boot_val => 'DEFAULT_IO_METHOD',
- options => 'io_method_options',
- assign_hook => 'assign_io_method',
+{ name => 'zero_damaged_pages', type => 'bool', context => 'PGC_SUSET', group => 'DEVELOPER_OPTIONS',
+ short_desc => 'Continues processing past damaged page headers.',
+ long_desc => 'Detection of a damaged page header normally causes PostgreSQL to report an error, aborting the current transaction. Setting "zero_damaged_pages" to true causes the system to instead report a warning, zero out the damaged page, and continue processing. This behavior will destroy data, namely all the rows on the damaged page.',
+ flags => 'GUC_NOT_IN_SAMPLE',
+ variable => 'zero_damaged_pages',
+ boot_val => 'false',
},
]
--
2.51.0
v2-0005-Enforce-alphabetical-order-in-guc_parameters.dat.patchtext/plain; charset=UTF-8; name=v2-0005-Enforce-alphabetical-order-in-guc_parameters.dat.patchDownload
From a8138309c2d643de4d4c637583e04aba9cee34af Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 3 Oct 2025 08:27:18 +0200
Subject: [PATCH v2 5/5] Enforce alphabetical order in guc_parameters.dat
The order in these lists was previously pretty random and had grown
organically over time. This made it unnecessarily cumbersome to
maintain these lists, as there was no clear guidelines about where to
put new entries. Also, after the merger of the type-specific GUC
structs, the list still reflected the previous type-specific
super-order.
By enforcing alphabetical order, the place for new entries becomes
clear, and often related entries will be listed close together.
Note: The order is actually checked after lower-casing, to handle the
likes of "DateStyle".
Discussion: https://www.postgresql.org/message-id/flat/8fdfb91e-60fb-44fa-8df6-f5dea47353c9@eisentraut.org
---
src/backend/utils/misc/gen_guc_tables.pl | 10 ++++++++++
src/backend/utils/misc/guc_parameters.dat | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/backend/utils/misc/gen_guc_tables.pl b/src/backend/utils/misc/gen_guc_tables.pl
index 3efde02bab8..601c34ec30b 100644
--- a/src/backend/utils/misc/gen_guc_tables.pl
+++ b/src/backend/utils/misc/gen_guc_tables.pl
@@ -42,6 +42,7 @@ sub dquote
sub print_table
{
my ($ofh) = @_;
+ my $prev_name = undef;
print $ofh "\n\n";
print $ofh "struct config_generic ConfigureNames[] =\n";
@@ -49,6 +50,13 @@ sub print_table
foreach my $entry (@{$parse})
{
+ if (defined($prev_name) && lc($prev_name) ge lc($entry->{name}))
+ {
+ die sprintf(
+ "entries are not in alphabetical order: \"%s\", \"%s\"\n",
+ $prev_name, $entry->{name});
+ }
+
print $ofh "#ifdef $entry->{ifdef}\n" if $entry->{ifdef};
print $ofh "\t{\n";
printf $ofh "\t\t.name = %s,\n", dquote($entry->{name});
@@ -80,6 +88,8 @@ sub print_table
print $ofh "\t},\n";
print $ofh "#endif\n" if $entry->{ifdef};
print $ofh "\n";
+
+ $prev_name = $entry->{name};
}
print $ofh "\t/* End-of-list marker */\n";
diff --git a/src/backend/utils/misc/guc_parameters.dat b/src/backend/utils/misc/guc_parameters.dat
index f7be908b4ed..25da769eb35 100644
--- a/src/backend/utils/misc/guc_parameters.dat
+++ b/src/backend/utils/misc/guc_parameters.dat
@@ -23,7 +23,7 @@
# 3. Decide on a name, a default value, upper and lower bounds (if
# applicable), etc.
#
-# 4. Add a record below.
+# 4. Add a record below (in alphabetical order).
#
# 5. Add it to src/backend/utils/misc/postgresql.conf.sample, if
# appropriate.
--
2.51.0
@@ -261,15 +261,15 @@ static bool assignable_custom_variable_name(const char *name, bool skip_errors, int elevel); static void do_serialize(char **destptr, Size *maxbytes, const char *fmt,...) pg_attribute_printf(3, 4); -static bool call_bool_check_hook(const struct config_bool *conf, bool *newval, +static bool call_bool_check_hook(const struct config_generic *conf, bool *newval, void **extra, GucSource source, int elevel); -static bool call_int_check_hook(const struct config_int *conf, int *newval, +static bool call_int_check_hook(const struct config_generic *conf, int *newval, void **extra, GucSource source, int elevel); -static bool call_real_check_hook(const struct config_real *conf, double *newval, +static bool call_real_check_hook(const struct config_generic *conf, double *newval, void **extra, GucSource source, int elevel); -static bool call_string_check_hook(const struct config_string *conf, char **newval, +static bool call_string_check_hook(const struct config_generic *conf, char **newval, void **extra, GucSource source, int elevel); -static bool call_enum_check_hook(const struct config_enum *conf, int *newval, +static bool call_enum_check_hook(const struct config_generic *conf, int *newval, void **extra, GucSource source, int elevel);
The new signatures for these function are less specific than before,
making them a little worse IMO. Overall +1 on the patches, despite that
little drawback.
- Heikki
On 24.10.25 14:21, Heikki Linnakangas wrote:
@@ -261,15 +261,15 @@ static bool assignable_custom_variable_name(const char *name, bool skip_errors, int elevel); static void do_serialize(char **destptr, Size *maxbytes, const char *fmt,...) pg_attribute_printf(3, 4); -static bool call_bool_check_hook(const struct config_bool *conf, bool *newval, +static bool call_bool_check_hook(const struct config_generic *conf, bool *newval, void **extra, GucSource source, int elevel); -static bool call_int_check_hook(const struct config_int *conf, int *newval, +static bool call_int_check_hook(const struct config_generic *conf, int *newval, void **extra, GucSource source, int elevel); -static bool call_real_check_hook(const struct config_real *conf, double *newval, +static bool call_real_check_hook(const struct config_generic *conf, double *newval, void **extra, GucSource source, int elevel); -static bool call_string_check_hook(const struct config_string *conf, char **newval, +static bool call_string_check_hook(const struct config_generic *conf, char **newval, void **extra, GucSource source, int elevel); -static bool call_enum_check_hook(const struct config_enum *conf, int *newval, +static bool call_enum_check_hook(const struct config_generic *conf, int *newval, void **extra, GucSource source, int elevel);The new signatures for these function are less specific than before,
making them a little worse IMO. Overall +1 on the patches, despite that
little drawback.
Thanks, pushed.
On 29.10.25 10:07, Peter Eisentraut wrote:
On 24.10.25 14:21, Heikki Linnakangas wrote:
@@ -261,15 +261,15 @@ static bool assignable_custom_variable_name(const char *name, bool skip_errors, int elevel); static void do_serialize(char **destptr, Size *maxbytes, const char *fmt,...) pg_attribute_printf(3, 4); -static bool call_bool_check_hook(const struct config_bool *conf, bool *newval, +static bool call_bool_check_hook(const struct config_generic *conf, bool *newval, void **extra, GucSource source, int elevel); -static bool call_int_check_hook(const struct config_int *conf, int *newval, +static bool call_int_check_hook(const struct config_generic *conf, int *newval, void **extra, GucSource source, int elevel); -static bool call_real_check_hook(const struct config_real *conf, double *newval, +static bool call_real_check_hook(const struct config_generic *conf, double *newval, void **extra, GucSource source, int elevel); -static bool call_string_check_hook(const struct config_string *conf, char **newval, +static bool call_string_check_hook(const struct config_generic *conf, char **newval, void **extra, GucSource source, int elevel); -static bool call_enum_check_hook(const struct config_enum *conf, int *newval, +static bool call_enum_check_hook(const struct config_generic *conf, int *newval, void **extra, GucSource source, int elevel);The new signatures for these function are less specific than before,
making them a little worse IMO. Overall +1 on the patches, despite
that little drawback.Thanks, pushed.
The remaining patches to sort the list alphabetically have also been pushed.
On 03.11.25 12:16, Peter Eisentraut wrote:
The remaining patches to sort the list alphabetically have also been
pushed.
Here are a few more small patches to fix related things I found
afterwards or in passing.
The first one straightens out how the qsort comparison function for GUC
records works, and also removes the implicit requirement that the name
field is first in the struct.
The second one fixes up an NLS build rule for the recent changes.
The third fixes some translation markers. This is an older problem.
Attachments:
0001-Clean-up-qsort-comparison-function-for-GUC-entries.patchtext/plain; charset=UTF-8; name=0001-Clean-up-qsort-comparison-function-for-GUC-entries.patchDownload
From 2e267c1de1e44de4729547adfd296ecf4ee56fa7 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 7 Nov 2025 09:25:43 +0100
Subject: [PATCH 1/3] Clean up qsort comparison function for GUC entries
guc_var_compare() is invoked from qsort() on an array of struct
config_generic, but the function accesses these directly as
strings (char *). This relies on the name being the first field, so
this works. But we can write this more clearly by using the struct
and then accessing the field through the struct. Before the
reorganization of the GUC structs (commit a13833c35f9), the old code
was probably more convenient, but now we can write this more clearly
and correctly.
After this change, it is no longer required that the name is the first
field in struct config_generic, so remove that comment.
---
src/backend/utils/misc/guc.c | 6 +++---
src/include/utils/guc_tables.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 679846da42c..f3411d34f0c 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -1164,10 +1164,10 @@ find_option(const char *name, bool create_placeholders, bool skip_errors,
static int
guc_var_compare(const void *a, const void *b)
{
- const char *namea = **(const char **const *) a;
- const char *nameb = **(const char **const *) b;
+ const struct config_generic *ca = *(struct config_generic *const *) a;
+ const struct config_generic *cb = *(struct config_generic *const *) b;
- return guc_name_compare(namea, nameb);
+ return guc_name_compare(ca->name, cb->name);
}
/*
diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h
index bbfcc633014..04cc60eb526 100644
--- a/src/include/utils/guc_tables.h
+++ b/src/include/utils/guc_tables.h
@@ -249,7 +249,7 @@ struct config_enum
struct config_generic
{
/* constant fields, must be set correctly in initial value: */
- const char *name; /* name of variable - MUST BE FIRST */
+ const char *name; /* name of variable */
GucContext context; /* context required to set the variable */
enum config_group group; /* to help organize variables by function */
const char *short_desc; /* short desc. of this variable's purpose */
--
2.51.0
0002-Fix-backend-init-po-file-list.patchtext/plain; charset=UTF-8; name=0002-Fix-backend-init-po-file-list.patchDownload
From b9510e237fa9c9f76206becee0943dfb23bfbcb8 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 7 Nov 2025 09:25:43 +0100
Subject: [PATCH 2/3] Fix backend init-po file list
Backend NLS should also catch generated files in src/include/. This
is necessary to find guc_tables.inc.c in a vpath build (as of commit
63599896545).
---
src/backend/nls.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/nls.mk b/src/backend/nls.mk
index 698b1083f4b..5204003e682 100644
--- a/src/backend/nls.mk
+++ b/src/backend/nls.mk
@@ -28,7 +28,7 @@ GETTEXT_FLAGS = $(BACKEND_COMMON_GETTEXT_FLAGS) \
error_cb:2:c-format
gettext-files: generated-parser-sources generated-headers
- find $(srcdir) $(srcdir)/../common $(srcdir)/../port $(srcdir)/../include/ \( -name '*.c' -o -name "proctypelist.h" \) -print | LC_ALL=C sort >$@
+ find $(srcdir) $(srcdir)/../common $(srcdir)/../port $(srcdir)/../include/ ../include/ \( -name '*.c' -o -name "proctypelist.h" \) -print | LC_ALL=C sort >$@
my-clean:
rm -f gettext-files
--
2.51.0
0003-Fix-NLS-for-incorrect-GUC-enum-value-hint-message.patchtext/plain; charset=UTF-8; name=0003-Fix-NLS-for-incorrect-GUC-enum-value-hint-message.patchDownload
From 15c78de3b21234de96c29bcbc55b0df21316aad2 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Fri, 7 Nov 2025 09:25:43 +0100
Subject: [PATCH 3/3] Fix NLS for incorrect GUC enum value hint message
The translation markers were applied at the wrong place, so no string
was extracted for translation.
---
src/backend/utils/misc/guc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index f3411d34f0c..7c967116ac8 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -3135,14 +3135,14 @@ parse_and_validate_value(const struct config_generic *record,
char *hintmsg;
hintmsg = config_enum_get_options(conf,
- "Available values: ",
- ".", ", ");
+ _("Available values: "),
+ _("."), _(", "));
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid value for parameter \"%s\": \"%s\"",
record->name, value),
- hintmsg ? errhint("%s", _(hintmsg)) : 0));
+ hintmsg ? errhint("%s", hintmsg) : 0));
if (hintmsg)
pfree(hintmsg);
--
2.51.0
On 2025-Nov-07, Peter Eisentraut wrote:
@@ -3135,14 +3135,14 @@ parse_and_validate_value(const struct config_generic *record,
char *hintmsg;hintmsg = config_enum_get_options(conf, - "Available values: ", - ".", ", "); + _("Available values: "), + _("."), _(", "));
Hmm, it seems unclear (from the message catalog perspective) what the
last two strings will be used for, so please add a /* translator */
comment to each.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"La fuerza no está en los medios físicos
sino que reside en una voluntad indomable" (Gandhi)
Peter Eisentraut <peter@eisentraut.org> writes:
Here are a few more small patches to fix related things I found
afterwards or in passing.
Looks sane, except that the comparator could do with an extra "const"
if there's enough room on the line:
+ const struct config_generic *ca = *(const struct config_generic *const *) a;
+ const struct config_generic *cb = *(const struct config_generic *const *) b;
Not essential, but casting const away even transiently looks ugly.
regards, tom lane
On 07.11.25 10:38, Álvaro Herrera wrote:
On 2025-Nov-07, Peter Eisentraut wrote:
@@ -3135,14 +3135,14 @@ parse_and_validate_value(const struct config_generic *record,
char *hintmsg;hintmsg = config_enum_get_options(conf, - "Available values: ", - ".", ", "); + _("Available values: "), + _("."), _(", "));Hmm, it seems unclear (from the message catalog perspective) what the
last two strings will be used for, so please add a /* translator */
comment to each.
Actually, the ", " already exists in the message catalog, so adding a
comment here might confuse the other site.
On 2025-Nov-07, Peter Eisentraut wrote:
Actually, the ", " already exists in the message catalog, so adding a
comment here might confuse the other site.
This one?
#: replication/logical/relation.c:245
#, c-format
msgid ", \"%s\""
msgstr ", »%s«"
It's different. (And warrants a comment too, IMO)
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"La rebeldía es la virtud original del hombre" (Arthur Schopenhauer)
On 07.11.25 16:14, Tom Lane wrote:
Peter Eisentraut <peter@eisentraut.org> writes:
Here are a few more small patches to fix related things I found
afterwards or in passing.Looks sane, except that the comparator could do with an extra "const"
if there's enough room on the line:+ const struct config_generic *ca = *(const struct config_generic *const *) a; + const struct config_generic *cb = *(const struct config_generic *const *) b;Not essential, but casting const away even transiently looks ugly.
committed with that amendment
On 07.11.25 16:53, Álvaro Herrera wrote:
On 2025-Nov-07, Peter Eisentraut wrote:
Actually, the ", " already exists in the message catalog, so adding a
comment here might confuse the other site.This one?
#: replication/logical/relation.c:245
#, c-format
msgid ", \"%s\""
msgstr ", »%s«"It's different. (And warrants a comment too, IMO)
Well, that's the one, but the code actually looks like this now:
while ((i = bms_next_member(atts, i)) >= 0)
{
attcnt++;
if (attcnt > 1)
appendStringInfoString(&attsbuf, _(", "));
appendStringInfo(&attsbuf, _("\"%s\""), remoterel->attnames[i]);
}
The catalog entries you are showing appear to be from pre-PG18.
There are also similar instances in ExecBuildSlotValueDescription() that
are not marked up for gettext but perhaps should be. There might be
others, and I would expect more like this to appear over time, as people
like to add more detail like this to diagnostics messages.
Do you have a suggestion what kind of comment to attach there?
On 2025-Nov-12, Peter Eisentraut wrote:
Well, that's the one, but the code actually looks like this now:
while ((i = bms_next_member(atts, i)) >= 0)
{
attcnt++;
if (attcnt > 1)
appendStringInfoString(&attsbuf, _(", "));appendStringInfo(&attsbuf, _("\"%s\""), remoterel->attnames[i]);
}The catalog entries you are showing appear to be from pre-PG18.
Ah, right.
There are also similar instances in ExecBuildSlotValueDescription() that are
not marked up for gettext but perhaps should be. There might be others, and
I would expect more like this to appear over time, as people like to add
more detail like this to diagnostics messages.
Sure.
Do you have a suggestion what kind of comment to attach there?
I would say "This is a separator in a list of entity names." We don't
need to be specific as to what kind of entity it is, I think.
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
Bob [Floyd] used to say that he was planning to get a Ph.D. by the "green
stamp method," namely by saving envelopes addressed to him as 'Dr. Floyd'.
After collecting 500 such letters, he mused, a university somewhere in
Arizona would probably grant him a degree. (Don Knuth)
On 14.11.25 12:00, Álvaro Herrera wrote:
On 2025-Nov-12, Peter Eisentraut wrote:
Well, that's the one, but the code actually looks like this now:
while ((i = bms_next_member(atts, i)) >= 0)
{
attcnt++;
if (attcnt > 1)
appendStringInfoString(&attsbuf, _(", "));appendStringInfo(&attsbuf, _("\"%s\""), remoterel->attnames[i]);
}The catalog entries you are showing appear to be from pre-PG18.
Ah, right.
There are also similar instances in ExecBuildSlotValueDescription() that are
not marked up for gettext but perhaps should be. There might be others, and
I would expect more like this to appear over time, as people like to add
more detail like this to diagnostics messages.Sure.
Do you have a suggestion what kind of comment to attach there?
I would say "This is a separator in a list of entity names." We don't
need to be specific as to what kind of entity it is, I think.
Ok, committed that way.