From 5abfe1484ac75b16f2c387ae91713624220ee923 Mon Sep 17 00:00:00 2001 From: "Vadim B. Mikheev" Date: Thu, 16 Jan 1997 07:53:27 +0000 Subject: [PATCH] SetBufferWriteMode () added; FlushLocalBuffer () fixed (shouldn't release buffer if called from WriteNoReleaseBuffer ()) --- src/include/storage/buf_internals.h | 4 ++-- src/include/storage/bufmgr.h | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h index 963c887ebc..4ffe4ae22b 100644 --- a/src/include/storage/buf_internals.h +++ b/src/include/storage/buf_internals.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: buf_internals.h,v 1.7 1996/12/04 03:06:27 bryanh Exp $ + * $Id: buf_internals.h,v 1.8 1997/01/16 07:53:26 vadim Exp $ * * NOTE * If BUFFERPAGE0 is defined, then 0 will be used as a @@ -200,7 +200,7 @@ extern int NLocBuffer; extern BufferDesc *LocalBufferAlloc(Relation reln, BlockNumber blockNum, bool *foundPtr); extern int WriteLocalBuffer(Buffer buffer, bool release); -extern int FlushLocalBuffer(Buffer buffer); +extern int FlushLocalBuffer(Buffer buffer, bool release); extern void InitLocalBuffer(void); extern void LocalBufferSync(void); extern void ResetLocalBufferPool(void); diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h index 0a659624f8..e4e376e000 100644 --- a/src/include/storage/bufmgr.h +++ b/src/include/storage/bufmgr.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: bufmgr.h,v 1.8 1997/01/14 05:36:15 vadim Exp $ + * $Id: bufmgr.h,v 1.9 1997/01/16 07:53:27 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -62,6 +62,12 @@ typedef bits16 BufferLock; extern int ShowPinTrace; +/* + * BufferWriteModes (settable via SetBufferWriteMode) + */ +#define BUFFER_FLUSH_WRITE 0 /* immediate write */ +#define BUFFER_LATE_WRITE 1 /* delayed write: mark as DIRTY */ + /* * prototypes for functions in bufmgr.c */ @@ -107,6 +113,7 @@ extern int ReleaseAndReadBuffer_Debug(char *file, BlockNumber blockNum); extern void BufferRefCountReset(int *refcountsave); extern void BufferRefCountRestore(int *refcountsave); +extern int SetBufferWriteMode (int mode); #endif /* !defined(BufMgrIncluded) */