Re: Concurrent MERGE - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: Concurrent MERGE
Date
Msg-id 4C5B3857.7070800@agliodbs.com
Whole thread Raw
In response to Re: Concurrent MERGE  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: Concurrent MERGE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 8/5/10 1:59 PM, Kevin Grittner wrote:
> Oh, and if deadlocks are that broken, it's a bit scary that we have
> let that go.  Is it the problem that technically intractable?

Yes; it's a major project.  Our detector works pretty well for deadlocks
which are 2-process locks or even several processes all locking against
the same first process. However, triangular and quadralateral deadlocks
(which I've seen more than once) it completely cannot handle, and some
types of activity which can cause deadlocks (like autovacuum or DDL
activity) also seem to be outside its purview.  The latter is probably
fixable if I can create some good test cases.

However, the "circular" deadlock problem has an n! issue with detecting it.

Also, even where the deadlock detector does its job, it's still the most
expensive type of serialization failure:

1. the detector will wait at least 1 second to check, so we're usually
looking at a couple seconds to resolve the deadlock;
2. since deadlocks don't happen in testing, most applicaiton error
handling isn't set up for them;
3. deadlocks can, and do, result in cancelling several transactions
instead of just one; there is no "winner" which is allowed to complete.

--                                  -- Josh Berkus                                    PostgreSQL Experts Inc.
                        http://www.pgexperts.com
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PL/pgSQL EXECUTE '..' USING with unknown
Next
From: Tom Lane
Date:
Subject: Re: Concurrent MERGE