mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
CommitInfoNeedsSave[buffer - 1] = 0
added to WriteBuffer(), FlushBuffer(), WriteNoReleaseBuffer().
This commit is contained in:
parent
538f58c04c
commit
d6b8f637f9
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.12 1997/04/18 02:53:23 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.13 1997/04/18 08:30:08 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -663,6 +663,7 @@ WriteBuffer(Buffer buffer)
|
||||
bufHdr->flags |= (BM_DIRTY | BM_JUST_DIRTIED);
|
||||
UnpinBuffer(bufHdr);
|
||||
SpinRelease(BufMgrLock);
|
||||
CommitInfoNeedsSave[buffer - 1] = 0;
|
||||
}
|
||||
return(TRUE);
|
||||
}
|
||||
@ -784,6 +785,7 @@ FlushBuffer(Buffer buffer, bool release)
|
||||
if ( release )
|
||||
UnpinBuffer(bufHdr);
|
||||
SpinRelease(BufMgrLock);
|
||||
CommitInfoNeedsSave[buffer - 1] = 0;
|
||||
|
||||
return(STATUS_OK);
|
||||
}
|
||||
@ -816,6 +818,7 @@ WriteNoReleaseBuffer(Buffer buffer)
|
||||
SpinAcquire(BufMgrLock);
|
||||
bufHdr->flags |= (BM_DIRTY | BM_JUST_DIRTIED);
|
||||
SpinRelease(BufMgrLock);
|
||||
CommitInfoNeedsSave[buffer - 1] = 0;
|
||||
}
|
||||
return(STATUS_OK);
|
||||
}
|
||||
@ -1765,5 +1768,6 @@ int SetBufferWriteMode (int mode)
|
||||
|
||||
void SetBufferCommitInfoNeedsSave(Buffer buffer)
|
||||
{
|
||||
CommitInfoNeedsSave[buffer - 1]++;
|
||||
if ( !BufferIsLocal(buffer) )
|
||||
CommitInfoNeedsSave[buffer - 1]++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user