1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

Get rid of SetBufferWriteMode(), which was an accident waiting to happen.

In the event of an elog() while the mode was set to immediate write,
there was no way for it to be set back to the normal delayed write.
The mechanism was a waste of space and cycles anyway, since the only user
was varsup.c, which could perfectly well call FlushBuffer directly.
Now it does just that, and the notion of a write mode is gone.
This commit is contained in:
Tom Lane
2000-03-31 02:43:31 +00:00
parent 5717dcb8a7
commit ca05ba2a9d
3 changed files with 37 additions and 75 deletions

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: bufmgr.h,v 1.34 2000/01/26 05:58:32 momjian Exp $
* $Id: bufmgr.h,v 1.35 2000/03/31 02:43:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -56,12 +56,6 @@ 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 */
/*
* Buffer context lock modes
*/
@@ -165,6 +159,7 @@ extern int WriteBuffer(Buffer buffer);
extern int WriteNoReleaseBuffer(Buffer buffer);
extern Buffer ReleaseAndReadBuffer(Buffer buffer, Relation relation,
BlockNumber blockNum);
extern int FlushBuffer(Buffer buffer, bool release);
extern void InitBufferPool(IPCKey key);
extern void PrintBufferUsage(FILE *statfp);
@@ -182,7 +177,6 @@ extern void PrintPinnedBufs(void);
extern int BufferShmemSize(void);
extern int ReleaseBuffer(Buffer buffer);
extern int SetBufferWriteMode(int mode);
extern void SetBufferCommitInfoNeedsSave(Buffer buffer);
extern void UnlockBuffers(void);