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

From Ashutosh Bapat
Subject Re: Report bytes and transactions actually sent downtream
Date
Msg-id CAExHW5v3UHyJ_vgxcBmCEO1U5PFsrYZ3EXGPF0Fo37twOLpdSg@mail.gmail.com
Whole thread Raw
In response to Re: Report bytes and transactions actually sent downtream  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
List pgsql-hackers
Hi Amit and Andres,

On Thu, Dec 11, 2025 at 10:29 AM Ashutosh Bapat
<ashutosh.bapat.oss@gmail.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



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: docs: clarify ALTER TABLE behavior on partitioned tables
Next
From: Peter Smith
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication