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

From: Lukas Fittl <lukas(at)fittl(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tomas Vondra <tomas(at)vondra(dot)me>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Smith <smithpb2250(at)gmail(dot)com>
Subject: Re: Stack-based tracking of per-node WAL/buffer usage
Date: 2026-03-27 07:21:23
Message-ID: CAP53Pky2=31B1AS9vg=Ca9308_hb0H4g968cSKxiFgT0moJfYg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 25, 2026 at 5:41 PM Lukas Fittl <lukas(at)fittl(dot)com> wrote:
> On Wed, Mar 25, 2026 at 3:47 AM Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> > This patch could use an overview README file, I'm struggling to
> > understand how the this all works. Here's my understanding so far,
> > please correct me if I'm wrong:
>
> Sure, happy to put this together - I wonder where would place that
> best - probably src/backend/executor/README.instrument ?

I've gone ahead and added that in
src/backend/executor/README.instrument for now, trying to take some of
your prior email as inspiration, whilst not fully committing to
describing it as a tree - but happy to revise that if we feel its
important for clarity.

See attached v11, rebased after the pgBufferUsage calls were moved in
df09452c3209, and also fixing the issues that Zsolt noted in a
previous email reviewing v10.

I've also moved pg_session_buffer_usage to be a
test_session_buffer_usage module instead, since its not intended as a
user accessible module. If we wanted to commit that (not sure if its
worth the cycles), we could potentially merge it with the 0004 commit
that expands the main regression tests.

Thanks,
Lukas

--
Lukas Fittl

Attachment Content-Type Size
v11-0001-instrumentation-Separate-trigger-logic-from-othe.patch application/octet-stream 10.1 KB
v11-0003-instrumentation-Replace-direct-changes-of-pgBuff.patch application/octet-stream 9.0 KB
v11-0002-instrumentation-Separate-per-node-logic-from-oth.patch application/octet-stream 27.1 KB
v11-0004-instrumentation-Add-additional-regression-tests-.patch application/octet-stream 23.5 KB
v11-0005-Optimize-measuring-WAL-buffer-usage-through-stac.patch application/octet-stream 96.5 KB
v11-0009-Add-test_session_buffer_usage-test-module.patch application/octet-stream 30.0 KB
v11-0006-instrumentation-Use-Instrumentation-struct-for-p.patch application/octet-stream 29.2 KB
v11-0007-instrumentation-Optimize-ExecProcNodeInstr-instr.patch application/octet-stream 11.2 KB
v11-0008-Index-scans-Show-table-buffer-accesses-separatel.patch application/octet-stream 22.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Yugo Nagata 2026-03-27 07:35:49 Re: Track skipped tables during autovacuum and autoanalyze
Previous Message Lukas Fittl 2026-03-27 07:19:01 Re: Refactor query normalization into core query jumbling