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

From Zsolt Parragi
Subject Re: Stack-based tracking of per-node WAL/buffer usage
Date
Msg-id CAN4CZFOdYhRfecTJjJZCwHtS-gzpSJ16YLQ7Wh0bXrg0=8keOw@mail.gmail.com
Whole thread
In response to Re: Stack-based tracking of per-node WAL/buffer usage  (Tomas Vondra <tomas@vondra.me>)
Responses Re: Stack-based tracking of per-node WAL/buffer usage
List 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?



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Improve OAuth discovery logging
Next
From: Zsolt Parragi
Date:
Subject: Re: Serverside SNI support in libpq