Re: add function for creating/attaching hash table in DSM registry

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Rahila Syed <rahilasyed90(at)gmail(dot)com>
Cc: Florents Tselai <florents(dot)tselai(at)gmail(dot)com>, Sami Imseih <samimseih(at)gmail(dot)com>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: add function for creating/attaching hash table in DSM registry
Date: 2025-06-20 20:31:04
Message-ID: aFXFCIJtJCy2ENYe@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 20, 2025 at 04:53:52PM +0530, Rahila Syed wrote:
> Thank you for implementing these changes.
> The improvements look good and enhance the feature's utility. I have
> already started incorporating
> GetNamedDSA into my code to display memory context statistics.

Great! Thanks for the reviews.

> A potential future enhancement could be allowing GetNamedDSHASH to accept
> an existing DSA name.
> This would enable the DSHASH to reuse a DSA area instead of creating a new
> one each time.
> I plan to use this registry to store DSA pointers that all belong to the
> same DSA area, and this enhancement
> would be particularly beneficial. If you find this idea useful, I would be
> interested in working on it.

We briefly discussed returning the dshash's DSA upthread [0], and using an
existing DSA seems like a variation on that same idea. I'm a little wary
of allowing folks to mess with the named dshash internal DSAs. Not only
does messing with the DSA introduce some risk of breakage, but it could
make it more difficult to change implementation details for the named
dshash code in the future. I suppose we could document the expected usage
and try to do a few sanity checks, though...

[0] https://postgr.es/m/aEmRcAH1Rmaocz3D%40nathan

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Soumyadeep Chakraborty 2025-06-20 23:09:21 Re: Improve CRC32C performance on SSE4.2
Previous Message Nikita Malakhov 2025-06-20 20:09:01 Custom reloptions in TableAM