On Sat, Nov 22, 2025 at 10:25:48AM -0500, Robert Haas wrote:
> On Thu, Nov 20, 2025 at 6:09 PM Nathan Bossart <nathandbossart@gmail.com> wrote:
>> Unpinning/detaching the segment/DSA/dshash table and deleting the DSM
>> registry entry in a PG_CATCH block scares me a little, but it might be
>> doable.
>
> It seems a bit weird to be doing explicit unpinning in a PG_CATCH
> block. Ideally you'd want to postpone the pinning until initialization
> has succeeded, so that if you fail before that, transaction cleanup
> takes care of it automatically. Alternatively, destroying what existed
> before could be deferred until later, when an as-yet-unfailed
> transaction stumbles across the tombstone.
Oh, yeah, good idea.
> Am I worrying too much? Possibly! But as I said to David on another
> thread this morning, it's better to worry on pgsql-hackers before any
> problem happens than to start worrying after something bad happens in
> a customer situation.
I'll give what you suggested a try. It seems reasonable enough.
--
nathan