diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/storage/lmgr.h | 6 | ||||
-rw-r--r-- | src/include/storage/lock.h | 12 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/include/storage/lmgr.h b/src/include/storage/lmgr.h index 19cb9095ad6..36474cd2781 100644 --- a/src/include/storage/lmgr.h +++ b/src/include/storage/lmgr.h @@ -7,13 +7,14 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/lmgr.h,v 1.57 2007/01/05 22:19:58 momjian Exp $ + * $PostgreSQL: pgsql/src/include/storage/lmgr.h,v 1.58 2007/06/19 20:13:22 tgl Exp $ * *------------------------------------------------------------------------- */ #ifndef LMGR_H #define LMGR_H +#include "lib/stringinfo.h" #include "storage/lock.h" #include "utils/rel.h" @@ -69,4 +70,7 @@ extern void UnlockSharedObject(Oid classid, Oid objid, uint16 objsubid, /* Knowledge about which locktags describe temp objects */ extern bool LockTagIsTemp(const LOCKTAG *tag); +/* Describe a locktag for error messages */ +extern void DescribeLockTag(StringInfo buf, const LOCKTAG *tag); + #endif /* LMGR_H */ diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h index 559ea1cec31..e2a5bc7b6f5 100644 --- a/src/include/storage/lock.h +++ b/src/include/storage/lock.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/lock.h,v 1.105 2007/05/30 16:16:32 tgl Exp $ + * $PostgreSQL: pgsql/src/include/storage/lock.h,v 1.106 2007/06/19 20:13:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -397,10 +397,12 @@ typedef enum /* Deadlock states identified by DeadLockCheck() */ typedef enum { - DS_DEADLOCK_NOT_FOUND, /* no deadlock found within database server */ - DS_SOFT_DEADLOCK, /* deadlock, but lock queues rearrangeable */ + DS_NOT_YET_CHECKED, /* no deadlock check has run yet */ + DS_NO_DEADLOCK, /* no deadlock detected */ + DS_SOFT_DEADLOCK, /* deadlock avoided by queue rearrangement */ DS_HARD_DEADLOCK /* deadlock, no way out but ERROR */ -} DeadlockState; +} DeadLockState; + /* * The lockmgr's shared hash tables are partitioned to reduce contention. @@ -449,7 +451,7 @@ extern void lock_twophase_postcommit(TransactionId xid, uint16 info, extern void lock_twophase_postabort(TransactionId xid, uint16 info, void *recdata, uint32 len); -extern DeadlockState DeadLockCheck(PGPROC *proc); +extern DeadLockState DeadLockCheck(PGPROC *proc); extern void DeadLockReport(void); extern void RememberSimpleDeadLock(PGPROC *proc1, LOCKMODE lockmode, |