Re: Stack-based tracking of per-node WAL/buffer usage
Lukas Fittl <lukas@fittl.com>
From: Lukas Fittl <lukas@fittl.com>
To: Peter Smith <smithpb2250@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-01-15T22:34:04Z
Lists: pgsql-hackers
On Thu, Jan 15, 2026 at 2:06 PM Peter Smith <smithpb2250@gmail.com> wrote: > I happened to be reading the code in this recent push [1] and saw this > new macro: > > +#define INSTR_TIME_LT(x,y) \ > + ((x).ticks > (y).ticks) > > Is that macro name OK? It seemed backwards to me. Shouldn't it be > called INSTR_TIME_GT because it is checking that x is "Greater Than" > y? Oh yeah, good catch. I think I must have thought of "larger than" instead of "less than". I think adjusting that to INSTR_TIME_GT makes sense, and is consistent with how "lt" and "gt" is used elsewhere in the source. Thanks, Lukas -- Lukas Fittl
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
instrumentation: Allocate query level instrumentation in ExecutorStart
- 2c16deee2f7d 19 (unreleased) landed
-
instrumentation: Move ExecProcNodeInstr to allow inlining
- 544000288ec8 19 (unreleased) landed
-
instrumentation: Separate per-node logic from other uses
- 5a79e78501f4 19 (unreleased) landed
-
instrumentation: Separate trigger logic from other uses
- 7d9b74df53e9 19 (unreleased) landed
-
instrumentation: Rename INSTR_TIME_LT macro to INSTR_TIME_GT
- 3218825271bd 19 (unreleased) landed
-
instrumentation: Keep time fields as instrtime, convert in callers
- e5a5e0a90750 19 (unreleased) landed