Re: Add memory_limit_hits to pg_stat_replication_slots - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Re: Add memory_limit_hits to pg_stat_replication_slots
Date
Msg-id aNYj8L5rYYTJslk8@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
In response to Re: Add memory_limit_hits to pg_stat_replication_slots  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
Hi,

On Thu, Sep 25, 2025 at 12:14:04PM -0700, Masahiko Sawada wrote:
> On Thu, Sep 25, 2025 at 3:17 AM Bertrand Drouvot
> <bertranddrouvot.pg@gmail.com> wrote:
> >
> > That probably means that mem_exceeded_count would need to be increased.
> >
> > What do you think?
> 
> Right. But one might argue that if we increment mem_exceeded_count
> only when serializing or streaming is actually performed,
> mem_exceeded_count would be 0 in the first example and therefore users
> would be able to simply check mem_exceeded_count without any
> computation.

Right but we'd not be able to see when the memory limit has been reached for all
the cases (that would hide the aborted transactions case). I think that with
the current approach we have the best of both world (even if it requires some
computations).

Regards,

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



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add support for entry counting in pgstats
Next
From: shveta malik
Date:
Subject: Re: POC: enable logical decoding when wal_level = 'replica' without a server restart