show size of DSAs and dshash tables in pg_dsm_registry_allocations
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-11-26T22:49:49Z
Lists: pgsql-hackers
Attachments
- v1-0001-rework-DSM-registry-view.patch (text/plain)
On Tue, Nov 25, 2025 at 07:13:03PM -0500, Robert Haas wrote: > In my ideal world, it would probably show partially-initialized entires > in some distinguishable way, like with a null size. I reevaluated this view, and I think we can do what you suggest here. Right now, we show NULL for DSAs and dshash tables because 1) we might not be attached to them and 2) we don't have a pointer to the dsa_area * or dshash_table * in local memory. If we introduce a function that looks up the size of a DSA given its handle (transiently attaching to the control segment if needed), we can show the size for all successfully-initialized entries. Then, we can make NULL mean that the entry was partially-initialized. Patch attached. -- nathan
Commits
-
Show size of DSAs and dshashes in pg_dsm_registry_allocations.
- f894acb24a12 19 (unreleased) landed
-
Add template for adaptive radix tree
- ee1b30f128d8 17.0 cited