mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
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.
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user