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 <[email protected]> Reviewed-By: Andres Freund <[email protected]> Discussion: https://postgr.es/m/CAH2-Wz=g=jtsydb4utb5su2zcvss7vbp+zmvvag6abocb+s...@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(-)
