agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: instrumentation: Move ExecProcNodeInstr to allow inlining
Date: Wed, 08 Apr 2026 02:12:57 +0000
Message-ID: <E1wAIPY-003TvL-1o@gemulon.postgresql.org> (raw)

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@fittl.com>
Suggested-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Andres Freund <andres@anarazel.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(-)



Message-ID: <E1wAIPY-003TvL-1o@gemulon.postgresql.org>
Permalink:  ../E1wAIPY-003TvL-1o@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wAIPY-003TvL-1o@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: andres@anarazel.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: instrumentation: Move ExecProcNodeInstr to allow inlining
  In-Reply-To: <E1wAIPY-003TvL-1o@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox