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

From Amit Kapila
Subject Re: Report bytes and transactions actually sent downtream
Date
Msg-id CAA4eK1LBKxMarniqFo31UOfeLkZv8EMkxENaWnpBZXBAsm3VtQ@mail.gmail.com
Whole thread Raw
In response to Re: Report bytes and transactions actually sent downtream  (Ashutosh Sharma <ashu.coek88@gmail.com>)
Responses Re: Report bytes and transactions actually sent downtream
Re: Report bytes and transactions actually sent downtream
List pgsql-hackers
On Mon, Mar 16, 2026 at 1:21 PM Ashutosh Sharma <ashu.coek88@gmail.com> wrote:
>
> 1) v20260316-0001-Report-downstream-sent-bytes-in-pg_stat_replication_.patch:
>
> This patch introduces sent_bytes to report the amount of data sent
> downstream. It documents sent_bytes in a way that it clarifies how
> sent_bytes differs from total_bytes, without modifying the existing
> documentation for total_bytes or total_txns. The patch is purely
> additive and does not alter any existing documentation.
>

*
+        <structfield>sent_bytes</structfield><type>bigint</type>
+       </para>
+       <para>
+        Amount of transaction changes sent downstream for this slot by the
+        output plugin after applying output plugin filters, if any, and
+        converting it into the output plugin format.

BTW, this also contains changes from pgoutput_message() which could be
non-transactional. So, saying transaction changes may not be
appropriate.

* We also send keep_alive kind of messages via wal_sender, those are
not counted in sent_bytes. If we don't want to include those then does
that need a mention?

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pg_upgrade fails when extension_control_path is used
Next
From: Bertrand Drouvot
Date:
Subject: Re: PGPROC alignment (was Re: pgsql: Separate RecoveryConflictReasons from procsignals)