pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make IndexScanInstrumentation a pointer in executor scan nodes.
Date: Sun, 22 Mar 2026 17:20:51 +0000
Message-ID: <E1w4MTq-000xr2-2i@gemulon.postgresql.org> (raw)

Make IndexScanInstrumentation a pointer in executor scan nodes.

Change the IndexScanInstrumentation fields in IndexScanState,
IndexOnlyScanState, and BitmapIndexScanState from inline structs to
pointers.  This avoids additional space overhead whenever new fields are
added to IndexScanInstrumentation in the future, at least in the common
case where the instrumentation isn't used (i.e. when the executor node
isn't being run through an EXPLAIN ANALYZE).

Preparation for an upcoming patch series that will add index
prefetching.  The new slot-based interface that will enable index
prefetching necessitates that we add at least one more field to
IndexScanInstrumentation (to count heap fetches during index-only
scans).

Author: Peter Geoghegan <pg@bowt.ie>
Reviewed-By: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CAH2-Wz=g=JTSyDB4UtB5su2ZcvsS7VbP+ZMvvaG6ABoCb+s8Lw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f026fbf059f2d9d7c8f1f52e9210018d38d795d8

Modified Files
--------------
src/backend/commands/explain.c             |  6 +++---
src/backend/executor/nodeBitmapIndexscan.c |  8 ++++++--
src/backend/executor/nodeIndexonlyscan.c   | 12 ++++++++----
src/backend/executor/nodeIndexscan.c       | 14 +++++++++-----
src/include/nodes/execnodes.h              |  6 +++---
5 files changed, 29 insertions(+), 17 deletions(-)



Message-ID: <E1w4MTq-000xr2-2i@gemulon.postgresql.org>
Permalink:  ../E1w4MTq-000xr2-2i@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w4MTq-000xr2-2i@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: pg@bowt.ie, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Make IndexScanInstrumentation a pointer in executor scan nodes.
  In-Reply-To: <E1w4MTq-000xr2-2i@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox