On Thu, Mar 13, 2025 at 06:54:09PM +0200, Florents Tselai wrote: > I扉e been working with the DSM registry API. > I was wondering if it is possible (it doesn愒 look like it) or if it has been discussed: > can we expose a view like pg_shmem_allocations, but fine-grained for every named segment (i.e. created by GetNamedDSMSegment )? > > Currently, there is a "DSM Registry Data" entry in that view, > but iiuc, it愀 only about the top-level hash table the registry uses.
This seems like a generally reasonable idea to me. In theory, it should be easy enough to build something that walks through the DSM registry hash table.
Here's a first attempt towards a view pg_dsm_registry(name, size) that does just that
So, using the test_dsm_registry module as a test bed,