aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/guc_tables.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/misc/guc_tables.c')
-rw-r--r--src/backend/utils/misc/guc_tables.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c
index abd9029451f..92fcd5fa4d5 100644
--- a/src/backend/utils/misc/guc_tables.c
+++ b/src/backend/utils/misc/guc_tables.c
@@ -494,6 +494,7 @@ extern const struct config_enum_entry dynamic_shared_memory_options[];
/*
* GUC option variables that are exported from this module
*/
+bool AllowAlterSystem = true;
bool log_duration = false;
bool Debug_print_plan = false;
bool Debug_print_parse = false;
@@ -1041,6 +1042,22 @@ struct config_bool ConfigureNamesBool[] =
NULL, NULL, NULL
},
{
+ /*
+ * 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.
+ */
+ {"allow_alter_system", PGC_SIGHUP, COMPAT_OPTIONS_OTHER,
+ gettext_noop("Allows running the ALTER SYSTEM command."),
+ gettext_noop("Can be set to off for environments where global configuration "
+ "changes should be made using a different method."),
+ GUC_DISALLOW_IN_AUTO_FILE
+ },
+ &AllowAlterSystem,
+ true,
+ NULL, NULL, NULL
+ },
+ {
{"bonjour", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
gettext_noop("Enables advertising the server via Bonjour."),
NULL