]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Count contrib/bloom index scans in pgstat view.
authorPeter Geoghegan <pg@bowt.ie>
Wed, 13 Nov 2024 01:57:37 +0000 (20:57 -0500)
committerPeter Geoghegan <pg@bowt.ie>
Wed, 13 Nov 2024 01:57:37 +0000 (20:57 -0500)
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 <ikedamsh@oss.nttdata.com>
Reviewed-By: Peter Geoghegan <pg@bowt.ie>
Discussion: https://postgr.es/m/c48839d881388ee401a01807c686004d@oss.nttdata.com
Backpatch: 13- (all supported branches).

contrib/bloom/blscan.c

index 6ae3710d9f7857225030915e06e9b76948171c78..6b65502778d8ceb82b39580c771d3ef8806fb543 100644 (file)
@@ -121,6 +121,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++)
        {