Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-11-25T21:16:00Z
Lists: pgsql-hackers
Attachments
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
Commits
-
Teach DSM registry to retry entry initialization if needed.
- dbdc717ac674 19 (unreleased) landed
- b83bcc0df180 18.2 landed
- 2fc5c5062207 17.8 landed
-
Revert "Teach DSM registry to ERROR if attaching to an uninitialized entry."
- c7e0f263d67f 17.8 landed
- 8551a289201c 18.2 landed
- 2dd506b859cf 19 (unreleased) landed
-
Teach DSM registry to ERROR if attaching to an uninitialized entry.
- 1165a933aab1 19 (unreleased) cited