Maintain the pg_stat_user_indexes.idx_scan pgstat counter during
contrib/Bloom index scans.
Oversight in commit
9ee014fc, which added the Bloom index contrib
module.
Author: Masahiro Ikeda
Reviewed-By: Peter Geoghegan
Discussion: https://postgr.es/m/c48839d881388ee401a01807c686004d@oss.nttdata.com
Backpatch: 13- (all supported branches).
#include "access/relscan.h"
#include "bloom.h"
#include "miscadmin.h"
+#include "pgstat.h"
#include "storage/bufmgr.h"
/*
*/
bas = GetAccessStrategy(BAS_BULKREAD);
npages = RelationGetNumberOfBlocks(scan->indexRelation);
+ pgstat_count_index_scan(scan->indexRelation);
for (blkno = BLOOM_HEAD_BLKNO; blkno < npages; blkno++)
{