add function for creating/attaching hash table in DSM registry

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: add function for creating/attaching hash table in DSM registry
Date: 2025-06-04 21:35:24
Message-ID: aEC8HGy2tRQjZg_8@nathan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Libraries commonly use shared memory to store hash tables. While it's
possible to set up a dshash table using the DSM registry today, doing so is
complicated; you need to set up two LWLock tranches, a DSA, and finally the
dshash table. The attached patch adds a new function called
GetNamedDSMHash() that makes creating/attaching a hash table in the DSM
registry much easier.

--
nathan

Attachment Content-Type Size
v1-0001-simplify-creating-hash-table-in-dsm-registry.patch text/plain 9.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-06-04 21:42:01 Re: like pg_shmem_allocations, but fine-grained for DSM registry ?
Previous Message Noah Misch 2025-06-04 21:29:46 Re: PG 18 release notes draft committed