Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent
Date
Msg-id aSYckI8dlAx23HBe@nathan
Whole thread Raw
In response to Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent
List pgsql-hackers
On Tue, Nov 25, 2025 at 03:58:47PM -0500, Robert Haas wrote:
> On Tue, Nov 25, 2025 at 12:45 PM Nathan Bossart
> <nathandbossart@gmail.com> wrote:
>> I gave your idea a try, and I like the result a lot.  IMHO it makes the
>> code much easier to reason about.
> 
> I looked through this and I agree this looks good. Thanks for working on it.

My tests seem happy, so I will plan on committing these patches tomorrow.
The only difference in v4 is that pg_get_dsm_registry_allocations() will no
longer show partially-initialized entries.  I thought that was the best
option in this case because such entries shouldn't have any allocated
memory, and retrying GetNamed*() would set *found to false.

-- 
nathan

Attachment

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: The pgperltidy diffs in HEAD
Next
From: Melanie Plageman
Date:
Subject: Re: Buffer locking is special (hints, checksums, AIO writes)