diff options
author | Bruce Momjian <bruce@momjian.us> | 2007-03-03 18:46:40 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2007-03-03 18:46:40 +0000 |
commit | e52c4a6e26f2c5d37cefe42c39b6233d9c0fbe25 (patch) | |
tree | ca2c1c39d9c0c4c2f0e04d1590d8c72e9101d46a /src/include/storage/lock.h | |
parent | f52019cf80c2a639d0188e0f0cd5988e80367307 (diff) |
Add GUC log_lock_waits to log long wait times.
Simon Riggs
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, |