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

From: Rahila Syed <rahilasyed90(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(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 11:23:52
Message-ID: CAH2L28srLQauQKvPUxz+2k0Od3baH_6nEyByZib5c8ZJkTGRRQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Nathan,

>
> I like this idea, but I took it one step further in the attached patch and
> made the registry entry struct flexible enough to store any type of entry.
> Specifically, I've added a new "type" enum followed by a union of the
> different structs used to store the entry data. I was originally trying to
> avoid this kind of invasive change, but it's not nearly as complicated as I
> feared, and there are benefits such as fewer shared memory things to juggle
> and better sanity checking. It should also be easy to extend in the
> future. WDYT?
>
>

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.

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.

Thank you,
Rahila Syed

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2025-06-20 11:29:10 Re: BUG #18959: Name collisions of expression indexes during parallel Index creations on a pratitioned table.
Previous Message Zhijie Hou (Fujitsu) 2025-06-20 11:17:45 RE: Conflict detection for update_deleted in logical replication