*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.26 1997/09/22 07:13:56 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.27 1997/10/12 07:12:02 vadim Exp $
*
*-------------------------------------------------------------------------
*/
status = smgrflush(bufHdr->bufsmgr, bufrel, bufHdr->tag.blockNum,
(char *) MAKE_PTR(bufHdr->data));
+
+ RelationDecrementReferenceCount(bufrel);
if (status == SM_FAIL)
{
* were flushing it out we must not clear DIRTY flag -
* vadim 01/17/97
*/
- if (bufHdr->flags & BM_JUST_DIRTIED)
- {
- elog(NOTICE, "BufferSync: content of block %u (%s) changed while flushing",
- bufHdr->tag.blockNum, bufHdr->sb_relname);
- }
- else
- {
+ if (!(bufHdr->flags & BM_JUST_DIRTIED))
bufHdr->flags &= ~BM_DIRTY;
- }
if (reln != (Relation) NULL)
RelationDecrementReferenceCount(reln);
}
bufHdr->tag.blockNum,
(char *) MAKE_PTR(bufHdr->data));
}
+
+ if (reln != (Relation) NULL)
+ RelationDecrementReferenceCount(reln);
if (status == SM_FAIL)
return (FALSE);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.12 1997/09/18 20:21:22 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.13 1997/10/12 07:12:03 vadim Exp $
*
*-------------------------------------------------------------------------
*/
smgrwrite(bufrel->rd_rel->relsmgr, bufrel, bufHdr->tag.blockNum,
(char *) MAKE_PTR(bufHdr->data));
LocalBufferFlushCount++;
+ RelationDecrementReferenceCount(bufrel);
}
/*
smgrflush(bufrel->rd_rel->relsmgr, bufrel, bufHdr->tag.blockNum,
(char *) MAKE_PTR(bufHdr->data));
LocalBufferFlushCount++;
-
+ RelationDecrementReferenceCount(bufrel);
+
Assert(LocalRefCount[bufid] > 0);
if (release)
LocalRefCount[bufid]--;
smgrwrite(bufrel->rd_rel->relsmgr, bufrel, buf->tag.blockNum,
(char *) MAKE_PTR(buf->data));
LocalBufferFlushCount++;
-
+ RelationDecrementReferenceCount(bufrel);
+
buf->tag.relId.relId = InvalidOid;
buf->flags &= ~BM_DIRTY;
}