From 862927f4433bc759b0e8ccd57e778b1259c20b81 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 27 Jan 1998 03:00:43 +0000 Subject: Real deadlock detection. --- src/include/config.h.in | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/include/config.h.in') diff --git a/src/include/config.h.in b/src/include/config.h.in index 74f84894db7..9c0b1829c1f 100644 --- a/src/include/config.h.in +++ b/src/include/config.h.in @@ -210,14 +210,16 @@ extern void srandom(int seed); code seems broken without it, Bruce Momjian */ /* #define LOARRAY */ -/* This is the time, in seconds, at which a given backend server - * will wait on a lock before deciding to abort the transaction - * (this is what we do in lieu of deadlock detection). - * - * Low numbers are not recommended as they will tend to cause - * false aborts if many transactions are long-lived. +/* + * As soon as the backend blocks on a lock, it waits this number of seconds + * before checking for a deadlock. If not, it keeps checking every this + * number of seconds. + * We don't check for deadlocks just before sleeping because a deadlock is + * a rare event, and checking is an expensive operation. + * We only detect deadlocks between two processes, not three or more, but + * these are the most common. */ -#define DEADLOCK_TIMEOUT 60 +#define DEADLOCK_CHECK_TIMER 60 /* * This flag enables the use of idexes in plans generated for function -- cgit v1.2.3