ReleaseTmpRelBuffers is ReleaseRelationBuffers now.
This commit is contained in:
parent
791e9973ab
commit
2ca05fe45d
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.6 1996/12/31 06:47:30 vadim Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.7 1997/01/14 05:40:45 vadim Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1227,33 +1227,29 @@ BufferGetBlock(Buffer buffer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------
|
/* ---------------------------------------------------------------------
|
||||||
* ReleaseTmpRelBuffers
|
* ReleaseRelationBuffers
|
||||||
*
|
*
|
||||||
* this function unmarks all the dirty pages of a temporary
|
* this function unmarks all the dirty pages of a relation
|
||||||
* relation in the buffer pool so that at the end of transaction
|
* in the buffer pool so that at the end of transaction
|
||||||
* these pages will not be flushed.
|
* these pages will not be flushed.
|
||||||
* XXX currently it sequentially searches the buffer pool, should be
|
* XXX currently it sequentially searches the buffer pool, should be
|
||||||
* changed to more clever ways of searching.
|
* changed to more clever ways of searching.
|
||||||
* --------------------------------------------------------------------
|
* --------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ReleaseTmpRelBuffers(Relation tempreldesc)
|
ReleaseRelationBuffers (Relation rdesc)
|
||||||
{
|
{
|
||||||
register int i;
|
register int i;
|
||||||
int holding = 0;
|
int holding = 0;
|
||||||
BufferDesc *buf;
|
BufferDesc *buf;
|
||||||
|
|
||||||
/*
|
if ( rdesc->rd_islocal )
|
||||||
* Is tempreldesc->rd_islocal == FALSE possible at all ?
|
|
||||||
* But I don't want to mess something now. - vadim 12/31/96
|
|
||||||
*/
|
|
||||||
if ( tempreldesc->rd_islocal )
|
|
||||||
{
|
{
|
||||||
for (i = 0; i < NLocBuffer; i++)
|
for (i = 0; i < NLocBuffer; i++)
|
||||||
{
|
{
|
||||||
buf = &LocalBufferDescriptors[i];
|
buf = &LocalBufferDescriptors[i];
|
||||||
if ((buf->flags & BM_DIRTY) &&
|
if ((buf->flags & BM_DIRTY) &&
|
||||||
(buf->tag.relId.relId == tempreldesc->rd_id))
|
(buf->tag.relId.relId == rdesc->rd_id))
|
||||||
{
|
{
|
||||||
buf->flags &= ~BM_DIRTY;
|
buf->flags &= ~BM_DIRTY;
|
||||||
}
|
}
|
||||||
@ -1269,7 +1265,7 @@ ReleaseTmpRelBuffers(Relation tempreldesc)
|
|||||||
}
|
}
|
||||||
if ((buf->flags & BM_DIRTY) &&
|
if ((buf->flags & BM_DIRTY) &&
|
||||||
(buf->tag.relId.dbId == MyDatabaseId) &&
|
(buf->tag.relId.dbId == MyDatabaseId) &&
|
||||||
(buf->tag.relId.relId == tempreldesc->rd_id)) {
|
(buf->tag.relId.relId == rdesc->rd_id)) {
|
||||||
buf->flags &= ~BM_DIRTY;
|
buf->flags &= ~BM_DIRTY;
|
||||||
if (!(buf->flags & BM_FREE)) {
|
if (!(buf->flags & BM_FREE)) {
|
||||||
SpinRelease(BufMgrLock);
|
SpinRelease(BufMgrLock);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user