diff options
Diffstat (limited to 'src/include/storage/lock.h')
-rw-r--r-- | src/include/storage/lock.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h index 5b258ab454b..79494e65020 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.103 2007/01/05 22:19:58 momjian Exp $ + * $PostgreSQL: pgsql/src/include/storage/lock.h,v 1.104 2007/03/03 18:46:40 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -394,6 +394,13 @@ typedef enum LOCKACQUIRE_ALREADY_HELD /* incremented count for lock already held */ } LockAcquireResult; +/* 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_HARD_DEADLOCK /* deadlock, no way out but ERROR */ +} DeadlockState; /* * The lockmgr's shared hash tables are partitioned to reduce contention. @@ -442,7 +449,7 @@ extern void lock_twophase_postcommit(TransactionId xid, uint16 info, extern void lock_twophase_postabort(TransactionId xid, uint16 info, void *recdata, uint32 len); -extern bool DeadLockCheck(PGPROC *proc); +extern DeadlockState DeadLockCheck(PGPROC *proc); extern void DeadLockReport(void); extern void RememberSimpleDeadLock(PGPROC *proc1, LOCKMODE lockmode, |