Re: Segmentation fault on proc exit after dshash_find_or_insert - Mailing list pgsql-hackers

From Álvaro Herrera
Subject Re: Segmentation fault on proc exit after dshash_find_or_insert
Date
Msg-id 202601140928.sbxjiuhq5ae6@alvherre.pgsql
Whole thread Raw
In response to Re: Segmentation fault on proc exit after dshash_find_or_insert  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: Segmentation fault on proc exit after dshash_find_or_insert
List pgsql-hackers
On 2025-Dec-18, Amit Langote wrote:

> Thanks.  Updated the commit message too to be more accurate in the
> attached updated patch.

Looks good to me.  I would add an Assert(num_held_lwlocks == 0) at the
end of LWLockReleaseAll(), to make it clear that it's idempotent (which
is important for the case where ProcKill will call it again shortly
after).

Are you going to push this soon?

Looking at ProcKill, I notice that we do some LWLock ops after its
LWLockReleaseAll() call, which seems a bit silly.  Why not do that right
after the "if (MyProc->lockGroupLeader != NULL)" block instead?  Nothing
uses LWLocks from there on.  This can be a separate commit.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Update some comments for fasthash
Next
From: Kirill Reshke
Date:
Subject: Re: GIN pageinspect support for entry tree and posting tree