summaryrefslogtreecommitdiff
path: root/src/include/storage/lock.h
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1997-02-12 05:25:13 +0000
committerMarc G. Fournier <scrappy@hub.org>1997-02-12 05:25:13 +0000
commitfb70587c1d5e111dfe63893c4dd934b430267ef5 (patch)
tree930f745f0705a3b6da38f83581bd6ee4df7e7582 /src/include/storage/lock.h
parentba82bb3eacdeef77377b8a9dc9126c506d3f7b11 (diff)
downloadpostgresql-fb70587c1d5e111dfe63893c4dd934b430267ef5.tar.gz
Patch from Massimo Dal Zotto <dz@cs.unitn.it>
The following patches add to the backend a new debugging flag -K which prints a debug trace of all locking operations on user relations (those with oid greater than 20000). The code is compiled only if LOCK_MGR_DEBUG is defined, so the patch should be harmless if not explicitly enabled. I'm using the code to trace deadlock conditions caused by application queries using the command "$POSTMASTER -D $PGDATA -o '-d 1 -K 1'. The patches are for version 6.0 dated 970126.
Diffstat (limited to 'src/include/storage/lock.h')
-rw-r--r--src/include/storage/lock.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h
index e8c46ce739..49e8915dc7 100644
--- a/src/include/storage/lock.h
+++ b/src/include/storage/lock.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: lock.h,v 1.3 1996/11/05 06:11:00 scrappy Exp $
+ * $Id: lock.h,v 1.4 1997/02/12 05:25:13 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -211,4 +211,8 @@ extern bool LockReleaseAll(LockTableId tableId, SHM_QUEUE *lockQueue);
extern int LockShmemSize(void);
extern bool LockingDisabled(void);
+#ifdef DEADLOCK_DEBUG
+extern void DumpLocks(void);
+#endif
+
#endif /* LOCK_H */