Re: Re: missing LockBuffer(buffer, BUFFER_LOCK_SHARE) in trigger.c GetTupleForTrigger?

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: missing LockBuffer(buffer, BUFFER_LOCK_SHARE) in trigger.c GetTupleForTrigger?
Date: 2012-11-30 12:33:10
Message-ID: 20121130123309.GA4542@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund escribió:
> On 2012-11-30 08:52:18 +0530, Pavan Deolasee wrote:
> > On Fri, Nov 30, 2012 at 3:19 AM, Andres Freund <andres(at)2ndquadrant(dot)com>wrote:

> > > I can't believe this is safe? Just about anything but eviction could
> > > happen to that buffer at that moment?

Yeah, it does seem fishy to me as well.

> Even if it turns out to be safe, I think this deserves at least a
> comment...

No doubt that trigger.c is hugely underdocumented in some places.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavan Deolasee 2012-11-30 12:39:49 Re: missing LockBuffer(buffer, BUFFER_LOCK_SHARE) in trigger.c GetTupleForTrigger?
Previous Message Markus Wanner 2012-11-30 12:06:13 Re: Review: Extra Daemons / bgworker