summaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/guc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/misc/guc.c')
-rw-r--r--src/backend/utils/misc/guc.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 0628912ed9c..5c27397ccc8 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -153,6 +153,7 @@ static int syslog_facility = 0;
static void assign_syslog_facility(int newval, void *extra);
static void assign_syslog_ident(const char *newval, void *extra);
static void assign_session_replication_role(int newval, void *extra);
+static bool check_client_min_messages(int *newval, void **extra, GucSource source);
static bool check_temp_buffers(int *newval, void **extra, GucSource source);
static bool check_bonjour(bool *newval, void **extra, GucSource source);
static bool check_ssl(bool *newval, void **extra, GucSource source);
@@ -3581,14 +3582,14 @@ static struct config_enum ConfigureNamesEnum[] =
},
{
- {"client_min_messages", PGC_USERSET, LOGGING_WHEN,
+ {"client_min_messages", PGC_USERSET, CLIENT_CONN_STATEMENT,
gettext_noop("Sets the message levels that are sent to the client."),
gettext_noop("Each level includes all the levels that follow it. The later"
" the level, the fewer messages are sent.")
},
&client_min_messages,
NOTICE, client_message_level_options,
- NULL, NULL, NULL
+ check_client_min_messages, NULL, NULL
},
{
@@ -9969,6 +9970,20 @@ assign_session_replication_role(int newval, void *extra)
}
static bool
+check_client_min_messages(int *newval, void **extra, GucSource source)
+{
+ /*
+ * We disallow setting client_min_messages above ERROR, because not
+ * sending an ErrorResponse message for an error breaks the FE/BE
+ * protocol. However, for backwards compatibility, we still accept FATAL
+ * or PANIC as input values, and then adjust here.
+ */
+ if (*newval > ERROR)
+ *newval = ERROR;
+ return true;
+}
+
+static bool
check_temp_buffers(int *newval, void **extra, GucSource source)
{
/*