Re: Report bytes and transactions actually sent downtream

Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>

From: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
To: Bertrand Drouvot <bertranddrouvot.pg@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-24T09:53:44Z
Lists: pgsql-hackers

Attachments

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:
> >
> > Hi,
> >
> > On Fri, Oct 03, 2025 at 12:22:05PM +0530, Ashutosh Bapat wrote:
> > > Here's patchset addressing two issues:
> >
> > Thanks for the patch update!
> >
> > > I
> > > have added a note in documentation for plugin authors, warning them
> > > that this isn't expected.
> >
> > What note are you referring to? (I'm failing to see it).
>
> Patch 0002, changes in logicaldecoding.sgml. I am a bit hesitant to
> add more details as to what "misleading" means since mentioning so
> might be seen as a documented behaviour and thus plugin authors
> relying on it.
>
> >
> > > I don't think it's worth adding complexity
> > > in code to support such a case unless we see a practical need for the
> > > same.
> >
> > Sounds good.
> >
> >
> > > 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.

-- 
Best Wishes,
Ashutosh Bapat