| From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
|---|---|
| To: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> |
| Cc: | Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Report bytes and transactions actually sent downtream |
| Date: | 2026-03-17 06:42:27 |
| Message-ID: | CAA4eK1KoOGfvbrX73z_wo8oGHx5Yb9KDJABr=J4cRUay2Vdezw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Mar 17, 2026 at 11:32 AM Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
>
> On Tue, Mar 17, 2026 at 10:15 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | vignesh C | 2026-03-17 06:53:45 | Re: Skipping schema changes in publication |
| Previous Message | Zsolt Parragi | 2026-03-17 06:41:25 | Re: Make PGOAUTHCAFILE in libpq-oauth work out of debug mode |