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

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Tomas Vondra <tomas(at)vondra(dot)me>
Cc: Lukas Fittl <lukas(at)fittl(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Peter Smith <smithpb2250(at)gmail(dot)com>
Subject: Re: Stack-based tracking of per-node WAL/buffer usage
Date: 2026-03-17 06:21:18
Message-ID: CAN4CZFOdYhRfecTJjJZCwHtS-gzpSJ16YLQ7Wh0bXrg0=8keOw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

+ TriggerInstrumentation *ti = rInfo->ri_TrigInstrument;
+
+ if (ti && (ti->instr.need_bufusage || ti->instr.need_walusage))
+ InstrAccum(instr_stack.current, &ti->instr);

I think there's one more bug here, isn't ti an array? This seems to
only process the first entry, not all of them.

+InstrPopStackTo(Instrumentation *prev)
+{
+ Assert(instr_stack.stack_size > 0);
+ instr_stack.stack_size--;
+ instr_stack.current = prev;
+}
+

Shouldn't this have the same additional assertion as InstrPopStack?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2026-03-17 06:22:53 Re: Serverside SNI support in libpq
Previous Message Chao Li 2026-03-17 06:18:37 Re: Improve OAuth discovery logging