summaryrefslogtreecommitdiff
path: root/src/include/storage/lwlock.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-03-04 20:21:07 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-03-04 20:21:07 +0000
commit5d5087363d7cdbd00fc432a1216e83a00f7139bd (patch)
tree56492be3beb9be188f37bfa68c9bfc0e35b0961c /src/include/storage/lwlock.h
parent5592a6cf46d60187b6f4895d2144e67d4f54fa25 (diff)
downloadpostgresql-5d5087363d7cdbd00fc432a1216e83a00f7139bd.tar.gz
Replace the BufMgrLock with separate locks on the lookup hashtable and
the freelist, plus per-buffer spinlocks that protect access to individual shared buffer headers. This requires abandoning a global freelist (since the freelist is a global contention point), which shoots down ARC and 2Q as well as plain LRU management. Adopt a clock sweep algorithm instead. Preliminary results show substantial improvement in multi-backend situations.
Diffstat (limited to 'src/include/storage/lwlock.h')
-rw-r--r--src/include/storage/lwlock.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h
index eb02eb8a2a..50c029cc8b 100644
--- a/src/include/storage/lwlock.h
+++ b/src/include/storage/lwlock.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/lwlock.h,v 1.16 2004/12/31 22:03:42 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/storage/lwlock.h,v 1.17 2005/03/04 20:21:07 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,7 +25,8 @@
*/
typedef enum LWLockId
{
- BufMgrLock,
+ BufMappingLock,
+ BufFreelistLock,
LockMgrLock,
OidGenLock,
XidGenLock,