instrumentation: Move ExecProcNodeInstr to allow inlining
Andres Freund <andres@anarazel.de>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/execProcnode.c | modified | +0 −20 |
| src/backend/executor/instrument.c | modified | +31 −6 |
| src/include/executor/executor.h | modified | +7 −0 |
Discussion
- Stack-based tracking of per-node WAL/buffer usage 48 messages · 2025-08-31 → 2026-04-08