diff options
Diffstat (limited to 'src/backend/storage/buffer/localbuf.c')
-rw-r--r-- | src/backend/storage/buffer/localbuf.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/storage/buffer/localbuf.c b/src/backend/storage/buffer/localbuf.c index a6a2d456b26..e003595beda 100644 --- a/src/backend/storage/buffer/localbuf.c +++ b/src/backend/storage/buffer/localbuf.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.26 1999/07/17 20:17:41 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.27 1999/09/18 19:07:26 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -109,6 +109,8 @@ LocalBufferAlloc(Relation reln, BlockNumber blockNum, bool *foundPtr) smgrwrite(DEFAULT_SMGR, bufrel, bufHdr->tag.blockNum, (char *) MAKE_PTR(bufHdr->data)); LocalBufferFlushCount++; + + /* drop relcache refcount incremented by RelationIdCacheGetRelation */ RelationDecrementReferenceCount(bufrel); } @@ -187,6 +189,8 @@ FlushLocalBuffer(Buffer buffer, bool release) smgrflush(DEFAULT_SMGR, bufrel, bufHdr->tag.blockNum, (char *) MAKE_PTR(bufHdr->data)); LocalBufferFlushCount++; + + /* drop relcache refcount incremented by RelationIdCacheGetRelation */ RelationDecrementReferenceCount(bufrel); Assert(LocalRefCount[bufid] > 0); @@ -260,6 +264,8 @@ LocalBufferSync(void) smgrwrite(DEFAULT_SMGR, bufrel, buf->tag.blockNum, (char *) MAKE_PTR(buf->data)); LocalBufferFlushCount++; + + /* drop relcache refcount from RelationIdCacheGetRelation */ RelationDecrementReferenceCount(bufrel); buf->tag.relId.relId = InvalidOid; |