pgsql: instrumentation: Move ExecProcNodeInstr to allow inlining

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: instrumentation: Move ExecProcNodeInstr to allow inlining
Date: 2026-04-08 02:12:57
Message-ID: E1wAIPY-003TvL-1o@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

instrumentation: Move ExecProcNodeInstr to allow inlining

This moves the implementation of ExecProcNodeInstr, the ExecProcNode variant
that gets used when instrumentation is on, to be defined in instrument.c
instead of execProcNode.c, and marks functions it uses as inline.

This allows compilers to generate an optimized implementation, and shows a 4
to 12% reduction in instrumentation overhead for queries that move lots of
rows.

Author: Lukas Fittl <lukas(at)fittl(dot)com>
Suggested-by: Andres Freund <andres(at)anarazel(dot)de>
Reviewed-by: Andres Freund <andres(at)anarazel(dot)de>
Discussion: https://postgr.es/m/CAP53PkzdBK8VJ1fS4AZ481LgMN8f9mJiC39ZRHqkFUSYq6KWmg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/544000288ec8f7dc6a1e0285821adc47324ecd33

Modified Files
--------------
src/backend/executor/execProcnode.c | 20 --------------------
src/backend/executor/instrument.c | 37 +++++++++++++++++++++++++++++++------
src/include/executor/executor.h | 7 +++++++
3 files changed, 38 insertions(+), 26 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2026-04-08 02:25:06 pgsql: Fix slotsync worker blocking promotion when stuck in wait
Previous Message Tomas Vondra 2026-04-07 21:25:30 pgsql: Add EXPLAIN (IO) instrumentation for TidRangeScan