Skip site navigation (1) Skip section navigation (2)

Re: Deadlocks caused by referential integrity checks

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Deadlocks caused by referential integrity checks
Date: 2004-08-24 22:47:58
Message-ID: 12921.1093387678@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
Greg Stark <gsstark(at)mit(dot)edu> writes:
> At least some versions of postgres ensure that constraint triggers will be
> executed in alphabetical order.

Only within a single event, though, so I don't think fooling with the
trigger names will do anything to resolve the sorts of problems people
are dealing with.

The most promising quick-fix I've heard suggested is to mark all the FK
constraints as deferred until end of transaction.  That would reduce the
time window in which the locks are held to a short interval and thus
make deadlocks less likely (not impossible, certainly, but less likely).

			regards, tom lane

In response to

Responses

pgsql-general by date

Next:From: Stephan SzaboDate: 2004-08-24 22:51:13
Subject: Re: Deadlocks caused by referential integrity checks
Previous:From: Tatsuo IshiiDate: 2004-08-24 22:41:45
Subject: Re: UTF-8 and LIKE vs =

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group