diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-10-06 02:29:23 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-10-06 02:29:23 +0000 |
commit | cb8b6618cefa1f87197390ae12709b46f5137a35 (patch) | |
tree | 6180b2eed06fe60c41ef34e88e672743b0fdb046 /src/backend/access/gist/gistget.c | |
parent | b5aad11a1b253bbd45405dc926f1ebef90f8f28c (diff) | |
download | postgresql-cb8b6618cefa1f87197390ae12709b46f5137a35.tar.gz postgresql-cb8b6618cefa1f87197390ae12709b46f5137a35.zip |
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.
Diffstat (limited to 'src/backend/access/gist/gistget.c')
-rw-r--r-- | src/backend/access/gist/gistget.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) { |