Re: Reducing likelihood of deadlocks (was referential Integrity and SHARE locks) - Mailing list pgsql-hackers

From Marc Munro
Subject Re: Reducing likelihood of deadlocks (was referential Integrity and SHARE locks)
Date
Msg-id 1170956683.21038.36.camel@bloodnok.com
Whole thread Raw
In response to Re: Reducing likelihood of deadlocks (was referential Integrity and SHARE locks)  (Csaba Nagy <nagy@ecircle-ag.com>)
List pgsql-hackers
On Thu, 2007-08-02 at 18:06 +0100, Csaba Nagy wrote:

> The problem is that eliminating the deadlock is still not the complete
> cake... the interlocking still remains, possibly leading to degraded
> performance on high contention on very common parent rows. The real
> solution would be when an update on the parent table's non-referenced
> fields is not interlocking at all with updates of the child rows... and
> I think there were some proposals to do that.

Agreed.  There are two issues here, unnecessary blocking and deadlock.
These can be tackled separately.  My proposal deals only with the
deadlock issue.

Even if if contention is reduced, for instance by implementing
column-level locking, there will still be the potential for deadlock
arising from inconsistent ordering of locks.  I continue to stand by my
proposal.

__
Marc

pgsql-hackers by date:

Previous
From: Csaba Nagy
Date:
Subject: Re: Reducing likelihood of deadlocks (was referential Integrity and SHARE locks)
Next
From: Peter Eisentraut
Date:
Subject: Re: Chatter on DROP SOMETHING IF EXISTS