Make IndexScanInstrumentation a pointer in executor scan nodes.
Peter Geoghegan <pg@bowt.ie>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/explain.c | modified | +3 −3 |
| src/backend/executor/nodeBitmapIndexscan.c | modified | +6 −2 |
| src/backend/executor/nodeIndexonlyscan.c | modified | +8 −4 |
| src/backend/executor/nodeIndexscan.c | modified | +9 −5 |
| src/include/nodes/execnodes.h | modified | +3 −3 |
Discussion
- index prefetching 492 messages · 2023-06-08 → 2026-07-07