Re: referential Integrity and SHARE locks

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: referential Integrity and SHARE locks
Дата
Msg-id 9067.1170963218@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: referential Integrity and SHARE locks  (Marc Munro <marc@bloodnok.com>)
Ответы Re: referential Integrity and SHARE locks
Список pgsql-hackers
Marc Munro <marc@bloodnok.com> writes:
> Yes in this case, T1 must abort because the record it was going to
> update has disappeared from underneath it.  I don't see how this is
> significantly different from the same race for the record if the table
> had no RI constraints.  The only difference that I can see, is that T1
> now has some locks that it must relinquish as the transaction aborts.

No, the difference is there would have been no error at all before;
if the record were deleted before T1 got to it then it wouldn't have
attempted to update it.  I really don't think you can make it work
to perform updates or deletes on a record you have not yet locked.
        regards, tom lane


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: FreeBSD 6.2 ./configure plays oddly when building 8.2.2 from tarball
Следующее
От: "Andrew Hammond"
Дата:
Сообщение: Re: FreeBSD 6.2 ./configure plays oddly when building 8.2.2 from tarball