Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent
Date: 2025-11-24 21:02:18
Message-ID: CA+TgmoYq7U0hHgOEOqQgf=6cFXz_7Ab8QTRMFqFpLNfav0G4Ug@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Mon, Nov 24, 2025 at 2:03 PM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
> I think 0002 was more complicated than necessary. Here's a second try.

I haven't done a full review of this and I'm not sure whether you want
me to spend more time on it, but something I notice about this version
is that the PG_CATCH() blocks only contain dshash_delete_entry()
calls. That seems good, because that means that all the other cleanup
is being handled by transaction abort (assuming that the patch isn't
buggy, which I haven't attempted to verify). However, it does make me
wonder if we could also find a way to postpone adding the dshash
entries so that we don't need to do anything in PG_CATCH() blocks at
all. I'm guessing that the reason why that doesn't easily work is
because you're relying on those locks to prevent multiple backends
from doing the same initialization?

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2025-11-24 21:25:51 Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent
Previous Message Jacob Champion 2025-11-24 20:24:28 pgsql: postgres: Use pg_{add,mul}_size_overflow()

Browse pgsql-hackers by date

  From Date Subject
Next Message Melanie Plageman 2025-11-24 21:04:41 Re: Buffer locking is special (hints, checksums, AIO writes)
Previous Message Hannu Krosing 2025-11-24 21:02:15 Re: Patch: dumping tables data in multiple chunks in pg_dump