Re: Report bytes and transactions actually sent downtream

From: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, 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-12 12:43:33
Message-ID: CAE9k0P=z1oGGuMCQmDceBktbyW=5VhfuB0=K1R5zCtM_5QkZ9w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Michael,

On Fri, Feb 13, 2026 at 6:28 PM Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
>
> On Fri, Feb 13, 2026 at 10:47 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> >
> > On Tue, Feb 10, 2026 at 09:10:45PM +0530, Ashutosh Bapat wrote:
> > > It might be better to just use the phrase "This number ..." since the
> > > earlier sentence mentions it as "number". I have made that change in
> > > my repository. Will send it with the next version of patchset.
> >
> > I have studied this thread, and can get behind the idea of adding the
> > number of bytes sent to the output plugin at this level.
> >
> > However, I think that patch 0001 should be split into two parts,
> > because it is doing two separate things, not one:
> > - One patch for the rename of the existing fields total_txns and
> > total_bytes to respectively total_wal_txns and total_wal_bytes, so as
> > it becomes possible to make the distinction between the stats data
> > coming from WAL. (The suggested rename was a bit confusing for me
> > first, FWIW, when I read total_wal_bytes, my mind understood that as a
> > total number of WAL generated, even if I get that that it comes from
> > an amount of WAL data processed when decoding transactions. Not an
> > objection, just a feeling).
> > - A second patch to introduce the new field for the number of bytes
> > sent to the output plugin.
> >
>
> I am open to other suggestions. Since the bytes in total_bytes and
> sent_bytes refer to different set of bytes, it was thought to be
> better to rename total_bytes and hence total_txns. But then
> stream_bytes, spill_bytes too come from WAL and they are not renamed
> right now. So there's already some awkwardness. I also see that wal in
> the name can be confusing. I thought of using "reordered" instead of
> "wal" but reorder buffer is an internal concept. If we change the
> reorder buffer mechanism tomorrow, we will need to change the name of
> the field. So we discarded that. I am wondering whether we should just
> leave the name as is and rely on documentation to clarify the
> difference. What do you think?
>

Could you please share your thoughts on this? Your inputs would help
us determine the next steps - whether we should proceed with renaming,
and if so, what names you would suggest, or whether we should leave
things as they are.

--
With Regards,
Ashutosh Sharma.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2026-03-12 12:54:52 Re: Fix uninitialized xl_running_xacts padding
Previous Message Ashutosh Sharma 2026-03-12 12:36:48 Re: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication