From 6e07228728e51bf875ecc9669f63ed648aba88c9 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 19 Jun 2007 20:13:22 +0000 Subject: 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 --- doc/src/sgml/config.sgml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'doc/src') 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 @@ - + Server Configuration @@ -2947,7 +2947,7 @@ SELECT * FROM parent WHERE key = 2400; - Controls whether a log message is produced when a statement waits + Controls whether a log message is produced when a session waits longer than to acquire a lock. This is useful in determining if lock waits are causing poor performance. The default is 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 (1s), which is probably about the smallest value you would want in - practice. Set 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. + + + + When 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 deadlock_timeout. -- cgit v1.2.3