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

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Lukas Fittl <lukas(at)fittl(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Stack-based tracking of per-node WAL/buffer usage
Date: 2026-01-15 22:05:44
Message-ID: CAHut+Put94CTpjQsqOJHdHkgJ2ZXq+qVSfMEcmDKLiWLW-hPfA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 10, 2026 at 6:38 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> Hi,
>
>
> On 2025-10-31 00:18:04 -0700, Lukas Fittl wrote:
> > Attached v4 patchset that addresses feedback (unless otherwise noted below)
> > and is rebased on master. Other changes:
> >
> > [...]
> > - Per our off-list conversation at PGConf.EU, added a patch (v4/0007) that
> > illustrates how the stack mechanism can be used to separate index and table
> > buffer accesses in the EXPLAIN for Index Scans
>
> Nice!
>
>
> I pushed 0001. The only changes I made were to break a few long lines.
>
>

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?

======
[1] https://github.com/postgres/postgres/commit/e5a5e0a90750d665cab417322b9f85c806430d85#diff-d927962e2574e803c27ea9a429eeecf7bc29c7a38c830ccb3a10e9e3da5ba357R187

Kind Regards.
Peter Smith.
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lukas Fittl 2026-01-15 22:34:04 Re: Stack-based tracking of per-node WAL/buffer usage
Previous Message Mihail Nikalayeu 2026-01-15 22:04:19 Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements