From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
Cc: | Greg Stark <gsstark(at)mit(dot)edu>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: postgresql locks the whole table! |
Date: | 2003-12-07 19:53:23 |
Message-ID: | 873cbw1k24.fsf@stark.dyndns.tv |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Claudio Lapidus | 2003-12-07 19:57:00 | Re: user defined variable per session |
Previous Message | Joshua D. Drake | 2003-12-07 19:44:49 | Re: pg_hba.conf change in 7.4 |