Change the default setting for log_min_error_statement to ERROR. Per

recent discussion in which majority opinion was that this is a more
widely useful setting than the previous default of PANIC.
This commit is contained in:
Tom Lane 2006-11-21 01:23:37 +00:00
parent e82d9e6283
commit 414c7a537e
3 changed files with 17 additions and 17 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.95 2006/11/12 05:12:42 neilc Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.96 2006/11/21 01:23:37 tgl Exp $ -->
<chapter Id="runtime-config"> <chapter Id="runtime-config">
<title>Server Configuration</title> <title>Server Configuration</title>
@ -2474,20 +2474,19 @@ SELECT * FROM parent WHERE key = 2400;
<listitem> <listitem>
<para> <para>
Controls whether or not the SQL statement that causes an error Controls whether or not the SQL statement that causes an error
condition will also be recorded in the server log. All SQL condition will be recorded in the server log. The current
statements that cause an error of the specified level or SQL statement is included in the log entry for any message of
higher are logged. The default is the specified severity or higher.
<literal>PANIC</literal> (effectively turning this feature Valid values are <literal>DEBUG5</literal>,
off for normal use). Valid values are <literal>DEBUG5</literal>,
<literal>DEBUG4</literal>, <literal>DEBUG3</literal>, <literal>DEBUG4</literal>, <literal>DEBUG3</literal>,
<literal>DEBUG2</literal>, <literal>DEBUG1</literal>, <literal>DEBUG2</literal>, <literal>DEBUG1</literal>,
<literal>INFO</literal>, <literal>NOTICE</literal>, <literal>INFO</literal>, <literal>NOTICE</literal>,
<literal>WARNING</literal>, <literal>ERROR</literal>, <literal>WARNING</literal>, <literal>ERROR</literal>,
<literal>FATAL</literal>, and <literal>PANIC</literal>. For <literal>FATAL</literal>, and <literal>PANIC</literal>.
example, if you set this to <literal>ERROR</literal> then all The default is <literal>ERROR</literal>, which means statements
SQL statements causing errors, fatal errors, or panics will be causing errors, fatal errors, or panics will be logged.
logged. Enabling this parameter can be helpful in tracking down To effectively turn off logging of failing statements,
the source of any errors that appear in the server log. set this parameter to <literal>PANIC</literal>.
Only superusers can change this setting. Only superusers can change this setting.
</para> </para>
</listitem> </listitem>
@ -2898,7 +2897,7 @@ SELECT * FROM parent WHERE key = 2400;
query protocol, this setting likewise does not log statements that query protocol, this setting likewise does not log statements that
fail before the Execute phase (i.e., during parse analysis or fail before the Execute phase (i.e., during parse analysis or
planning). Set <varname>log_min_error_statement</> to planning). Set <varname>log_min_error_statement</> to
<literal>error</> to log such statements. <literal>ERROR</> (or lower) to log such statements.
</para> </para>
</note> </note>
</listitem> </listitem>

View File

@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>. * Written by Peter Eisentraut <peter_e@gmx.net>.
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.358 2006/11/05 22:42:09 tgl Exp $ * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.359 2006/11/21 01:23:37 tgl Exp $
* *
*-------------------------------------------------------------------- *--------------------------------------------------------------------
*/ */
@ -176,7 +176,7 @@ bool SQL_inheritance = true;
bool Password_encryption = true; bool Password_encryption = true;
int log_min_error_statement = PANIC; int log_min_error_statement = ERROR;
int log_min_messages = NOTICE; int log_min_messages = NOTICE;
int client_min_messages = NOTICE; int client_min_messages = NOTICE;
int log_min_duration_statement = -1; int log_min_duration_statement = -1;
@ -1853,7 +1853,7 @@ static struct config_string ConfigureNamesString[] =
"specified level or a higher level are logged.") "specified level or a higher level are logged.")
}, },
&log_min_error_statement_str, &log_min_error_statement_str,
"panic", assign_min_error_statement, NULL "error", assign_min_error_statement, NULL
}, },
{ {

View File

@ -284,7 +284,7 @@
#log_error_verbosity = default # terse, default, or verbose messages #log_error_verbosity = default # terse, default, or verbose messages
#log_min_error_statement = panic # Values in order of increasing severity: #log_min_error_statement = error # Values in order of increasing severity:
# debug5 # debug5
# debug4 # debug4
# debug3 # debug3
@ -294,7 +294,8 @@
# notice # notice
# warning # warning
# error # error
# panic(off) # fatal
# panic (effectively off)
#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
# and their durations. # and their durations.