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

From: Tomas Vondra <tomas(at)vondra(dot)me>
To: Lukas Fittl <lukas(at)fittl(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>
Subject: Re: Stack-based tracking of per-node WAL/buffer usage
Date: 2026-03-16 23:50:40
Message-ID: 06086cb4-881b-4f5a-96af-f275220ff52d@vondra.me
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/14/26 21:49, Lukas Fittl wrote:
> ...
>
> Implemented this fix in IndexNext, and also expanded the tracking of
> table access to IndexNextWithReorder.
>
> Regarding Index-Only Scans, I did not add instrumentation for table
> access yet - I might add that in a follow-up revision or we could also
> do it in a follow-on patch.
>

I think we should, and it probably should be done in the same commit as
for plain index scans. Mostly for consistency / less confusion.

Every now and then there's an index-only scan that has to do a lot of
heap fetches, possibly just as many as the plain index scan. But the IOS
version would not say how many buffer accesses are for table, and users
might assume an index-only scan does not access table. Confusing.

I only started to look at the patch today, so I don't have any real
review comments. But I noticed the pg_session_buffer_usage is added only
to the contrib/meson.build and not to the Makefile. I assume that's not
intentional.

regards

--
Tomas Vondra

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2026-03-16 23:58:33 Re: Skipping schema changes in publication
Previous Message Sami Imseih 2026-03-16 23:42:44 Re: Flush some statistics within running transactions