Re: Report bytes and transactions actually sent downtream

From: Andres Freund <andres(at)anarazel(dot)de>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: shveta malik <shveta(dot)malik(at)gmail(dot)com>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Report bytes and transactions actually sent downtream
Date: 2025-11-03 15:20:57
Message-ID: zzidfgaowvlv4opptrcdlw57vmulnh7gnes4aerl6u35mirelm@tj2vzseptkjk
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bryan Green 2025-11-03 15:25:11 Re: [PATCH] Fix orphaned backend processes on Windows using Job Objects
Previous Message Andres Freund 2025-11-03 15:19:18 Re: [PATCH] Fix orphaned backend processes on Windows using Job Objects