pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Nathan Bossart <nathan@postgresql.org>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent
Date: Sat, 22 Nov 2025 13:41:21 -0600
Message-ID: <aSIR4Z4U887f_KcQ@nathan> (raw)
In-Reply-To: <CA+TgmoZsxbVhoxNGTWSd6=vHvyoqOSDNXJZabBZx+St8uPduLQ@mail.gmail.com>
References: <E1vJHUk-006I7r-37@gemulon.postgresql.org>
	<CA+TgmoZGFzLJpYANBG9yDyoakVm-P2Acdker-Y+DHvPWfvBE5w@mail.gmail.com>
	<aR89_9oYFHNtUTFa@nathan>
	<CA+TgmoZCHER55cGmnL_svMjH=k-S0w29ih+ym_+=t032TSsOFA@mail.gmail.com>
	<aR-fqzfZYSd3TVKa@nathan>
	<CA+TgmoZsxbVhoxNGTWSd6=vHvyoqOSDNXJZabBZx+St8uPduLQ@mail.gmail.com>

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





view thread (21+ messages)  latest in thread

Message-ID: <aSIR4Z4U887f_KcQ@nathan>
Permalink:  ../aSIR4Z4U887f_KcQ@nathan/
Also on:    postgresql.org/message-id/aSIR4Z4U887f_KcQ@nathan

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: nathandbossart@gmail.com, robertmhaas@gmail.com, nathan@postgresql.org, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent
  In-Reply-To: <aSIR4Z4U887f_KcQ@nathan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox