Deadlocks with foreign key references

Поиск
Список
Период
Сортировка
От Mike Schroepfer
Тема Deadlocks with foreign key references
Дата
Msg-id A281DEDA135C2549AC42955F4C983F8612B17C@mail01.raplix.com
обсуждение исходный текст
Ответы Re: Deadlocks with foreign key references  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-general
Hi Everyone,

We are getting intermittent deadlocks in our application due to foreign
key references.   We've cooked up a simple case to exercise the problem -
but I can see from previous mailing list posts that people are aware of
the issue:

http://archives.postgresql.org/pgsql-hackers/2002-03/msg01130.php

My questions are as follows:

1) Previous posts have recommended setting the constraints to INITIALLY
DEFERRED.
    a) Why does this solve the problem?
    b) Do I need to do this with every table involved?

2) Is there an alternative solution?

3) Are there any provisions in a future release (7.3?) to address this
issue.  It
seems to be a pretty severe problem that in normal operation you can get
false
deadlocks do to foreign key constrains.

Thanks for any help,

Mike

В списке pgsql-general по дате отправления:

Предыдущее
От: Alexandre Sebrao
Дата:
Сообщение: Getting this error when I use createdb
Следующее
От: Barry Lind
Дата:
Сообщение: timezone incompatibility