Re: bug in fast-path locking - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: bug in fast-path locking
Date
Msg-id 4F846BAC.5020807@nasby.net
Whole thread Raw
In response to Re: bug in fast-path locking  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On 4/9/12 6:12 PM, Jeff Davis wrote:
> On Mon, 2012-04-09 at 17:42 -0500, Jim Nasby wrote:
>> Dumb question... should operations in the various StrongLock functions
>> take place in a critical section? Or is that already ensure outside of
>> these functions?
>
> Do you mean CRITICAL_SECTION() in the postgres sense (that is, avoid
> error paths by making all ERRORs into PANICs and preventing interrupts);
> or the sense described here:

Postgres sense. I thought there was concern about multiple people trying to increment or decrement the count at the
sametime, and if that was the case perhaps there was an issue with it not being in a CRITICAL_SECTION as well. But I
couldcertainly be wrong about this. :)
 

And yes, we'd definitely not want to be in a CRITICAL_SECTION for the duration of the operation...
-- 
Jim C. Nasby, Database Architect                   jim@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net


pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: invalid search_path complaints
Next
From: Greg Smith
Date:
Subject: Re: Last gasp