Re: Shared row locking - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Shared row locking
Date
Msg-id Pine.OSF.4.61.0412192330360.479956@kosh.hut.fi
Whole thread Raw
In response to Re: Shared row locking  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Shared row locking
List pgsql-hackers
On Sun, 19 Dec 2004, Tom Lane wrote:

> Heikki Linnakangas <hlinnaka@iki.fi> writes:
>> On Sun, 19 Dec 2004, Alvaro Herrera wrote:
>>> This is not useful at all, because the objective of this exercise is to
>>> downgrade locks, from exclusive row locking (SELECT ... FOR UPDATE) to
>>> shared row locking.
>
>> Actually it might help in some scenarios. Remember, we're not talking
>> about upgrading shared locks to exclusive locks. We're only talking about
>> locking more rows than necessary (all rows).
>
> Nonetheless, it would mean that locks would be taken depending on
> implementation-dependent, not-visible-to-the-user considerations.
> Shared locks can still cause deadlocks, and so you would have an
> unreliable application, which would only be unreliable under load.
>
> As I said in connection with the other proposal, weird user-visible
> semantics should be the last resort not the first.

I agree that lock escalation is not a good solution, we run into problems 
with DB2 lock escalation at work all the time.

- Heikki


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Shared row locking
Next
From: Tom Lane
Date:
Subject: Kerberos includes (was Re: Port report: Fedora Core 3 x86_64)