Re: Report bytes and transactions actually sent downtream

shveta malik <shveta.malik@gmail.com>

From: shveta malik <shveta.malik@gmail.com>
To: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>, Ashutosh Sharma <ashu.coek88@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>, shveta malik <shveta.malik@gmail.com>
Date: 2025-10-27T10:20:39Z
Lists: pgsql-hackers
On Fri, Oct 3, 2025 at 12:22 PM Ashutosh Bapat
<ashutosh.bapat.oss@gmail.com> wrote:
>
>
> Here's patchset addressing two issues:
>
> Issue 1: A plugin supports stats in version X. It stopped supporting
> the stats in version X + 1. It again started supporting stats in
> version X + 2. Plugin stats will be accumulated when it was at version
> X. When X + 1 is loaded, the stats will continue to report the stats
> accumulated (by version X) till the first startup_call for that
> replication slot happens. If the user knows (from documentation say)
> that X + 1 does not support stats, seeing statistics will mislead
> them. We don't know whether there's a practical need to do so. A
> plugin which flip-flops on stats is breaking backward compatibility. I
> have added a note in documentation for plugin authors, warning them
> that this isn't expected. 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.

I agree. The current Note saying 'result may be misleading' looks good to me.

thanks
Shveta