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

Поиск
Список
Период
Сортировка
От Lukas Fittl
Тема Re: Stack-based tracking of per-node WAL/buffer usage
Дата
Msg-id CAP53PkyOvXC7pWAiamvWth_JNeb=isrxX+PJT0pw_Hw5Czzf+Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Stack-based tracking of per-node WAL/buffer usage  (Peter Smith <smithpb2250@gmail.com>)
Список 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 по дате отправления: