Re: Stack-based tracking of per-node WAL/buffer usage - Mailing list pgsql-hackers

From Lukas Fittl
Subject Re: Stack-based tracking of per-node WAL/buffer usage
Date
Msg-id CAP53PkyOvXC7pWAiamvWth_JNeb=isrxX+PJT0pw_Hw5Czzf+Q@mail.gmail.com
Whole thread Raw
In response to Re: Stack-based tracking of per-node WAL/buffer usage  (Peter Smith <smithpb2250@gmail.com>)
List 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



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Stack-based tracking of per-node WAL/buffer usage
Next
From: surya poondla
Date:
Subject: Re: [PATCH] tests: verify renamed index functionality in alter_table