diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/utils/error/elog.c | 11 | ||||
-rw-r--r-- | src/backend/utils/misc/guc.c | 7 | ||||
-rw-r--r-- | src/backend/utils/misc/postgresql.conf.sample | 21 |
3 files changed, 15 insertions, 24 deletions
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index b9c11301ca2..ca02aac4ebd 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -469,9 +469,7 @@ errfinish(int dummy,...) * progress, so that we can report the message before dying. (Without * this, pq_putmessage will refuse to send the message at all, which is * what we want for NOTICE messages, but not for fatal exits.) This hack - * is necessary because of poor design of old-style copy protocol. Note - * we must do this even if client is fool enough to have set - * client_min_messages above FATAL, so don't look at output_to_client. + * is necessary because of poor design of old-style copy protocol. */ if (elevel >= FATAL && whereToSendOutput == DestRemote) pq_endcopyout(true); @@ -1747,12 +1745,7 @@ pg_re_throw(void) else edata->output_to_server = (FATAL >= log_min_messages); if (whereToSendOutput == DestRemote) - { - if (ClientAuthInProgress) - edata->output_to_client = true; - else - edata->output_to_client = (FATAL >= client_min_messages); - } + edata->output_to_client = true; /* * We can use errfinish() for the rest, but we don't want it to call diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index ce54828fbb8..0327b295da8 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -215,7 +215,8 @@ static const struct config_enum_entry bytea_output_options[] = { /* * We have different sets for client and server message level options because - * they sort slightly different (see "log" level) + * they sort slightly different (see "log" level), and because "fatal"/"panic" + * aren't sensible for client_min_messages. */ static const struct config_enum_entry client_message_level_options[] = { {"debug5", DEBUG5, false}, @@ -229,8 +230,6 @@ static const struct config_enum_entry client_message_level_options[] = { {"notice", NOTICE, false}, {"warning", WARNING, false}, {"error", ERROR, false}, - {"fatal", FATAL, true}, - {"panic", PANIC, true}, {NULL, 0, false} }; @@ -3924,7 +3923,7 @@ 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.") diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 4e61bc6521f..3fe257c53f1 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -406,17 +406,6 @@ # - When to Log - -#client_min_messages = notice # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error - #log_min_messages = warning # values in order of decreasing detail: # debug5 # debug4 @@ -561,6 +550,16 @@ # - Statement Behavior - +#client_min_messages = notice # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # log + # notice + # warning + # error #search_path = '"$user", public' # schema names #row_security = on #default_tablespace = '' # a tablespace name, '' uses the default |