diff options
| author | Tom Lane | 2005-03-20 22:00:54 +0000 |
|---|---|---|
| committer | Tom Lane | 2005-03-20 22:00:54 +0000 |
| commit | 354049c709c9d7d0918272e10e4f30d7f8f38788 (patch) | |
| tree | 741c359a1e6494c3ef1b205b84603fd48239b015 /src/include | |
| parent | 683f60da3d837236de5c4249fa2a62c8a94616ca (diff) | |
Remove unnecessary calls of FlushRelationBuffers: there is no need
to write out data that we are about to tell the filesystem to drop.
smgr_internal_unlink already had a DropRelFileNodeBuffers call to
get rid of dead buffers without a write after it's no longer possible
to roll back the deleting transaction. Adding a similar call in
smgrtruncate simplifies callers and makes the overall division of
labor clearer. This patch removes the former behavior that VACUUM
would write all dirty buffers of a relation unconditionally.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/storage/bufmgr.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h index b8bf0f978a7..b77c3cc4675 100644 --- a/src/include/storage/bufmgr.h +++ b/src/include/storage/bufmgr.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/bufmgr.h,v 1.92 2005/03/19 23:27:10 tgl Exp $ + * $PostgreSQL: pgsql/src/include/storage/bufmgr.h,v 1.93 2005/03/20 22:00:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -132,8 +132,7 @@ extern void FlushBufferPool(void); extern BlockNumber BufferGetBlockNumber(Buffer buffer); extern BlockNumber RelationGetNumberOfBlocks(Relation relation); extern void RelationTruncate(Relation rel, BlockNumber nblocks); -extern void FlushRelationBuffers(Relation rel, BlockNumber firstDelBlock); -extern void DropRelationBuffers(Relation rel); +extern void FlushRelationBuffers(Relation rel); extern void DropRelFileNodeBuffers(RelFileNode rnode, bool istemp, BlockNumber firstDelBlock); extern void DropBuffers(Oid dbid); |
