with the field name entry_counts,
and it's true that using the plural form is confusing. How about
track_entry_count in PgStat_KindInfo instead?
--
Michael
From 4761314ce27f8aaebaa531e8068513cf9924680b Mon Sep 17 00:00:00 2001
From: Michael Paquier
Date: Fri, 26 Sep 2025 12:53:27 +0900
Subject: [PATCH
> On Tue, Sep 23, 2025 at 01:39:00PM -0500, Sami Imseih wrote:
> > The refcount reaches 0 when all backends release their references to the
> > stat, so if something like pg_stat_statements relies on a count for
> > deallocation purposes (to stay within the max), and that value only
> > decrements
7:23 +0900
Subject: [PATCH v2 1/2] Add support for entry counting in pgstats
Stats kinds can set an option call track_counts, that will make pgstats
track the number of entries that exist in the shared hashtable.
As there is only one code path where a new entry is added, and one code
path wher
Testing via the Injection Point has been successfully completed.
> The option is named track_counts.
Regarding the option name track_counts in PgStat_KindInfo.
In my personal opinion, I was just wondering that it shares
the same name as the GUC track_counts(pgstat_track_counts in the source code).
On Tue, Sep 23, 2025 at 01:39:00PM -0500, Sami Imseih wrote:
> The refcount reaches 0 when all backends release their references to the
> stat, so if something like pg_stat_statements relies on a count for
> deallocation purposes (to stay within the max), and that value only
> decrements when all r
> On Sep 12, 2025, at 15:23, Michael Paquier wrote:
>
>
> --
> Michael
> <0001-Add-support-for-entry-counting-in-pgstats.patch><0002-injection_points-Add-entry-counting.patch>
The code overall looks good to me, very clear and neat. Just a few small
comments:
1 - 0001
```
+* set. T
test.
Thoughts are welcome.
--
Michael
From 0c924a72f586c385f6ab1a22174b9c3b1cf2dd08 Mon Sep 17 00:00:00 2001
From: Michael Paquier
Date: Fri, 12 Sep 2025 16:09:51 +0900
Subject: [PATCH 1/2] Add support for entry counting in pgstats
Stats kinds can set an option call track_counts, that will make pg