diff options
author | Vadim B. Mikheev <vadim4o@yahoo.com> | 1999-05-07 01:23:11 +0000 |
---|---|---|
committer | Vadim B. Mikheev <vadim4o@yahoo.com> | 1999-05-07 01:23:11 +0000 |
commit | 122abf3af3e0519cfddcfdfd0dfb8eb0c4aca61c (patch) | |
tree | df5da77d26dc9f7337be57fe614030ee6a7b0330 /src/backend/access | |
parent | 86bc1da2628322c25190a15f1b6a433237aa1a45 (diff) | |
download | postgresql-122abf3af3e0519cfddcfdfd0dfb8eb0c4aca61c.tar.gz postgresql-122abf3af3e0519cfddcfdfd0dfb8eb0c4aca61c.zip |
Fix LMGR for MVCC.
Get rid of Extend lock mode.
Diffstat (limited to 'src/backend/access')
-rw-r--r-- | src/backend/access/heap/hio.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c index 3b4fa4af0bb..f991b206d44 100644 --- a/src/backend/access/heap/hio.c +++ b/src/backend/access/heap/hio.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Id: hio.c,v 1.18 1999/05/01 15:04:46 vadim Exp $ + * $Id: hio.c,v 1.19 1999/05/07 01:22:53 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -111,14 +111,13 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple) Item item; /* - * Actually, we lock _relation_ here, not page, but I believe - * that locking page is faster... Obviously, we could get rid - * of ExtendLock mode at all and use ExclusiveLock mode on - * page 0, as long as we use page-level locking for indices only, - * but we are in 6.5-beta currently... - vadim 05/01/99 + * Lock relation for extention. We can use LockPage here as long as + * in all other places we use page-level locking for indices only. + * Alternatevely, we could define pseudo-table as we do for + * transactions with XactLockTable. */ if (!relation->rd_myxactonly) - LockPage(relation, 0, ExtendLock); + LockPage(relation, 0, ExclusiveLock); /* * XXX This does an lseek - VERY expensive - but at the moment it is @@ -166,7 +165,7 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple) } if (!relation->rd_myxactonly) - UnlockPage(relation, 0, ExtendLock); + UnlockPage(relation, 0, ExclusiveLock); offnum = PageAddItem((Page) pageHeader, (Item) tuple->t_data, tuple->t_len, InvalidOffsetNumber, LP_USED); |