Re: Proposal: New LWLockmode LW_OWNER

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jignesh K(dot) Shah" <J(dot)K(dot)Shah(at)Sun(dot)COM>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: New LWLockmode LW_OWNER
Date: 2008-06-06 18:07:33
Message-ID: 27295.1212775653@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jignesh K. Shah" <J(dot)K(dot)Shah(at)Sun(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-06-06 18:15:04 Re: Proposal: New LWLockmode LW_OWNER
Previous Message Alvaro Herrera 2008-06-06 17:58:53 Re: Proposal: New LWLockmode LW_OWNER