summaryrefslogtreecommitdiff
path: root/src/include/config.h.in
diff options
context:
space:
mode:
authorBruce Momjian1998-01-27 03:00:43 +0000
committerBruce Momjian1998-01-27 03:00:43 +0000
commit862927f4433bc759b0e8ccd57e778b1259c20b81 (patch)
tree351f8be884d8350c3593f8d5ef8ff2b6f0d90670 /src/include/config.h.in
parent0e91367109fd52376f6a56412f7b095128686685 (diff)
Real deadlock detection.
Diffstat (limited to 'src/include/config.h.in')
-rw-r--r--src/include/config.h.in16
1 files changed, 9 insertions, 7 deletions
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