diff options
author | Peter Geoghegan | 2024-11-13 01:57:45 +0000 |
---|---|---|
committer | Peter Geoghegan | 2024-11-13 01:57:45 +0000 |
commit | 93063e2e429b03e8b06295ede0f0ebb5199b656a (patch) | |
tree | a025196563249684d40757217c4c9eca123d79e7 | |
parent | bfeeb065ea2c870cf4d9dfcd552d23d72432e692 (diff) |
Count contrib/bloom index scans in pgstat view.
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 <[email protected]>
Reviewed-By: Peter Geoghegan <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Backpatch: 13- (all supported branches).
-rw-r--r-- | contrib/bloom/blscan.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/bloom/blscan.c b/contrib/bloom/blscan.c index bf455e579fe..0c5fb725e89 100644 --- a/contrib/bloom/blscan.c +++ b/contrib/bloom/blscan.c @@ -15,6 +15,7 @@ #include "access/relscan.h" #include "bloom.h" #include "miscadmin.h" +#include "pgstat.h" #include "storage/bufmgr.h" /* @@ -114,6 +115,7 @@ blgetbitmap(IndexScanDesc scan, TIDBitmap *tbm) */ bas = GetAccessStrategy(BAS_BULKREAD); npages = RelationGetNumberOfBlocks(scan->indexRelation); + pgstat_count_index_scan(scan->indexRelation); for (blkno = BLOOM_HEAD_BLKNO; blkno < npages; blkno++) { |