Re: Proposal: New LWLockmode LW_OWNER - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposal: New LWLockmode LW_OWNER
Date
Msg-id 27295.1212775653@sss.pgh.pa.us
Whole thread Raw
In response to Re: Proposal: New LWLockmode LW_OWNER  ("Jignesh K. Shah" <J.K.Shah@Sun.COM>)
Responses Re: Proposal: New LWLockmode LW_OWNER  ("Jignesh K. Shah" <J.K.Shah@Sun.COM>)
List pgsql-hackers
"Jignesh K. Shah" <J.K.Shah@Sun.COM> writes:
> Tom Lane wrote:
>> This seems rather crazy, and you haven't actually given a single
>> convincing use-case.

> One area that I find it useful is where it will be useful is in 
> ProcArrayEndTransaction where it uses exclusive to update  proc array 
> structure where right now it uses EXCLUSIVE and most commit transactions 
> are updating their own proc array structure this lock semantic can be 
> useful..

That is exactly a place where you CAN'T use this, because it will break
transactional semantics, specifically serialization of commits relative
to snapshots.  See all the discussions around the last refactoring of
ProcArray locking, and particularly the summary in
src/backend/access/transam/README.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Proposal: New LWLockmode LW_OWNER
Next
From: Tom Lane
Date:
Subject: Re: Proposal: New LWLockmode LW_OWNER