Re: add function for creating/attaching hash table in DSM registry
Sami Imseih <samimseih@gmail.com>
From: Sami Imseih <samimseih@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>, pgsql-hackers@postgresql.org
Date: 2025-06-10T00:14:28Z
Lists: pgsql-hackers
> It is not expected behavior IMO, and I still need to debug this a bit more, > but it may be something outside the scope of this patch that the patch just > surfaced. It seems I got it backward. If the tranch is registered, then the wait event name is the one of the tranche, in that case we will see the name of the tranch suffixed with "_dsh". If the tranche is not registered, then the wait event name is "extension". We can end up instrumenting with 2 different wait event names, "extension" or the tranche name, for the same code path. This looks broken to me, but I am not sure what could be done yet. It should be taken up for discussion in a separate thread, as it's not the fault of this patch. Going back to the original point, DSMRegistryHash and DSMRegistryHash are built-in, and those names are well-defined and actually refer to waits related to the mechanism of registering a DSA or a HASH. I think it will be odd to append "_dsh", but we should at minimum add a comment in the GetNamedDSMHash explaining this. -- Sami
Commits
-
Fix cross-version upgrade test breakage from commit fe07100e82.
- 0c2b7174c362 19 (unreleased) landed
-
Add GetNamedDSA() and GetNamedDSHash().
- fe07100e82b0 19 (unreleased) landed
-
Remove dynamic_shared_memory_type=none
- bcbd940806a2 12.0 cited
-
Introduce dynamic shared memory areas.
- 13df76a537cc 10.0 cited
-
Relax the requirement that all lwlocks be stored in a single array.
- ea9df812d850 9.4.0 cited