diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-09-04 22:06:27 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-09-04 22:06:27 +0000 |
| commit | 7a3693716dad968569d3b91ce203841f1293370d (patch) | |
| tree | 60e513010279ef799fb63bab5cdc6c3187b1ae7e /src/include/storage/lmgr.h | |
| parent | ca43f71ca5c24497ad6f2904fd7ac9ce9b2bf75a (diff) | |
| download | postgresql-7a3693716dad968569d3b91ce203841f1293370d.tar.gz | |
Reimplement hash index locking algorithms, per my recent proposal to
pghackers. This fixes the problem recently reported by Markus KrÌutner
(hash bucket split corrupts the state of scans being done concurrently),
and I believe it also fixes all the known problems with deadlocks in
hash index operations. Hash indexes are still not really ready for prime
time (since they aren't WAL-logged), but this is a step forward.
Diffstat (limited to 'src/include/storage/lmgr.h')
| -rw-r--r-- | src/include/storage/lmgr.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/storage/lmgr.h b/src/include/storage/lmgr.h index d7a557d2b5..19bda76d72 100644 --- a/src/include/storage/lmgr.h +++ b/src/include/storage/lmgr.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: lmgr.h,v 1.39 2003/08/04 02:40:14 momjian Exp $ + * $Id: lmgr.h,v 1.40 2003/09/04 22:06:27 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -54,8 +54,9 @@ extern void UnlockRelation(Relation relation, LOCKMODE lockmode); extern void LockRelationForSession(LockRelId *relid, LOCKMODE lockmode); extern void UnlockRelationForSession(LockRelId *relid, LOCKMODE lockmode); -/* Lock a page (mainly used for indices) */ +/* Lock a page (mainly used for indexes) */ extern void LockPage(Relation relation, BlockNumber blkno, LOCKMODE lockmode); +extern bool ConditionalLockPage(Relation relation, BlockNumber blkno, LOCKMODE lockmode); extern void UnlockPage(Relation relation, BlockNumber blkno, LOCKMODE lockmode); /* Lock an XID (used to wait for a transaction to finish) */ |
