diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-03-31 02:43:31 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-03-31 02:43:31 +0000 |
commit | ca05ba2a9d6e9b2a41c16eb1844fdc4c66fce1d4 (patch) | |
tree | e7d8b10d9973ab852992fd856c63e0dac66d1cb3 /src/backend/access/transam/varsup.c | |
parent | 5717dcb8a7b808c619ee092e124b2cbe8bf2e2c1 (diff) |
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.
Diffstat (limited to 'src/backend/access/transam/varsup.c')
-rw-r--r-- | src/backend/access/transam/varsup.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/backend/access/transam/varsup.c b/src/backend/access/transam/varsup.c index 614027c245c..6a31bfe429e 100644 --- a/src/backend/access/transam/varsup.c +++ b/src/backend/access/transam/varsup.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.26 2000/01/26 05:56:04 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.27 2000/03/31 02:43:31 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -88,7 +88,6 @@ VariableRelationPutNextXid(TransactionId xid) { Buffer buf; VariableRelationContents var; - int flushmode; /* ---------------- * We assume that a spinlock has been acquire to guarantee @@ -105,7 +104,7 @@ VariableRelationPutNextXid(TransactionId xid) /* ---------------- * read the variable page, update the nextXid field and - * write the page back out to disk. + * write the page back out to disk (with immediate write). * ---------------- */ buf = ReadBuffer(VariableRelation, 0); @@ -120,9 +119,7 @@ VariableRelationPutNextXid(TransactionId xid) TransactionIdStore(xid, &(var->nextXidData)); - flushmode = SetBufferWriteMode(BUFFER_FLUSH_WRITE); - WriteBuffer(buf); - SetBufferWriteMode(flushmode); + FlushBuffer(buf, TRUE); } /* -------------------------------- |