pgsql: Move EXPLAIN counter increment to heapam_scan_bitmap_next_block

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Move EXPLAIN counter increment to heapam_scan_bitmap_next_block
Date: 2024-10-25 14:22:10
Message-ID: E1t4LCc-002OdR-Fw@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2024-10-25 16:20:01 pgsql: Read extension script files in text not binary mode.
Previous Message Noah Misch 2024-10-25 13:51:48 pgsql: For inplace update, send nontransactional invalidations.