Re: WIP: generalized index constraints

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: WIP: generalized index constraints
Дата
Msg-id 1253465040.6983.6.camel@jdavis
обсуждение исходный текст
Ответ на Re: WIP: generalized index constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: WIP: generalized index constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, 2009-09-20 at 12:31 -0400, Tom Lane wrote:
> > T1: inserts into index
> > T2: inserts into index
> > T1: checks index for conflicts, finds T2
> > T2: checks index for conflicts, finds T1
> 
> You get a deadlock failure, because both transactions will wait for each
> other.  So what?  It's an error in any case, and you can get a reported
> deadlock in constraint-enforcement scenarios today (conflicting FK
> changes, for instance).

Well, in theory, one of the transactions may have been destined to be
aborted later anyway, and the deadlock detector might kill the wrong
one. But I agree, perhaps I'm over-thinking this one.

Aside: I just realized that my solution to the deadlock problem won't
work with your simpler idea anyway. When reading the index we've long
since lost the information about the specific insert of the specific
command of the other transaction.

I'll make the change.

Regards,Jeff Davis



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: operator exclusion constraints [was: generalized index constraints]
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: FDW-based dblink (WIP)