mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +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,13 +8,14 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/hash/hashsearch.c,v 1.38 2004/12/31 21:59:13 pgsql Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/hash/hashsearch.c,v 1.39 2005/10/06 02:29:08 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include "postgres.h"
|
||||
|
||||
#include "access/hash.h"
|
||||
#include "pgstat.h"
|
||||
#include "storage/lmgr.h"
|
||||
|
||||
|
||||
@@ -130,6 +131,8 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
|
||||
ItemPointer current;
|
||||
OffsetNumber offnum;
|
||||
|
||||
pgstat_count_index_scan(&scan->xs_pgstat_info);
|
||||
|
||||
current = &(scan->currentItemData);
|
||||
ItemPointerSetInvalid(current);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user