Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-11-26T00:13:03Z
Lists: pgsql-hackers
On Tue, Nov 25, 2025 at 4:16 PM Nathan Bossart <nathandbossart@gmail.com> wrote: > 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. Without actually opening the new patch files, that seems OK to me. I think the important thing about such a view is that it shouldn't make any state changes; it should just show how things are. In my ideal world, it would probably show partially-initialized entires in some distinguishable way, like with a null size. But leaving them out is also defensible. The thing that I think really matters for failure cases is the ability to retry whatever's gone wrong, either to get it fixed or to see the error, and the other changes already accomplish that goal, so I'm happy. -- Robert Haas EDB: http://www.enterprisedb.com
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