]> granicus.if.org Git - postgresql/commitdiff
CommitInfoNeedsSave[buffer - 1] = 0
authorVadim B. Mikheev <vadim4o@yahoo.com>
Fri, 18 Apr 1997 08:30:08 +0000 (08:30 +0000)
committerVadim B. Mikheev <vadim4o@yahoo.com>
Fri, 18 Apr 1997 08:30:08 +0000 (08:30 +0000)
added to WriteBuffer(), FlushBuffer(), WriteNoReleaseBuffer().

src/backend/storage/buffer/bufmgr.c

index cd057a830a4dc662de7b784a5f4d1707895fcfd0..85a812d80aa40598dc0528b80f9a3255015df30a 100644 (file)
@@ -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]++;
 }