Re: Add support for entry counting in pgstats

Sami Imseih <samimseih@gmail.com>

From: Sami Imseih <samimseih@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-09-26T17:09:45Z
Lists: pgsql-hackers
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 this,

/* Decrement entry count, if required. */

--
Sami



Commits

  1. injection_points: Enable entry count in its variable-sized stats

  2. Add support for tracking of entry count in pgstats

  3. Keep track of what RTIs a Result node is scanning.