The following patch completes the open item:
Change log_min_error_statement to be off by default (Gavin)
Gavin was busy so I did the work. Basically, it allows fatal/panic as a
value, and defaults it to panic so it is effectively OFF by default.
There was agreement that we can allow these values as a way of turning
this option off. Because of this, we can continue using the same
validation routines for all the server message level GUC parameters.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Index: doc/src/sgml/runtime.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/runtime.sgml,v
retrieving revision 1.141
diff -c -c -r1.141 runtime.sgml
*** doc/src/sgml/runtime.sgml 27 Sep 2002 02:04:39 -0000 1.141
--- doc/src/sgml/runtime.sgml 2 Oct 2002 16:05:57 -0000
***************
*** 1036,1050 ****
<term><varname>LOG_MIN_ERROR_STATEMENT</varname> (<type>string</type>)</term>
<listitem>
<para>
! This controls which log messages are accompanied by the original
! query which generated the message. All queries matching the setting
! or which are of a higher severity than the setting are logged. The
! default is <literal>ERROR</literal>. Valid values are
! <literal>DEBUG5</literal>, <literal>DEBUG4</literal>,
! <literal>DEBUG3</literal>, <literal>DEBUG2</literal>,
<literal>DEBUG1</literal>, <literal>INFO</literal>,
! <literal>NOTICE</literal>, <literal>WARNING</literal>
! and <literal>ERROR</literal>.
</para>
<para>
It is recommended you enable <literal>LOG_PID</literal> as well
--- 1036,1050 ----
<term><varname>LOG_MIN_ERROR_STATEMENT</varname> (<type>string</type>)</term>
<listitem>
<para>
! This controls which message types output the original query to
! the server logs. All queries matching the setting or higher are
! logged. The default is <literal>PANIC</literal>. Valid values
! are <literal>DEBUG5</literal>, <literal>DEBUG4</literal>,
! <literal>DEBUG3</literal>, <literal>DEBUG2</literal>,
<literal>DEBUG1</literal>, <literal>INFO</literal>,
! <literal>NOTICE</literal>, <literal>WARNING</literal>,
! <literal>ERROR</literal>, <literal>FATAL</literal>, and
! <literal>PANIC</literal>.
</para>
<para>
It is recommended you enable <literal>LOG_PID</literal> as well
Index: src/backend/utils/misc/guc.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/utils/misc/guc.c,v
retrieving revision 1.96
diff -c -c -r1.96 guc.c
*** src/backend/utils/misc/guc.c 22 Sep 2002 19:52:38 -0000 1.96
--- src/backend/utils/misc/guc.c 2 Oct 2002 16:06:09 -0000
***************
*** 104,110 ****
int log_min_error_statement = ERROR;
char *log_min_error_statement_str = NULL;
! const char log_min_error_statement_str_default[] = "error";
int server_min_messages = NOTICE;
char *server_min_messages_str = NULL;
--- 104,110 ----
int log_min_error_statement = ERROR;
char *log_min_error_statement_str = NULL;
! const char log_min_error_statement_str_default[] = "panic";
int server_min_messages = NOTICE;
char *server_min_messages_str = NULL;
***************
*** 2999,3004 ****
--- 2999,3015 ----
{
if (doit)
(*var) = ERROR;
+ }
+ /* We allow FATAL/PANIC for client-side messages too. */
+ else if (strcasecmp(newval, "fatal") == 0)
+ {
+ if (doit)
+ (*var) = FATAL;
+ }
+ else if (strcasecmp(newval, "panic") == 0)
+ {
+ if (doit)
+ (*var) = PANIC;
}
else
return NULL; /* fail */