| From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
|---|---|
| To: | Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, 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-16 11:54:41 |
| Message-ID: | CAA4eK1LxKLPh_m-PRh44Br1NMd0vEua9O-R0O+gW7Wj25Zkarg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Mar 16, 2026 at 4:40 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Mon, Mar 16, 2026 at 1:21 PM Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)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.
>
I think the other one to consider in the same category is the
PqMsg_CopyDone message.
--
With Regards,
Amit Kapila.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alena Rybakina | 2026-03-16 12:07:24 | Re: Vacuum statistics |
| Previous Message | Ranier Vilela | 2026-03-16 11:45:49 | Avoid resource leak (contrib/postgres_fdw/connection.c) |