Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit414c7a5

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 morewidely useful setting than the previous default of PANIC.
1 parente82d9e6 commit414c7a5

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 statementscausing 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 @@ boolSQL_inheritance = true;
176176

177177
boolPassword_encryption= true;
178178

179-
intlog_min_error_statement=PANIC;
179+
intlog_min_error_statement=ERROR;
180180
intlog_min_messages=NOTICE;
181181
intclient_min_messages=NOTICE;
182182
intlog_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)

[8]ページ先頭

©2009-2025 Movatter.jp