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

Commit9fc25c0

Browse files
committed
Improve logging of checkpoints. Patch by Greg Smith, worked over
by Heikki and a little bit by me.
1 parent2910cce commit9fc25c0

File tree

7 files changed

+246
-111
lines changed

7 files changed

+246
-111
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 66 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.129 2007/06/28 00:02:37 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.130 2007/06/30 19:12:01 tgl Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -2660,22 +2660,44 @@ SELECT * FROM parent WHERE key = 2400;
26602660
</listitem>
26612661
</varlistentry>
26622662

2663+
<varlistentry id="guc-log-checkpoints" xreflabel="log_checkpoints">
2664+
<term><varname>log_checkpoints</varname> (<type>boolean</type>)</term>
2665+
<indexterm>
2666+
<primary><varname>log_checkpoints</> configuration parameter</primary>
2667+
</indexterm>
2668+
<listitem>
2669+
<para>
2670+
Causes checkpoints to be logged in the server log. Some
2671+
statistics about each checkpoint are included in the log messages,
2672+
including the number of buffers written and the time spent writing
2673+
them.
2674+
This parameter can only be set in the <filename>postgresql.conf</>
2675+
file or on the server command line. The default is off.
2676+
</para>
2677+
</listitem>
2678+
</varlistentry>
2679+
26632680
<varlistentry id="guc-log-connections" xreflabel="log_connections">
26642681
<term><varname>log_connections</varname> (<type>boolean</type>)</term>
26652682
<indexterm>
26662683
<primary><varname>log_connections</> configuration parameter</primary>
26672684
</indexterm>
26682685
<listitem>
26692686
<para>
2670-
This outputs a line to the server log detailing each successful
2671-
connection. This is off by default, although it is probably very
2672-
useful. Some client programs, like <application>psql</>, attempt
2673-
to connect twice while determining if a password is required, so
2674-
duplicate <quote>connection received</> messages do not
2675-
necessarily indicate a problem.
2687+
Causes each attempted connection to the server to be logged,
2688+
as well as successful completion of client authentication.
26762689
This parameter can only be set in the <filename>postgresql.conf</>
2677-
file or on the server command line.
2690+
file or on the server command line. The default is off.
26782691
</para>
2692+
2693+
<note>
2694+
<para>
2695+
Some client programs, like <application>psql</>, attempt
2696+
to connect twice while determining if a password is required, so
2697+
duplicate <quote>connection received</> messages do not
2698+
necessarily indicate a problem.
2699+
</para>
2700+
</note>
26792701
</listitem>
26802702
</varlistentry>
26812703

@@ -2729,6 +2751,23 @@ SELECT * FROM parent WHERE key = 2400;
27292751
</note>
27302752
</listitem>
27312753
</varlistentry>
2754+
2755+
<varlistentry id="guc-log-hostname" xreflabel="log_hostname">
2756+
<term><varname>log_hostname</varname> (<type>boolean</type>)</term>
2757+
<indexterm>
2758+
<primary><varname>log_hostname</> configuration parameter</primary>
2759+
</indexterm>
2760+
<listitem>
2761+
<para>
2762+
By default, connection log messages only show the IP address of the
2763+
connecting host. Turning on this parameter causes logging of the
2764+
host name as well. Note that depending on your host name resolution
2765+
setup this might impose a non-negligible performance penalty.
2766+
This parameter can only be set in the <filename>postgresql.conf</>
2767+
file or on the server command line.
2768+
</para>
2769+
</listitem>
2770+
</varlistentry>
27322771

27332772
<varlistentry id="guc-log-line-prefix" xreflabel="log_line_prefix">
27342773
<term><varname>log_line_prefix</varname> (<type>string</type>)</term>
@@ -2860,6 +2899,21 @@ SELECT * FROM parent WHERE key = 2400;
28602899
</listitem>
28612900
</varlistentry>
28622901

2902+
<varlistentry id="guc-log-lock-waits" xreflabel="log_lock_waits">
2903+
<term><varname>log_lock_waits</varname> (<type>boolean</type>)</term>
2904+
<indexterm>
2905+
<primary><varname>log_lock_waits</> configuration parameter</primary>
2906+
</indexterm>
2907+
<listitem>
2908+
<para>
2909+
Controls whether a log message is produced when a session waits
2910+
longer than <xref linkend="guc-deadlock-timeout"> to acquire a
2911+
lock. This is useful in determining if lock waits are causing
2912+
poor performance. The default is <literal>off</>.
2913+
</para>
2914+
</listitem>
2915+
</varlistentry>
2916+
28632917
<varlistentry id="guc-log-statement" xreflabel="log_statement">
28642918
<term><varname>log_statement</varname> (<type>string</type>)</term>
28652919
<indexterm>
@@ -2904,38 +2958,6 @@ SELECT * FROM parent WHERE key = 2400;
29042958
</listitem>
29052959
</varlistentry>
29062960

2907-
<varlistentry id="guc-log-hostname" xreflabel="log_hostname">
2908-
<term><varname>log_hostname</varname> (<type>boolean</type>)</term>
2909-
<indexterm>
2910-
<primary><varname>log_hostname</> configuration parameter</primary>
2911-
</indexterm>
2912-
<listitem>
2913-
<para>
2914-
By default, connection log messages only show the IP address of the
2915-
connecting host. Turning on this parameter causes logging of the
2916-
host name as well. Note that depending on your host name resolution
2917-
setup this might impose a non-negligible performance penalty.
2918-
This parameter can only be set in the <filename>postgresql.conf</>
2919-
file or on the server command line.
2920-
</para>
2921-
</listitem>
2922-
</varlistentry>
2923-
2924-
<varlistentry id="guc-log-lock-waits" xreflabel="log_lock_waits">
2925-
<term><varname>log_lock_waits</varname> (<type>boolean</type>)</term>
2926-
<indexterm>
2927-
<primary><varname>log_lock_waits</> configuration parameter</primary>
2928-
</indexterm>
2929-
<listitem>
2930-
<para>
2931-
Controls whether a log message is produced when a session waits
2932-
longer than <xref linkend="guc-deadlock-timeout"> to acquire a
2933-
lock. This is useful in determining if lock waits are causing
2934-
poor performance. The default is <literal>off</>.
2935-
</para>
2936-
</listitem>
2937-
</varlistentry>
2938-
29392961
<varlistentry id="guc-log-temp-files" xreflabel="log_temp_files">
29402962
<term><varname>log_temp_files</varname> (<type>integer</type>)</term>
29412963
<indexterm>
@@ -2944,11 +2966,12 @@ SELECT * FROM parent WHERE key = 2400;
29442966
<listitem>
29452967
<para>
29462968
Controls whether temporary files are logged when deleted.
2969+
Temporary files can be
2970+
created for sorts, hashes, and temporary query results.
29472971
A value of zero logs all temporary files, and positive
29482972
values log only files whose size is equal or greater than
2949-
the specified number of kilobytes. Temporary files can be
2950-
created for sorts, hashes, and temporary results. The
2951-
default is <literal>-1</> (off).
2973+
the specified number of kilobytes. The
2974+
default is <literal>-1</>, which disables this logging.
29522975
</para>
29532976
</listitem>
29542977
</varlistentry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp