Re: pgsql: Avoid improbable PANIC during heap_update. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Avoid improbable PANIC during heap_update.
Date
Msg-id 692791.1664573331@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Avoid improbable PANIC during heap_update.  (Jaime Casanova <jcasanov@systemguards.com.ec>)
Responses Re: pgsql: Avoid improbable PANIC during heap_update.
Re: pgsql: Avoid improbable PANIC during heap_update.
List pgsql-committers
Jaime Casanova <jcasanov@systemguards.com.ec> writes:
> Just to confirm I saw this on RC1

Ugh ... I think I see the problem.  There's still one path through
RelationGetBufferForTuple that fails to guarantee that it's acquired
a vmbuffer pin if the all-visible flag becomes set in the otherBuffer.
Namely, if we're forced to extend the relation, then we deal with
vm pins when ConditionalLockBuffer(otherBuffer) fails ... but not
when it succeeds.  I think the fix is just to move the last
GetVisibilityMapPins call out of the "if
(unlikely(!ConditionalLockBuffer(otherBuffer)))" stanza.

It'd still be good to have a test case for this ...

            regards, tom lane



pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Avoid improbable PANIC during heap_update.
Next
From: Peter Geoghegan
Date:
Subject: Re: pgsql: Avoid improbable PANIC during heap_update.