Re: Report bytes and transactions actually sent downtream

From: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>
Cc: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Subject: Re: Report bytes and transactions actually sent downtream
Date: 2026-01-12 05:11:13
Message-ID: CAExHW5v3UHyJ_vgxcBmCEO1U5PFsrYZ3EXGPF0Fo37twOLpdSg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Amit and Andres,

On Thu, Dec 11, 2025 at 10:29 AM Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
>
> Sorry for the delayed response. PFA the patch implementing the idea
> discussed above. It relies on the output plugin callback to return
> correct boolean but maintains the statistics in the core itself.
>
> I have reviewed all the previous comments and applied the ones which
> are relevant to the new approach again. Following two are worth noting
> here.
>
> In order to address Amit's concern [1] that an inaccuracy in these
> counts because of a bug in output plugin code may be blamed on the
> core, I have added a note in the documentation of view
> pg_stat_replication_slot in order to avoid such a blame and also
> directing users to plugin they should investigate.
>
> With the statistics being maintained by the core, Bertrand's concern
> about stale statistics [2] are also addressed. Also it does not have
> the asymmetry mentioned in point 2 in [3].
>
> Please review.
>
> [1] https://www.postgresql.org/message-id/CAA4eK1KzYaq9dcaa20Pv44ewomUPj_PbbeLfEnvzuXYMZtNw0A%40mail.gmail.com
> [2] https://www.postgresql.org/message-id/aNZ1T5vYC1BtKs4M@ip-10-97-1-34.eu-west-3.compute.internal
> [3] https://www.postgresql.org/message-id/CAExHW5tfVHABuv1moL_shp7oPrWmg8ha7T8CqwZxiMrKror7iw%40mail.gmail.com

Andres, Can you please review the new implementation and let me know
whether it addresses the concern you raised in [4]

Amit, does it address your concerns in [1] (see above references) reasonably?

[4] https://www.postgresql.org/message-id/zzidfgaowvlv4opptrcdlw57vmulnh7gnes4aerl6u35mirelm@tj2vzseptkjk

--
Best Wishes,
Ashutosh Bapat

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2026-01-12 05:26:23 Re: Proposal: Conflict log history table for Logical Replication
Previous Message David G. Johnston 2026-01-12 04:04:28 Re: docs: clarify ALTER TABLE behavior on partitioned tables