diff --git a/src/backend/access/gist/gistvacuum.c b/src/backend/access/gist/gistvacuum.c
index 10bd6cb4dc16443eab32bb12fd0ac64337383f3f..afd743a5a2642c4841300de9084050e612c13634 100644
--- a/src/backend/access/gist/gistvacuum.c
+++ b/src/backend/access/gist/gistvacuum.c
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *	  $PostgreSQL: pgsql/src/backend/access/gist/gistvacuum.c,v 1.12 2006/02/11 16:59:08 momjian Exp $
+ *	  $PostgreSQL: pgsql/src/backend/access/gist/gistvacuum.c,v 1.13 2006/02/11 17:14:08 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -125,7 +125,7 @@ gistVacuumUpdate(GistVacuum *gv, BlockNumber blkno, bool needunion)
 					if (chldtuple.ituplen > 1)
 					{
 						/*
-						 * child was split, so we need mark completion
+						 * child was splitted, so we need mark completion
 						 * insert(split)
 						 */
 						int			j;
@@ -329,9 +329,9 @@ gistVacuumUpdate(GistVacuum *gv, BlockNumber blkno, bool needunion)
 }
 
 /*
- * For usual vacuum just update FSM, for full vacuum
+ * For usial vacuum just update FSM, for full vacuum
  * reforms parent tuples if some of childs was deleted or changed,
- * update invalid tuples (they can exist from last crash recovery only),
+ * update invalid tuples (they can exsist from last crash recovery only),
  * tries to get smaller index
  */
 
@@ -505,15 +505,10 @@ gistbulkdelete(PG_FUNCTION_ARGS)
 			   *ptr;
 	bool		needLock;
 
