Re: Re: missing LockBuffer(buffer, BUFFER_LOCK_SHARE) in trigger.c GetTupleForTrigger? - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Re: missing LockBuffer(buffer, BUFFER_LOCK_SHARE) in trigger.c GetTupleForTrigger?
Date
Msg-id 20121130125746.GD3957@awork2.anarazel.de
Whole thread Raw
In response to Re: Re: missing LockBuffer(buffer, BUFFER_LOCK_SHARE) in trigger.c GetTupleForTrigger?  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Re: missing LockBuffer(buffer, BUFFER_LOCK_SHARE) in trigger.c GetTupleForTrigger?
List pgsql-hackers
On 2012-11-30 12:50:06 +0000, Simon Riggs wrote:
> On 30 November 2012 11:58, Andres Freund <andres@2ndquadrant.com> wrote:
>
> > We only get the pin right there, I don't see any preexisting pin.
>
> Seems easy enough to test with an Assert patch.
>
> If the Assert doesn't fail, we apply it as "documentation" of the
> requirement for a pin.
>
> If it fails, we fix the bug.

I think its wrong even if we were holding a pin all the time due the the
aforementioned PageAddItem reshuffling of line pointers. So that Assert
wouldn't proof enough.

I can try to proof corruption there, but I would rather see somebody
coming along telling me why its safe and that I am dumb for not
realizing it.

Greetings,

Andres Freund

--Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Review: Extra Daemons / bgworker
Next
From: Andres Freund
Date:
Subject: Re: Review: Extra Daemons / bgworker