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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers