diff options
| author | Tom Lane | 2001-09-29 04:02:27 +0000 |
|---|---|---|
| committer | Tom Lane | 2001-09-29 04:02:27 +0000 |
| commit | 499abb0c0f21cb861c5af1d49a06469f3cfcc1eb (patch) | |
| tree | 0af6262d9b6d1159315e93e90e69047b959ea5f5 /src/include/storage/sinval.h | |
| parent | 818fb55ac49b4b20e65d9899fc1784e54e86db58 (diff) | |
Implement new 'lightweight lock manager' that's intermediate between
existing lock manager and spinlocks: it understands exclusive vs shared
lock but has few other fancy features. Replace most uses of spinlocks
with lightweight locks. All remaining uses of spinlocks have very short
lock hold times (a few dozen instructions), so tweak spinlock backoff
code to work efficiently given this assumption. All per my proposal on
pghackers 26-Sep-01.
Diffstat (limited to 'src/include/storage/sinval.h')
| -rw-r--r-- | src/include/storage/sinval.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/include/storage/sinval.h b/src/include/storage/sinval.h index 2e1ac7bfb15..8ecb9024d2b 100644 --- a/src/include/storage/sinval.h +++ b/src/include/storage/sinval.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: sinval.h,v 1.21 2001/08/26 16:56:02 tgl Exp $ + * $Id: sinval.h,v 1.22 2001/09/29 04:02:27 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -16,7 +16,6 @@ #include "storage/backendid.h" #include "storage/itemptr.h" -#include "storage/spin.h" /* @@ -64,8 +63,6 @@ typedef union } SharedInvalidationMessage; -extern SPINLOCK SInvalLock; - extern int SInvalShmemSize(int maxBackends); extern void CreateSharedInvalidationState(int maxBackends); extern void InitBackendSharedInvalidationState(void); @@ -78,7 +75,7 @@ extern bool DatabaseHasActiveBackends(Oid databaseId, bool ignoreMyself); extern bool TransactionIdIsInProgress(TransactionId xid); extern TransactionId GetOldestXmin(bool allDbs); extern int CountActiveBackends(void); -/* Use "struct proc", not PROC, to avoid including proc.h here */ -extern struct proc *BackendIdGetProc(BackendId procId); +/* Use "struct PROC", not PROC, to avoid including proc.h here */ +extern struct PROC *BackendIdGetProc(BackendId procId); #endif /* SINVAL_H */ |
