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

From Alvaro Herrera
Subject Re: Proposal: New LWLockmode LW_OWNER
Date
Msg-id 20080606175853.GC16502@alvh.no-ip.org
Whole thread Raw
In response to Re: Proposal: New LWLockmode LW_OWNER  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Proposal: New LWLockmode LW_OWNER  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> "Jignesh K. Shah" <J.K.Shah@Sun.COM> writes:
> > New Lock Mode Proposed: LW_EX_OWNER  (input on better name will be 
> > appreciated).
> 
> This seems rather crazy, and you haven't actually given a single
> convincing use-case.  Shouldn't you be trying to break down a lock
> into multiple locks instead of inventing new lock semantics that
> nobody really understands?

We do something like this in the sinval code -- see SIGetDataEntry.  We
use LW_SHARED for it.  Obviously it has the implication that a backend
can never grab only SHARED and examine the status of other backends, but
that's not needed in this code.  Perhaps the other pieces of code that
Jignesh wants to improve can be treated similarly?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: "Jignesh K. Shah"
Date:
Subject: Re: Proposal: New LWLockmode LW_OWNER
Next
From: Tom Lane
Date:
Subject: Re: Proposal: New LWLockmode LW_OWNER