From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | David Wheeler <david(at)wheeler(dot)net> |
Cc: | <sfpug(at)postgresql(dot)org> |
Subject: | Re: Fwd: [Bricolage-Devel] DB Deadlock Detected errors |
Date: | 2003-07-07 17:54:03 |
Message-ID: | 20030707105316.C78525-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | sfpug |
On Mon, 7 Jul 2003, David Wheeler wrote:
> On Monday, July 7, 2003, at 09:29 AM, Stephan Szabo wrote:
>
> > Updates get write locks on the particular row involved, so if you're
> > trying something like
> > T1: update foo set a=1 where key=1;
> > T2: update bar set a=2 where key=1;
> > T1: update bar set a=3 where key=1;
> > T2: update foo set a=4 where key=1;
> > you get a deadlock I believe. It does get a shared lock on the table
> > but
> > that shouldn't affect anything.
>
> Okay, row-level locks I can handle. :-)
>
> > Another possibility would be foreign keys since those grab explicit row
> > locks on the matching rows of the other relation. It's possible that
> > Jan's patch for updates might help in that case.
>
> I'm not familiar with what's happening with PG dev. Is "Jan's patch"
> part of 7.4?
Yeah, although I believe he send a 7.3 version to -general as well. It
gets rid of locking of the associated primary key row when doing an update
on a foreign key row that doesn't change the key value.
From | Date | Subject | |
---|---|---|---|
Next Message | David Wheeler | 2003-07-07 19:47:44 | Re: Fwd: [Bricolage-Devel] DB Deadlock Detected errors |
Previous Message | David Wheeler | 2003-07-07 17:10:11 | Re: Fwd: [Bricolage-Devel] DB Deadlock Detected errors |