Re: Stack-based tracking of per-node WAL/buffer usage

Lukas Fittl <lukas@fittl.com>

From: Lukas Fittl <lukas@fittl.com>
To: Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Zsolt Parragi <zsolt.parragi@percona.com>, Tomas Vondra <tomas@vondra.me>, Peter Smith <smithpb2250@gmail.com>, Heikki Linnakangas <hlinnaka@iki.fi>
Date: 2026-04-04T09:43:50Z
Lists: pgsql-hackers

Attachments

Hi,

Attached v12, rebased, otherwise no changes.

I realize time to freeze is getting close, and whilst I'd love to see
this go in, I'm also realistic - so I'll just do my best to support
review in the off chance we can make it for this release.

On that note, I think 0001 and 0002 are independently useful
refactorings to split the different kinds of instrumentation that
should be ready to go, and I don't think should conflict much with
other patches in this commitfest.

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 →
  1. instrumentation: Allocate query level instrumentation in ExecutorStart

  2. instrumentation: Move ExecProcNodeInstr to allow inlining

  3. instrumentation: Separate per-node logic from other uses

  4. instrumentation: Separate trigger logic from other uses

  5. instrumentation: Rename INSTR_TIME_LT macro to INSTR_TIME_GT

  6. instrumentation: Keep time fields as instrtime, convert in callers