| From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> | 
|---|---|
| To: | Florents Tselai <florents(dot)tselai(at)gmail(dot)com> | 
| Cc: | Rahila Syed <rahilasyed90(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-11 19:53:35 | 
| Message-ID: | aEnevzG3LQPiZkzX@nathan | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Here is a new patch with GetNamedDSA() added. A couple notes:
* I originally wanted to use GetNamedDSA() within GetNamedDSMHash(), but
  that would probably lead to two registry entries per dshash table, and it
  didn't really save all that much code, anyway.  So, I didn't do that.
* Using a DSA from the registry is cumbersome.  You essentially need
  another batch of shared memory to keep track of the pointers and do
  locking, so it might not be tremendously useful on its own.  AFAICT the
  easiest thing to do is to store the DSA pointers in a dshash table, which
  is what I've done in the test.
-- 
nathan
| Attachment | Content-Type | Size | 
|---|---|---|
| v6-0001-simplify-creating-hash-table-in-dsm-registry.patch | text/plain | 13.3 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2025-06-11 20:03:32 | Re: Inconsistent Behavior in JSONB Numeric Array Deletion | 
| Previous Message | Bruce Momjian | 2025-06-11 19:51:00 | Re: PG 18 release notes draft committed |