Re: Report bytes and transactions actually sent downtream

Bertrand Drouvot <bertranddrouvot.pg@gmail.com>

From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: shveta malik <shveta.malik@gmail.com>, Ashutosh Sharma <ashu.coek88@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-10-24T12:40:30Z
Lists: pgsql-hackers
Hi,

On Fri, Oct 24, 2025 at 03:23:44PM +0530, Ashutosh Bapat wrote:
> On Mon, Oct 6, 2025 at 10:32 AM Ashutosh Bapat
> <ashutosh.bapat.oss@gmail.com> wrote:
> >
> > On Fri, Oct 3, 2025 at 7:17 PM Bertrand Drouvot
> > <bertranddrouvot.pg@gmail.com> wrote:
> > >
> > > > Issue 2: Once X + 2 is loaded, further statistics are accumulated on
> > > > the top of statistics accumulated by version X. Attached patch fixes
> > > > issue 2 by zero'ing out the stats when the plugin does not report the
> > > > statistics.
> > >
> > > +#define REPLSLOT_SET_TO_ZERO(fld) statent->fld = 0
> > >
> > > It looks like that the associated "undef" is missing.
> >
> > Good catch. Fixed.
> >
> 
> Squashed patches into one and rebased.

Thanks for the new version!

LGTM except the plugin flip-flop behaviour that we discussed up-thread.
That said I don't think it hurts that much and maybe that's just me and others 
don't have a concern with it (in that case that's fine by me).

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com