Re: postgresql locks the whole table! - Mailing list pgsql-general

From Greg Stark
Subject Re: postgresql locks the whole table!
Date
Msg-id 873cbw1k24.fsf@stark.dyndns.tv
Whole thread Raw
In response to Re: postgresql locks the whole table!  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-general
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:

> In addition, how should the locks be granted for a sequence like:
>  T1: get shared lock on row A
>  T2: get exclusive lock on row A
>  T3: get shared lock on row A
> Does T3 get the lock or not? If it does, then you have the possibility of
> freezing out T2 for a very long time and badly hurting update/delete
> performance.

Well this is a fundamental question that applies to any scheme to handle
shared locks. You get into all sorts of fun stuff like livelock and priority
inversion that real time systems folk invent just to torture programmers.

--
greg

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: pg_hba.conf change in 7.4
Next
From: "Claudio Lapidus"
Date:
Subject: Re: user defined variable per session