Skip to content

Commit 414c7a5

Browse files
committed
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.
1 parent e82d9e6 commit 414c7a5

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

doc/src/sgml/config.sgml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.95 2006/11/12 05:12:42 neilc Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.96 2006/11/21 01:23:37 tgl Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -2474,20 +2474,19 @@ SELECT * FROM parent WHERE key = 2400;
24742474
<listitem>
24752475
<para>
24762476
Controls whether or not the SQL statement that causes an error
2477-
condition will also be recorded in the server log. All SQL
2478-
statements that cause an error of the specified level or
2479-
higher are logged. The default is
2480-
<literal>PANIC</literal> (effectively turning this feature
2481-
off for normal use). Valid values are <literal>DEBUG5</literal>,
2477+
condition will be recorded in the server log. The current
2478+
SQL statement is included in the log entry for any message of
2479+
the specified severity or higher.
2480+
Valid values are <literal>DEBUG5</literal>,
24822481
<literal>DEBUG4</literal>, <literal>DEBUG3</literal>,
24832482
<literal>DEBUG2</literal>, <literal>DEBUG1</literal>,
24842483
<literal>INFO</literal>, <literal>NOTICE</literal>,
24852484
<literal>WARNING</literal>, <literal>ERROR</literal>,
2486-
<literal>FATAL</literal>, and <literal>PANIC</literal>. For
2487-
example, if you set this to <literal>ERROR</literal> then all
2488-
SQL statements causing errors, fatal errors, or panics will be
2489-
logged. Enabling this parameter can be helpful in tracking down
2490-
the source of any errors that appear in the server log.
2485+
<literal>FATAL</literal>, and <literal>PANIC</literal>.
2486+
The default is <literal>ERROR</literal>, which means statements
2487+
causing errors, fatal errors, or panics will be logged.
2488+
To effectively turn off logging of failing statements,
2489+
set this parameter to <literal>PANIC</literal>.
24912490
Only superusers can change this setting.
24922491
</para>
24932492
</listitem>
@@ -2898,7 +2897,7 @@ SELECT * FROM parent WHERE key = 2400;
28982897
query protocol, this setting likewise does not log statements that
28992898
fail before the Execute phase (i.e., during parse analysis or
29002899
planning). Set <varname>log_min_error_statement</> to
2901-
<literal>error</> to log such statements.
2900+
<literal>ERROR</> (or lower) to log such statements.
29022901
</para>
29032902
</note>
29042903
</listitem>

src/backend/utils/misc/guc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.358 2006/11/05 22:42:09 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.359 2006/11/21 01:23:37 tgl Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -176,7 +176,7 @@ bool SQL_inheritance = true;
176176

177177
bool Password_encryption = true;
178178

179-
int log_min_error_statement = PANIC;
179+
int log_min_error_statement = ERROR;
180180
int log_min_messages = NOTICE;
181181
int client_min_messages = NOTICE;
182182
int log_min_duration_statement = -1;
@@ -1853,7 +1853,7 @@ static struct config_string ConfigureNamesString[] =
18531853
"specified level or a higher level are logged.")
18541854
},
18551855
&log_min_error_statement_str,
1856-
"panic", assign_min_error_statement, NULL
1856+
"error", assign_min_error_statement, NULL
18571857
},
18581858

18591859
{

src/backend/utils/misc/postgresql.conf.sample

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284

285285
#log_error_verbosity = default # terse, default, or verbose messages
286286

287-
#log_min_error_statement = panic # Values in order of increasing severity:
287+
#log_min_error_statement = error # Values in order of increasing severity:
288288
# debug5
289289
# debug4
290290
# debug3
@@ -294,7 +294,8 @@
294294
# notice
295295
# warning
296296
# error
297-
# panic(off)
297+
# fatal
298+
# panic (effectively off)
298299

299300
#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
300301
# and their durations.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy