Re: introduce dynamic shared memory registry

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: introduce dynamic shared memory registry
Date: 2024-01-02 22:49:07
Message-ID: 20240102224907.GA1246933@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Here's a new version of the patch set with Bharath's feedback addressed.

On Tue, Jan 02, 2024 at 11:31:14AM -0500, Robert Haas wrote:
> On Tue, Jan 2, 2024 at 11:21 AM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>> > Are we expecting, for instance, a 128-bit UUID being used as a key and
>> > hence limiting it to a higher value 256 instead of just NAMEDATALEN?
>> > My thoughts were around saving a few bytes of shared memory space that
>> > can get higher when multiple modules using a DSM registry with
>> > multiple DSM segments.
>> I'm not really expecting folks to use more than, say, 16 characters for the
>> key, but I intentionally set it much higher in case someone did have a
>> reason to use longer keys. I'll lower it to 64 in the next revision unless
>> anyone else objects.
> This surely doesn't matter either way. We're not expecting this hash
> table to have more than a handful of entries; the difference between
> 256, 64, and NAMEDATALEN won't even add up to kilobytes in any
> realistic scenario, let along MB or GB.


Nathan Bossart
Amazon Web Services:

Attachment Content-Type Size
v4-0001-add-dsm-registry.patch text/x-diff 19.2 KB
v4-0002-use-dsm-registry-for-pg_prewarm.patch text/x-diff 3.1 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2024-01-02 22:53:55 Re: SET ROLE x NO RESET
Previous Message Michał Kłeczek 2024-01-02 22:23:23 Re: SET ROLE x NO RESET