-    if (callback_state)
-    {
-    	stack = (GistBDItem *) palloc0(sizeof(GistBDItem));
+	stack = (GistBDItem *) palloc0(sizeof(GistBDItem));
 
-	   stack->blkno = GIST_ROOT_BLKNO;
-	   needFullVacuum = false;
-    }
-    else
-        stack = NULL;
+	stack->blkno = GIST_ROOT_BLKNO;
+	needFullVacuum = false;
 
 	while (stack)
 	{
diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c
index 548901a9be465057e5a04a2308ecea13adc5b583..cb82a38d901793542c82ea9379c70ab9b66cf59e 100644
--- a/src/backend/access/hash/hash.c
+++ b/src/backend/access/hash/hash.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  $PostgreSQL: pgsql/src/backend/access/hash/hash.c,v 1.84 2006/02/11 16:59:09 momjian Exp $
+ *	  $PostgreSQL: pgsql/src/backend/access/hash/hash.c,v 1.85 2006/02/11 17:14:08 momjian Exp $
  *
  * NOTES
  *	  This file contains only the public interface routines.
@@ -496,17 +496,6 @@ hashbulkdelete(PG_FUNCTION_ARGS)
 	tuples_removed = 0;
 	num_index_tuples = 0;
 
-	/* return statistics */
-	num_pages = RelationGetNumberOfBlocks(rel);
-
-	result = (IndexBulkDeleteResult *) palloc0(sizeof(IndexBulkDeleteResult));
-	result->num_pages = num_pages;
-
-    if (!callback_state)
-    {
-        	PG_RETURN_POINTER(result);
-    }
-
 	/*
 	 * Read the metapage to fetch original bucket and tuple counts.  Also, we
 	 * keep a copy of the last-seen metapage so that we can use its
@@ -655,6 +644,11 @@ loop_top:
 
 	_hash_wrtbuf(rel, metabuf);
 
+	/* return statistics */
+	num_pages = RelationGetNumberOfBlocks(rel);
+
+	result = (IndexBulkDeleteResult *) palloc0(sizeof(IndexBulkDeleteResult));
+	result->num_pages = num_pages;
 	result->num_index_tuples = num_index_tuples;
 	result->tuples_removed = tuples_removed;
 
diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c
index 0365ae7942403923ccdc7860f268257633df470f..6a681192cafbb0cdca6fd18cf8afc8aa2707546e 100644
--- a/src/backend/access/index/indexam.c
+++ b/src/backend/access/index/indexam.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  $PostgreSQL: pgsql/src/backend/access/index/indexam.c,v 1.88 2006/02/11 16:59:09 momjian Exp $
+ *	  $PostgreSQL: pgsql/src/backend/access/index/indexam.c,v 1.89 2006/02/11 17:14:08 momjian Exp $
  *
  * INTERFACE ROUTINES
  *		index_open		- open an index relation by relation OID
@@ -685,11 +685,6 @@ index_getmulti(IndexScanDesc scan,
  *		callback routine tells whether a given main-heap tuple is
  *		to be deleted
  *
- *      passing NULL callback_state can be interpreted by the 
- *      index access method as meaning that the index does not need
- *      to be scanned in logical sequence to remove rows for this call
- *      index_vacuum_cleanup is always required after this, however.
- * 
  *		return value is an optional palloc'd struct of statistics
  * ----------------
  */
diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c
index e757c4adad10f20c8d89cfd21db5cee89cadf169..4fb70302d7aaf67337e5abddc2a7da60e4ea47e2 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.137 2006/02/11 16:59:09 momjian Exp $
+ *	  $PostgreSQL: pgsql/src/backend/access/nbtree/nbtree.c,v 1.138 2006/02/11 17:14:08 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -543,9 +543,8 @@ btbulkdelete(PG_FUNCTION_ARGS)
 	double		num_index_tuples;
 	OffsetNumber deletable[MaxOffsetNumber];
 	int			ndeletable;
-	Buffer		buf = NULL;
+	Buffer		buf;
 	BlockNumber num_pages;
-    bool        scanindex = true;
 
 	tuples_removed = 0;
 	num_index_tuples = 0;
@@ -566,15 +565,8 @@ btbulkdelete(PG_FUNCTION_ARGS)
 	 * skip obtaining exclusive lock on empty pages though, since no indexscan
 	 * could be stopped on those.
 	 */
-    if (callback_state)
-    {
-    	buf = _bt_get_endpoint(rel, 0, false);
-        scanindex = BufferIsValid(buf); /* check for empty index */
-    }
-    else
-        scanindex = false;
-
-	if (scanindex)	
+	buf = _bt_get_endpoint(rel, 0, false);
+	if (BufferIsValid(buf))		/* check for empty index */
 	{
 		for (;;)
 		{
@@ -657,10 +649,7 @@ btbulkdelete(PG_FUNCTION_ARGS)
 
 	result = (IndexBulkDeleteResult *) palloc0(sizeof(IndexBulkDeleteResult));
 	result->num_pages = num_pages;
-    if (scanindex)
-    	result->num_index_tuples = num_index_tuples;
-    else
-        result->num_index_tuples = -1;
+	result->num_index_tuples = num_index_tuples;
 	result->tuples_removed = tuples_removed;
 
 	PG_RETURN_POINTER(result);
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index 4e7775a6cda052764e68f46c35f914f8dfdde276..d60c433095d1147142c96dfd42490296de656b17 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -13,7 +13,7 @@
  *
  *
  * IDENTIFICATION
- *	  $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.322 2006/02/11 16:59:09 momjian Exp $
+ *	  $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.323 2006/02/11 17:14:09 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -719,8 +719,7 @@ vac_update_relstats(Oid relid, BlockNumber num_pages, double num_tuples,
 	/* overwrite the existing statistics in the tuple */
 	pgcform = (Form_pg_class) GETSTRUCT(&rtup);
 	pgcform->relpages = (int32) num_pages;
-    if (num_tuples >= 0 )
-    	pgcform->reltuples = (float4) num_tuples;
+	pgcform->reltuples = (float4) num_tuples;
 	pgcform->relhasindex = hasindex;
 
 	/*
@@ -2962,18 +2961,15 @@ scan_index(Relation indrel, double num_tuples)
 	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, num_tuples,
+						stats->num_pages, stats->num_index_tuples,
 						false);
 
 	ereport(elevel,
 			(errmsg("index \"%s\" now contains %.0f row versions in %u pages",
 					RelationGetRelationName(indrel),
-					num_tuples,
+					stats->num_index_tuples,
 					stats->num_pages),
 	errdetail("%u index pages have been deleted, %u are currently reusable.\n"
 			  "%s.",
diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index 0b2789da48515fdb72ed1032dfe009cb3704a520..a65c269fc8c8849b6b76e172f1da0d2075a73abc 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.",
diff --git a/src/include/access/genam.h b/src/include/access/genam.h
index ef9ca2146b9734b84b5cbf123fc83d32234d5d25..859c4e53b2943e108efd3f93a2bd414ace8b0ba6 100644
--- a/src/include/access/genam.h
+++ b/src/include/access/genam.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/access/genam.h,v 1.55 2006/02/11 16:59:09 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/genam.h,v 1.56 2006/02/11 17:14:09 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -38,8 +38,6 @@ typedef struct IndexBulkDeleteResult
 	BlockNumber num_pages;		/* pages remaining in index */
 	BlockNumber pages_removed;	/* # removed by bulk-delete operation */
 	double		num_index_tuples;		/* tuples remaining */
-                                /* should set to -1 if index not scanned */
-                                /*   because no records to delete        */
 	double		tuples_removed; /* # removed by bulk-delete operation */
 	BlockNumber pages_deleted;	/* # unused pages in index */
 	BlockNumber pages_free;		/* # pages available for reuse */