aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-03-20 22:00:54 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-03-20 22:00:54 +0000
commit354049c709c9d7d0918272e10e4f30d7f8f38788 (patch)
tree741c359a1e6494c3ef1b205b84603fd48239b015 /src/backend/access
parent683f60da3d837236de5c4249fa2a62c8a94616ca (diff)
downloadpostgresql-354049c709c9d7d0918272e10e4f30d7f8f38788.tar.gz
postgresql-354049c709c9d7d0918272e10e4f30d7f8f38788.zip
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/backend/access')
-rw-r--r--src/backend/access/nbtree/nbtree.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c
index ba31abcbbfd..8f6fe7d27cc 100644
--- a/src/backend/access/nbtree/nbtree.c
+++ b/src/backend/access/nbtree/nbtree.c
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtree.c,v 1.124 2004/12/31 21:59:22 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtree.c,v 1.125 2005/03/20 22:00:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -772,17 +772,6 @@ btvacuumcleanup(PG_FUNCTION_ARGS)
{
/*
* Okay to truncate.
- *
- * First, flush any shared buffers for the blocks we intend to
- * delete. FlushRelationBuffers is a bit more than we need
- * for this, since it will also write out dirty buffers for
- * blocks we aren't deleting, but it's the closest thing in
- * bufmgr's API.
- */
- FlushRelationBuffers(rel, new_pages);
-
- /*
- * Do the physical truncation.
*/
RelationTruncate(rel, new_pages);