Commit d6b8f637 authored by Vadim B. Mikheev's avatar Vadim B. Mikheev

CommitInfoNeedsSave[buffer - 1] = 0

added to WriteBuffer(), FlushBuffer(), WriteNoReleaseBuffer().
parent 538f58c0
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * 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) ...@@ -663,6 +663,7 @@ WriteBuffer(Buffer buffer)
bufHdr->flags |= (BM_DIRTY | BM_JUST_DIRTIED); bufHdr->flags |= (BM_DIRTY | BM_JUST_DIRTIED);
UnpinBuffer(bufHdr); UnpinBuffer(bufHdr);
SpinRelease(BufMgrLock); SpinRelease(BufMgrLock);
CommitInfoNeedsSave[buffer - 1] = 0;
} }
return(TRUE); return(TRUE);
} }
...@@ -784,6 +785,7 @@ FlushBuffer(Buffer buffer, bool release) ...@@ -784,6 +785,7 @@ FlushBuffer(Buffer buffer, bool release)
if ( release ) if ( release )
UnpinBuffer(bufHdr); UnpinBuffer(bufHdr);
SpinRelease(BufMgrLock); SpinRelease(BufMgrLock);
CommitInfoNeedsSave[buffer - 1] = 0;
return(STATUS_OK); return(STATUS_OK);
} }
...@@ -816,6 +818,7 @@ WriteNoReleaseBuffer(Buffer buffer) ...@@ -816,6 +818,7 @@ WriteNoReleaseBuffer(Buffer buffer)
SpinAcquire(BufMgrLock); SpinAcquire(BufMgrLock);
bufHdr->flags |= (BM_DIRTY | BM_JUST_DIRTIED); bufHdr->flags |= (BM_DIRTY | BM_JUST_DIRTIED);
SpinRelease(BufMgrLock); SpinRelease(BufMgrLock);
CommitInfoNeedsSave[buffer - 1] = 0;
} }
return(STATUS_OK); return(STATUS_OK);
} }
...@@ -1765,5 +1768,6 @@ int SetBufferWriteMode (int mode) ...@@ -1765,5 +1768,6 @@ int SetBufferWriteMode (int mode)
void SetBufferCommitInfoNeedsSave(Buffer buffer) void SetBufferCommitInfoNeedsSave(Buffer buffer)
{ {
if ( !BufferIsLocal(buffer) )
CommitInfoNeedsSave[buffer - 1]++; CommitInfoNeedsSave[buffer - 1]++;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment