diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-04-09 04:43:20 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-04-09 04:43:20 +0000 |
commit | 1f6d8b90b83e02af8e73adcb167581bb10d6be22 (patch) | |
tree | 951f6bcc75fc6e42e23b1e695d259bc18a71b193 /src/backend/access | |
parent | 9c38a8d29684e9b9822ff7ca7f84c22ecab9cf1e (diff) | |
download | postgresql-1f6d8b90b83e02af8e73adcb167581bb10d6be22.tar.gz postgresql-1f6d8b90b83e02af8e73adcb167581bb10d6be22.zip |
Buffer manager modifications to keep a local buffer-dirtied bit as well
as a shared dirtybit for each shared buffer. The shared dirtybit still
controls writing the buffer, but the local bit controls whether we need
to fsync the buffer's file. This arrangement fixes a bug that allowed
some required fsyncs to be missed, and should improve performance as well.
For more info see my post of same date on pghackers.
Diffstat (limited to 'src/backend/access')
-rw-r--r-- | src/backend/access/transam/xact.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index c3db87a187a..2522cca46c1 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.62 2000/03/17 02:36:05 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.63 2000/04/09 04:43:16 tgl Exp $ * * NOTES * Transaction aborts can now occur two ways: @@ -642,7 +642,7 @@ RecordTransactionCommit() { FlushBufferPool(); if (leak) - ResetBufferPool(); + ResetBufferPool(true); /* * have the transaction access methods record the status @@ -658,7 +658,7 @@ RecordTransactionCommit() } if (leak) - ResetBufferPool(); + ResetBufferPool(true); } @@ -759,7 +759,10 @@ RecordTransactionAbort() if (SharedBufferChanged && !TransactionIdDidCommit(xid)) TransactionIdAbort(xid); - ResetBufferPool(); + /* + * Tell bufmgr and smgr to release resources. + */ + ResetBufferPool(false); /* false -> is abort */ } /* -------------------------------- |