<variablelist>
- <varlistentry id="guc-client-min-messages" xreflabel="client_min_messages">
- <term><varname>client_min_messages</varname> (<type>enum</type>)
- <indexterm>
- <primary><varname>client_min_messages</varname> configuration parameter</primary>
- </indexterm>
- </term>
- <listitem>
- <para>
- Controls which message levels are sent to the client.
- Valid values are <literal>DEBUG5</literal>,
- <literal>DEBUG4</literal>, <literal>DEBUG3</literal>, <literal>DEBUG2</literal>,
- <literal>DEBUG1</literal>, <literal>LOG</literal>, <literal>NOTICE</literal>,
- <literal>WARNING</literal>, <literal>ERROR</literal>, <literal>FATAL</literal>,
- and <literal>PANIC</literal>. Each level
- includes all the levels that follow it. The later the level,
- the fewer messages are sent. The default is
- <literal>NOTICE</literal>. Note that <literal>LOG</literal> has a different
- rank here than in <varname>log_min_messages</varname>.
- </para>
- </listitem>
- </varlistentry>
-
<varlistentry id="guc-log-min-messages" xreflabel="log_min_messages">
<term><varname>log_min_messages</varname> (<type>enum</type>)
<indexterm>
follow it. The later the level, the fewer messages are sent
to the log. The default is <literal>WARNING</literal>. Note that
<literal>LOG</literal> has a different rank here than in
- <varname>client_min_messages</varname>.
+ <xref linkend="guc-client-min-messages"/>.
Only superusers can change this setting.
</para>
</listitem>
<title>Statement Behavior</title>
<variablelist>
+ <varlistentry id="guc-client-min-messages" xreflabel="client_min_messages">
+ <term><varname>client_min_messages</varname> (<type>enum</type>)
+ <indexterm>
+ <primary><varname>client_min_messages</varname> configuration parameter</primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ Controls which message levels are sent to the client.
+ Valid values are <literal>DEBUG5</literal>,
+ <literal>DEBUG4</literal>, <literal>DEBUG3</literal>, <literal>DEBUG2</literal>,
+ <literal>DEBUG1</literal>, <literal>LOG</literal>, <literal>NOTICE</literal>,
+ <literal>WARNING</literal>, and <literal>ERROR</literal>.
+ Each level includes all the levels that follow it. The later the level,
+ the fewer messages are sent. The default is
+ <literal>NOTICE</literal>. Note that <literal>LOG</literal> has a different
+ rank here than in <xref linkend="guc-log-min-messages"/>.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="guc-search-path" xreflabel="search_path">
<term><varname>search_path</varname> (<type>string</type>)
<indexterm>
* 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);
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
/*
* 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},
{"notice", NOTICE, false},
{"warning", WARNING, false},
{"error", ERROR, false},
- {"fatal", FATAL, true},
- {"panic", PANIC, true},
{NULL, 0, false}
};
},
{
- {"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.")