On Fri, Jul 17, 2026 at 11:58:40AM -0500, Sami Imseih wrote:
> As I noted earlier in this thread, my concern is that this value will be
> misused to estimate how much memory a kind uses, since it excludes overhead.
> The per-entry comment notes this, but I think the docs should also warn that
> entry_count and entry_size together do not give an accurate measure of a
> kind's total memory use, and that the DSA footprint is not shrunk when entries
> are deleted (the OS does not reclaim the freed space, so someone may be
> confused that their memory footprint stays high after deleting entries).

Would it help the monitoring purpose of the change if we began using
GetNamedDSHash() when setting up the pgstats shared hash table?  That
would give a way to monitor the sizing of the table through
pg_dsm_registry_allocations, at least, tackling your concerns about
the imprecision of the data if we put a memory sizing field in
pg_stat_kind_info?
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to