1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +03:00

Inline function, rename libpq variablees, change lrel to lockrel.

This commit is contained in:
Bruce Momjian
1998-07-13 16:35:04 +00:00
parent 8bac4ca87b
commit 5aea4062d6
14 changed files with 164 additions and 190 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.38 1998/06/15 19:29:09 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.39 1998/07/13 16:34:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -114,14 +114,14 @@ RelationGetBufferWithBuffer(Relation relation,
Buffer buffer)
{
BufferDesc *bufHdr;
LRelId lrelId;
LockRelId lrelId;
if (BufferIsValid(buffer))
{
if (!BufferIsLocal(buffer))
{
bufHdr = &BufferDescriptors[buffer - 1];
lrelId = RelationGetLRelId(relation);
lrelId = RelationGetLockRelId(relation);
SpinAcquire(BufMgrLock);
if (bufHdr->tag.blockNum == blockNumber &&
bufHdr->tag.relId.relId == lrelId.relId &&
@ -1282,7 +1282,7 @@ BufferGetRelation(Buffer buffer)
Assert(!BufferIsLocal(buffer)); /* not supported for local buffers */
/* XXX should be a critical section */
relid = LRelIdGetRelationId(BufferDescriptors[buffer - 1].tag.relId);
relid = LockRelIdGetRelationId(BufferDescriptors[buffer - 1].tag.relId);
relation = RelationIdGetRelation(relid);
RelationDecrementReferenceCount(relation);