Skip to content

Commit 5abfe14

Browse files
committed
SetBufferWriteMode () added; FlushLocalBuffer () fixed (shouldn't
release buffer if called from WriteNoReleaseBuffer ())
1 parent 9e41af2 commit 5abfe14

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/include/storage/buf_internals.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: buf_internals.h,v 1.7 1996/12/04 03:06:27 bryanh Exp $
9+
* $Id: buf_internals.h,v 1.8 1997/01/16 07:53:26 vadim Exp $
1010
*
1111
* NOTE
1212
* If BUFFERPAGE0 is defined, then 0 will be used as a
@@ -200,7 +200,7 @@ extern int NLocBuffer;
200200
extern BufferDesc *LocalBufferAlloc(Relation reln, BlockNumber blockNum,
201201
bool *foundPtr);
202202
extern int WriteLocalBuffer(Buffer buffer, bool release);
203-
extern int FlushLocalBuffer(Buffer buffer);
203+
extern int FlushLocalBuffer(Buffer buffer, bool release);
204204
extern void InitLocalBuffer(void);
205205
extern void LocalBufferSync(void);
206206
extern void ResetLocalBufferPool(void);

src/include/storage/bufmgr.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: bufmgr.h,v 1.8 1997/01/14 05:36:15 vadim Exp $
9+
* $Id: bufmgr.h,v 1.9 1997/01/16 07:53:27 vadim Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -62,6 +62,12 @@ typedef bits16 BufferLock;
6262

6363
extern int ShowPinTrace;
6464

65+
/*
66+
* BufferWriteModes (settable via SetBufferWriteMode)
67+
*/
68+
#define BUFFER_FLUSH_WRITE 0 /* immediate write */
69+
#define BUFFER_LATE_WRITE 1 /* delayed write: mark as DIRTY */
70+
6571
/*
6672
* prototypes for functions in bufmgr.c
6773
*/
@@ -107,6 +113,7 @@ extern int ReleaseAndReadBuffer_Debug(char *file,
107113
BlockNumber blockNum);
108114
extern void BufferRefCountReset(int *refcountsave);
109115
extern void BufferRefCountRestore(int *refcountsave);
116+
extern int SetBufferWriteMode (int mode);
110117

111118
#endif /* !defined(BufMgrIncluded) */
112119

0 commit comments

Comments
 (0)