diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-01-25 03:31:16 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-01-25 03:31:16 +0000 |
| commit | a05eae029aa7648c8a5f4a5edb3709a2e867098e (patch) | |
| tree | 96ec6bf4eb95fed3a051221dedb62ef5f1dc451e /src/include/storage/proc.h | |
| parent | 40203e4f3e65566fc268a26ad9d16f96328490eb (diff) | |
| download | postgresql-a05eae029aa7648c8a5f4a5edb3709a2e867098e.tar.gz | |
Re-implement deadlock detection and resolution, per design notes posted
to pghackers on 18-Jan-01.
Diffstat (limited to 'src/include/storage/proc.h')
| -rw-r--r-- | src/include/storage/proc.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index 3f8902e7d3..4dd5a8c2a6 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: proc.h,v 1.38 2001/01/24 19:43:28 momjian Exp $ + * $Id: proc.h,v 1.39 2001/01/25 03:31:16 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -41,7 +41,7 @@ struct proc SHM_QUEUE links; /* list link if process is in a list */ SEMA sem; /* ONE semaphore to sleep on */ - int errType; /* error code tells why we woke up */ + int errType; /* STATUS_OK or STATUS_ERROR after wakeup */ TransactionId xid; /* transaction currently being executed by * this proc */ @@ -86,13 +86,6 @@ do { \ if (MyProc) (MyProc->sLocks[(lock)])--; \ } while (0) -/* - * flags explaining why process woke up - */ -#define NO_ERROR 0 -#define ERR_TIMEOUT 1 -#define ERR_BUFFER_IO 2 - /* * There is one ProcGlobal struct for the whole installation. @@ -134,10 +127,10 @@ extern void ProcReleaseLocks(bool isCommit); extern bool ProcRemove(int pid); extern void ProcQueueInit(PROC_QUEUE *queue); -extern int ProcSleep(LOCKMETHODCTL *lockctl, LOCKMODE lockmode, +extern int ProcSleep(LOCKMETHODTABLE *lockMethodTable, LOCKMODE lockmode, LOCK *lock, HOLDER *holder); extern PROC *ProcWakeup(PROC *proc, int errType); -extern int ProcLockWakeup(LOCKMETHOD lockmethod, LOCK *lock); +extern void ProcLockWakeup(LOCKMETHODTABLE *lockMethodTable, LOCK *lock); extern void ProcReleaseSpins(PROC *proc); extern bool LockWaitCancel(void); extern void HandleDeadLock(SIGNAL_ARGS); |
