Re: Report bytes and transactions actually sent downtream - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Report bytes and transactions actually sent downtream
Date
Msg-id aY6z8Xk2GfJ4f5pY@paquier.xyz
Whole thread Raw
In response to Re: Report bytes and transactions actually sent downtream  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
Responses Re: Report bytes and transactions actually sent downtream
List pgsql-hackers
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 also questioning why you did not make the choice of renaming
totalBytes and totalTxns in ReorderBuffer.  On consistency ground, at
least, that seems relevant to me as these two numbers are the source
data fed to pgstats.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Andreas Karlsson
Date:
Subject: Re: add warning upon successful md5 password auth
Next
From: Peter Smith
Date:
Subject: Re: [PATCH] Support automatic sequence replication