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

From Andres Freund
Subject Re: Report bytes and transactions actually sent downtream
Date
Msg-id zzidfgaowvlv4opptrcdlw57vmulnh7gnes4aerl6u35mirelm@tj2vzseptkjk
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,

On 2025-11-03 19:53:30 +0530, Ashutosh Bapat wrote:
> This commit adds following fields to pg_stat_replication_slots
> - plugin_filtered_bytes is the amount of changes filtered out by the
>   output plugin
> - plugin_sent_txns is the amount of transactions sent downstream by the
>   output plugin
> - plugin_sent_bytes is the amount of data sent downstream by the output
>   plugin.
> 
> The prefix "plugin_" indicates that these counters are related to and
> maintained by the output plugin. An output plugin may choose not to
> initialize LogicalDecodingContext::stats, which holds these counters, in
> which case the above columns will be reported as NULL.

I continue to be uncomfortable with doing all this tracking explicitly in
output plugins. This still seems like something core infrastructure should
take care of, instead of re-implementing it in different output plugins, with
the inevitable behaviour differences that will entail.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [PATCH] Fix orphaned backend processes on Windows using Job Objects
Next
From: Bryan Green
Date:
Subject: Re: [PATCH] Fix orphaned backend processes on Windows using Job Objects