summaryrefslogtreecommitdiff
path: root/src/backend/access/index/indexam.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/index/indexam.c')
-rw-r--r--src/backend/access/index/indexam.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c
index 23522ba740e..d905013a5fc 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.97 2007/01/05 22:19:23 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/index/indexam.c,v 1.98 2007/05/27 03:50:38 tgl Exp $
*
* INTERFACE ROUTINES
* index_open - open an index relation by relation OID
@@ -145,8 +145,6 @@ index_open(Oid relationId, LOCKMODE lockmode)
errmsg("\"%s\" is not an index",
RelationGetRelationName(r))));
- pgstat_initstats(&r->pgstat_info, r);
-
return r;
}
@@ -433,14 +431,14 @@ index_getnext(IndexScanDesc scan, ScanDirection direction)
return NULL; /* failure exit */
}
- pgstat_count_index_tuples(&scan->xs_pgstat_info, 1);
+ pgstat_count_index_tuples(scan->indexRelation, 1);
/*
* Fetch the heap tuple and see if it matches the snapshot.
*/
if (heap_release_fetch(scan->heapRelation, scan->xs_snapshot,
heapTuple, &scan->xs_cbuf, true,
- &scan->xs_pgstat_info))
+ scan->indexRelation))
break;
/* Skip if no undeleted tuple at this location */
@@ -502,7 +500,7 @@ index_getnext_indexitem(IndexScanDesc scan,
Int32GetDatum(direction)));
if (found)
- pgstat_count_index_tuples(&scan->xs_pgstat_info, 1);
+ pgstat_count_index_tuples(scan->indexRelation, 1);
return found;
}
@@ -543,7 +541,7 @@ index_getmulti(IndexScanDesc scan,
Int32GetDatum(max_tids),
PointerGetDatum(returned_tids)));
- pgstat_count_index_tuples(&scan->xs_pgstat_info, *returned_tids);
+ pgstat_count_index_tuples(scan->indexRelation, *returned_tids);
return found;
}