Re: Proposal: New LWLockmode LW_OWNER

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Jignesh K(dot) Shah" <J(dot)K(dot)Shah(at)Sun(dot)COM>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: New LWLockmode LW_OWNER
Date: 2008-06-06 17:58:53
Message-ID: 20080606175853.GC16502@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-06-06 18:07:33 Re: Proposal: New LWLockmode LW_OWNER
Previous Message Jignesh K. Shah 2008-06-06 17:57:04 Re: Proposal: New LWLockmode LW_OWNER