From e52c4a6e26f2c5d37cefe42c39b6233d9c0fbe25 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 3 Mar 2007 18:46:40 +0000 Subject: Add GUC log_lock_waits to log long wait times. Simon Riggs --- doc/src/sgml/config.sgml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index d3f09f63769..2059fed863a 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1,4 +1,4 @@ - + Server Configuration @@ -2946,6 +2946,21 @@ SELECT * FROM parent WHERE key = 2400; + + log_lock_waits (boolean) + + log_lock_waits configuration parameter + + + + Controls whether a log message is produced when a statement waits + longer than to acquire a + lock. This is useful in determining if lock waits are causing + poor performance. The default is off. + + + + log_temp_files (integer) @@ -3980,17 +3995,18 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' This is the amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition. The check for deadlock is relatively slow, so the server doesn't run - it every time it waits for a lock. We (optimistically?) assume + it every time it waits for a lock. We optimistically assume that deadlocks are not common in production applications and just wait on the lock for a while before starting the check for a deadlock. Increasing this value reduces the amount of time 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. On a heavily loaded server you might want to raise it. + practice. Set to log deadlock + checks. 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. -- cgit v1.2.3