On Tue, Mar 17, 2026 at 11:32 AM Ashutosh Bapat
<[email protected]> wrote:
>
> On Tue, Mar 17, 2026 at 10:15 AM Amit Kapila <[email protected]> wrote:
> > >
> > > Observation: I do not see UpdateDecodingStats() being triggered for
> > > this non-transactional message.
> > >
> >
> > I think that is probably a bug. I see that ReorderBufferQueueMessage()
> > queues messages for transactional messages and which would then
> > probably be sent later along with commit, so its data will be counted
> > by UpdateDecodingStats. But the question is shouldn't we consider the
> > data for non-transactional messages as well?
> >
>
> I am also replying to your earlier comment
>
> > BTW, this also contains changes from pgoutput_message() which could be
> > non-transactional. So, saying transaction changes may not be
> > appropriate.
> >
>
> We should consider the non-transactional messages as well in
> sent_bytes, since that amount of data is sent. Whether we can use the
> term "transaction changes" in the description of sent_bytes if we
> include non-transactional messages is questionable. I used
> "transactional changes" in the description of "sent_bytes" to be
> consistent with the description of total_bytes. Looks like you are
> suggesting that not accounting for non-transaction messages in
> total_bytes is a bug, if we fix that, are we going to fix the
> description of "total_bytes"?
>

Yes, we should do that.

> If yes, it makes sense to mention
> non-transactional messages separately in sent_bytes description. We
> can modify my previous suggestion as
>
> Amount of transaction changes and non-transactional messages sent
> downstream in the output plugin
>

Isn't it better to use something on the lines of what Michael is
proposing in his last email [1]?

[1] - https://www.postgresql.org/message-id/abiQe4fxR2fp317F%40paquier.xyz

-- 
With Regards,
Amit Kapila.


Reply via email to