Re: show size of DSAs and dshash tables in pg_dsm_registry_allocations
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Rahila Syed <rahilasyed90@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-02T16:31:33Z
Lists: pgsql-hackers
On Tue, Dec 02, 2025 at 02:28:29PM +0530, Rahila Syed wrote: > Thank you for highlighting the discussions. I'm unsure about the best > approach here, but I think it would be safe to stay consistent with the > rest of the code in dsa.c, especially since it's unclear that the use of > LW_EXCLUSIVE for reading values in dsa is a mistake. Okay. I switched to LW_EXCLUSIVE and will consider starting a new thread to use LW_SHARED when possible in dsa.c. > Sorry for the confusion, I am trying to say that we can change the > following comment > > + *The area must have > + * been created with dsa_create (not dsa_create_in_place). > > to say this: > > "The area must have been created using dsm_segments" > > Since, this function can report the size of an area created with > dsa_create_in_place too, as long as the area is created using > dsm_segments. It cannot report the size of in-place areas, at least not without some changes, because (AFAICT) there's no way to get a dsa_handle for an in-place segment. I've now committed the patch. Thanks everyone for reviewing! -- 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