Thanks for this patch!
> I have looked at what can be done, and finished with a rather simple
> approach, as we have only one code path when a new entry is inserted,
> and one code path when an entry is removed when the refcount of an
> entry reaches 0 (includes resets, drops for kind matches, etc
On Fri, Sep 26, 2025 at 12:09:45PM -0500, Sami Imseih wrote:
> Thanks for v3. The only remaining comment I have is:
Thanks for the extra lookup. I have fixed this one, incorporated the
feedback from Chao, and applied the result after more tests with
pgbench to check the state of the counter.
Wit
Thanks for v3. The only remaining comment I have is:
This comment seems unnecessary, since refcount is not checked inside
pgstat_free_entry, but earlier.
+ /*
+* Entry has been dropped with refcount at 0, hence decrement the
+* entry counter.
+*/
I would just say th
On Thu, Sep 25, 2025 at 07:47:48PM -0500, Sami Imseih wrote:
> I spent a bit of time testing this with a pg_stat_statements like extension
> using a custom stats kind, and while I think there is value for both "live"
> ( ! ->dropped) counter and an exact dshash counter ( current proposal),
> I rath
> 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
On Wed, Sep 24, 2025 at 11:37:25AM +0900, Keisuke Kuroda wrote:
> 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).
> If we want to make it clearer
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