From 77bb65d3fcdd2b588cec4b94af05e3d3f30e80cc Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 11 Feb 2006 17:14:09 +0000 Subject: Revert based on Tom's recommendation: > Allow VACUUM to complete faster by avoiding scanning the indexes when no > rows were removed from the heap by the VACUUM. --- src/backend/commands/vacuumlazy.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/backend/commands/vacuumlazy.c') diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index 0b2789da485..a65c269fc8c 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -31,7 +31,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.64 2006/02/11 16:59:09 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.65 2006/02/11 17:14:09 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -639,19 +639,16 @@ lazy_scan_index(Relation indrel, LVRelStats *vacrelstats) if (!stats) return; - /* now update statistics in pg_class - * we use the number of tuples from the table because we have not - * actually scanned the index, so don't know the number of tuples in index - */ + /* now update statistics in pg_class */ vac_update_relstats(RelationGetRelid(indrel), stats->num_pages, - vacrelstats->rel_tuples, + stats->num_index_tuples, false); ereport(elevel, (errmsg("index \"%s\" now contains %.0f row versions in %u pages", RelationGetRelationName(indrel), - vacrelstats->rel_tuples, + stats->num_index_tuples, stats->num_pages), errdetail("%u index pages have been deleted, %u are currently reusable.\n" "%s.", -- cgit v1.2.3