diff options
Diffstat (limited to 'src/backend/commands/extension.c')
-rw-r--r-- | src/backend/commands/extension.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c index 767d9b96190..eb4878701a1 100644 --- a/src/backend/commands/extension.c +++ b/src/backend/commands/extension.c @@ -907,6 +907,9 @@ execute_extension_script(Oid extensionOid, ExtensionControlFile *control, * We use the equivalent of a function SET option to allow the setting to * persist for exactly the duration of the script execution. guc.c also * takes care of undoing the setting on error. + * + * log_min_messages can't be set by ordinary users, so for that one we + * pretend to be superuser. */ save_nestlevel = NewGUCNestLevel(); @@ -915,9 +918,10 @@ execute_extension_script(Oid extensionOid, ExtensionControlFile *control, PGC_USERSET, PGC_S_SESSION, GUC_ACTION_SAVE, true, 0, false); if (log_min_messages < WARNING) - (void) set_config_option("log_min_messages", "warning", - PGC_SUSET, PGC_S_SESSION, - GUC_ACTION_SAVE, true, 0, false); + (void) set_config_option_ext("log_min_messages", "warning", + PGC_SUSET, PGC_S_SESSION, + BOOTSTRAP_SUPERUSERID, + GUC_ACTION_SAVE, true, 0, false); /* * Similarly disable check_function_bodies, to ensure that SQL functions |