From fb70587c1d5e111dfe63893c4dd934b430267ef5 Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Wed, 12 Feb 1997 05:25:13 +0000 Subject: Patch from Massimo Dal Zotto 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. --- src/include/storage/lock.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/include/storage/lock.h') 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 */ -- cgit v1.2.1