From cb8b6618cefa1f87197390ae12709b46f5137a35 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 6 Oct 2005 02:29:23 +0000 Subject: Revise pgstats stuff to fix the problems with not counting accesses generated by bitmap index scans. Along the way, simplify and speed up the code for counting sequential and index scans; it was both confusing and inefficient to be taking care of that in the per-tuple loops, IMHO. initdb forced because of internal changes in pg_stat view definitions. --- src/backend/access/gist/gistget.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/backend/access/gist/gistget.c') diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c index f63bc477ae7..5ae48bd66e3 100644 --- a/src/backend/access/gist/gistget.c +++ b/src/backend/access/gist/gistget.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/gist/gistget.c,v 1.51 2005/09/22 20:44:36 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/access/gist/gistget.c,v 1.52 2005/10/06 02:29:07 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -17,8 +17,10 @@ #include "access/itup.h" #include "access/gist_private.h" #include "executor/execdebug.h" +#include "pgstat.h" #include "utils/memutils.h" + static OffsetNumber gistfindnext(IndexScanDesc scan, OffsetNumber n, ScanDirection dir); static int gistnext(IndexScanDesc scan, ScanDirection dir, ItemPointer tids, int maxtids, bool ignore_killed_tuples); @@ -161,6 +163,8 @@ gistnext(IndexScanDesc scan, ScanDirection dir, ItemPointer tids, int maxtids, b stk->next = NULL; stk->block = GIST_ROOT_BLKNO; + + pgstat_count_index_scan(&scan->xs_pgstat_info); } else if (so->curbuf == InvalidBuffer) { -- cgit v1.2.3