pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Add mem_exceeded_count column to pg_stat_replication_slots.
3+ messages / 3 participants
[nested] [flat]
* pgsql: Add mem_exceeded_count column to pg_stat_replication_slots.
@ 2025-10-08 17:05 Masahiko Sawada <msawada@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: Masahiko Sawada @ 2025-10-08 17:05 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Add mem_exceeded_count column to pg_stat_replication_slots.
This commit introduces a new column mem_exceeded_count to the
pg_stat_replication_slots view. This counter tracks how often the
memory used by logical decoding exceeds the logical_decoding_work_mem
limit. The new statistic helps users determine whether exceeding the
logical_decoding_work_mem limit is a rare occurrences or a frequent
issue, information that wasn't available through existing statistics.
Bumps catversion.
Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: shveta malik <shveta.malik@gmail.com>
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/978D21E8-9D3B-40EA-A4B1-F87BABE7868C@yesql.se
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d3b6183dd988928dd369b4b7d641917e77f1ae4e
Modified Files
--------------
contrib/test_decoding/expected/stats.out | 71 +++++++++++++------------
contrib/test_decoding/sql/stats.sql | 13 +++--
doc/src/sgml/monitoring.sgml | 11 ++++
src/backend/catalog/system_views.sql | 1 +
src/backend/replication/logical/logical.c | 8 ++-
src/backend/replication/logical/reorderbuffer.c | 34 +++++++++---
src/backend/utils/activity/pgstat_replslot.c | 1 +
src/backend/utils/adt/pgstatfuncs.c | 19 ++++---
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 6 +--
src/include/pgstat.h | 1 +
src/include/replication/reorderbuffer.h | 3 ++
src/test/regress/expected/rules.out | 3 +-
13 files changed, 113 insertions(+), 60 deletions(-)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Add mem_exceeded_count column to pg_stat_replication_slots.
@ 2025-10-29 08:52 Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
parent: Masahiko Sawada <msawada@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: Bertrand Drouvot @ 2025-10-29 08:52 UTC (permalink / raw)
To: Masahiko Sawada <msawada@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org
Hi,
On Wed, Oct 08, 2025 at 05:05:21PM +0000, Masahiko Sawada wrote:
> Add mem_exceeded_count column to pg_stat_replication_slots.
>
> This commit introduces a new column mem_exceeded_count to the
> pg_stat_replication_slots view. This counter tracks how often the
> memory used by logical decoding exceeds the logical_decoding_work_mem
> limit. The new statistic helps users determine whether exceeding the
> logical_decoding_work_mem limit is a rare occurrences or a frequent
> issue, information that wasn't available through existing statistics.
>
> Bumps catversion.
>
> Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
> Reviewed-by: shveta malik <shveta.malik@gmail.com>
> Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
> Reviewed-by: Chao Li <li.evan.chao@gmail.com>
> Discussion: https://postgr.es/m/978D21E8-9D3B-40EA-A4B1-F87BABE7868C@yesql.se
I just realized that the discussion mentioned above is not the right one.
That should be: https://postgr.es/m/aK6zNcmb%2BPpySFvG%40ip-10-97-1-34.eu-west-3.compute.internal
Reporting that here so that the link is not lost.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Add mem_exceeded_count column to pg_stat_replication_slots.
@ 2025-10-29 17:40 Masahiko Sawada <sawada.mshk@gmail.com>
parent: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Masahiko Sawada @ 2025-10-29 17:40 UTC (permalink / raw)
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>; +Cc: Masahiko Sawada <msawada@postgresql.org>; pgsql-committers@lists.postgresql.org
On Wed, Oct 29, 2025 at 1:52 AM Bertrand Drouvot
<bertranddrouvot.pg@gmail.com> wrote:
>
> Hi,
>
> On Wed, Oct 08, 2025 at 05:05:21PM +0000, Masahiko Sawada wrote:
> > Add mem_exceeded_count column to pg_stat_replication_slots.
> >
> > This commit introduces a new column mem_exceeded_count to the
> > pg_stat_replication_slots view. This counter tracks how often the
> > memory used by logical decoding exceeds the logical_decoding_work_mem
> > limit. The new statistic helps users determine whether exceeding the
> > logical_decoding_work_mem limit is a rare occurrences or a frequent
> > issue, information that wasn't available through existing statistics.
> >
> > Bumps catversion.
> >
> > Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
> > Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
> > Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
> > Reviewed-by: shveta malik <shveta.malik@gmail.com>
> > Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
> > Reviewed-by: Chao Li <li.evan.chao@gmail.com>
> > Discussion: https://postgr.es/m/978D21E8-9D3B-40EA-A4B1-F87BABE7868C@yesql.se
>
> I just realized that the discussion mentioned above is not the right one.
> That should be: https://postgr.es/m/aK6zNcmb%2BPpySFvG%40ip-10-97-1-34.eu-west-3.compute.internal
>
> Reporting that here so that the link is not lost.
>
Thank you. That's my fault.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-10-29 17:40 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-10-08 17:05 pgsql: Add mem_exceeded_count column to pg_stat_replication_slots. Masahiko Sawada <msawada@postgresql.org>
2025-10-29 08:52 ` Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
2025-10-29 17:40 ` Masahiko Sawada <sawada.mshk@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox