diff options
author | Vadim B. Mikheev <vadim4o@yahoo.com> | 1998-08-01 15:26:38 +0000 |
---|---|---|
committer | Vadim B. Mikheev <vadim4o@yahoo.com> | 1998-08-01 15:26:38 +0000 |
commit | 0d78e8c1124cb7f44f17dec2d313c2ac4b871195 (patch) | |
tree | 2dc1bfd7b22c47eab4c869f6ae2995349250a28e /src/backend/storage/buffer/bufmgr.c | |
parent | 83d3626b1f43cb507755d27e914e6788c17cd8ac (diff) | |
download | postgresql-0d78e8c1124cb7f44f17dec2d313c2ac4b871195.tar.gz postgresql-0d78e8c1124cb7f44f17dec2d313c2ac4b871195.zip |
Lmgr cleanup, new locking modes for LLL.
Diffstat (limited to 'src/backend/storage/buffer/bufmgr.c')
-rw-r--r-- | src/backend/storage/buffer/bufmgr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 97664f76f67..cffe640e2c3 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.39 1998/07/13 16:34:49 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.40 1998/08/01 15:26:12 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -114,18 +114,18 @@ RelationGetBufferWithBuffer(Relation relation, Buffer buffer) { BufferDesc *bufHdr; - LockRelId lrelId; if (BufferIsValid(buffer)) { if (!BufferIsLocal(buffer)) { + LockRelId *lrelId = &(((LockInfo)(relation->lockInfo))->lockRelId); + bufHdr = &BufferDescriptors[buffer - 1]; - lrelId = RelationGetLockRelId(relation); SpinAcquire(BufMgrLock); if (bufHdr->tag.blockNum == blockNumber && - bufHdr->tag.relId.relId == lrelId.relId && - bufHdr->tag.relId.dbId == lrelId.dbId) + bufHdr->tag.relId.relId == lrelId->relId && + bufHdr->tag.relId.dbId == lrelId->dbId) { SpinRelease(BufMgrLock); return (buffer); @@ -1282,7 +1282,7 @@ BufferGetRelation(Buffer buffer) Assert(!BufferIsLocal(buffer)); /* not supported for local buffers */ /* XXX should be a critical section */ - relid = LockRelIdGetRelationId(BufferDescriptors[buffer - 1].tag.relId); + relid = BufferDescriptors[buffer - 1].tag.relId.relId; relation = RelationIdGetRelation(relid); RelationDecrementReferenceCount(relation); |