summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-06-19 20:13:22 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-06-19 20:13:22 +0000
commit6e07228728e51bf875ecc9669f63ed648aba88c9 (patch)
tree52d514109f71ad5281d8787d8ae04db4858c2e51 /doc/src
parent4c310eca2eabce72e7346af4a539ed066cbabe3e (diff)
Code review for log_lock_waits patch. Don't try to issue log messages from
within a signal handler (this might be safe given the relatively narrow code range in which the interrupt is enabled, but it seems awfully risky); do issue more informative log messages that tell what is being waited for and the exact length of the wait; minor other code cleanup. Greg Stark and Tom Lane
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/config.sgml19
1 files changed, 13 insertions, 6 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 03dccd47f5d..1d806bf1b73 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.126 2007/06/07 19:19:56 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.127 2007/06/19 20:13:21 tgl Exp $ -->
<chapter Id="runtime-config">
<title>Server Configuration</title>
@@ -2947,7 +2947,7 @@ SELECT * FROM parent WHERE key = 2400;
</indexterm>
<listitem>
<para>
- Controls whether a log message is produced when a statement waits
+ Controls whether a log message is produced when a session waits
longer than <xref linkend="guc-deadlock-timeout"> to acquire a
lock. This is useful in determining if lock waits are causing
poor performance. The default is <literal>off</>.
@@ -4084,11 +4084,18 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
wasted in needless deadlock checks, but slows down reporting of
real deadlock errors. The default is one second (<literal>1s</>),
which is probably about the smallest value you would want in
- practice. Set <xref linkend="guc-log-lock-waits"> to log deadlock
- checks. On a heavily loaded server you might want to raise it.
+ practice. On a heavily loaded server you might want to raise it.
Ideally the setting should exceed your typical transaction time,
- so as to improve the odds that a lock will be released before the
- waiter decides to check for deadlock.
+ so as to improve the odds that a lock will be released before
+ the waiter decides to check for deadlock.
+ </para>
+
+ <para>
+ When <xref linkend="guc-log-lock-waits"> is set,
+ this parameter also determines the length of time to wait before
+ a log message is issued about the lock wait. If you are trying
+ to investigate locking delays you might want to set a shorter than
+ normal <varname>deadlock_timeout</varname>.
</para>
</listitem>
</varlistentry>