Thread: pgsql: Move EXPLAIN counter increment to heapam_scan_bitmap_next_block

pgsql: Move EXPLAIN counter increment to heapam_scan_bitmap_next_block

From
Melanie Plageman
Date:
Move EXPLAIN counter increment to heapam_scan_bitmap_next_block

Increment the lossy and exact page counters for EXPLAIN of bitmap heap
scans in heapam_scan_bitmap_next_block(). Note that other table AMs will
need to do this as well

Pushing the counters into heapam_scan_bitmap_next_block() is required to
be able to use the read stream API for bitmap heap scans. The bitmap
iterator must be advanced from inside the read stream callback, so
TBMIterateResults cannot be used as a flow control mechanism in
BitmapHeapNext().

Author: Melanie Plageman
Reviewed-by: Tomas Vondra, Heikki Linnakangas
Discussion: https://postgr.es/m/063e4eb4-32d9-439e-a0b1-75565a9835a8%40iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7bd7aa4d30676de006636bb2c9c079c363d9d56c

Modified Files
--------------
src/backend/access/heap/heapam_handler.c  |  8 +++++++-
src/backend/executor/nodeBitmapHeapscan.c | 13 +++----------
src/include/access/tableam.h              | 20 +++++++++++++++++---
3 files changed, 27 insertions(+), 14 deletions(-)