Re: Avoiding deadlocks ...

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Avoiding deadlocks ...
Дата
Msg-id 4C6E56960200002500034980@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: Avoiding deadlocks ...  (Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>)
Ответы Re: Avoiding deadlocks ...  (Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>)
Список pgsql-hackers
Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi> wrote:
> I think truly serializable transactions still need to SELECT FOR
> SHARE here for foreign keys to work, no?
That depends on how you look at it.  The SSI patch that Dan and I
have been working on doesn't attempt to change the implementation
techniques for foreign keys, because SSI only enforces integrity
among serializable transactions -- and we want foreign keys to be
enforced regardless of the transaction isolation levels used.
When writing queries which will be run at the serializable isolation
level, if you are only concerned with anomalies from interaction
with other serializable transactions, you *never* have to explicitly
code SELECT FOR SHARE or SELECT FOR UPDATE, nor do you ever need to
explicitly request a lock; so from that perspective the answer to
the question is "No."  Under the covers, PostgreSQL will continue to
use existing techniques for enforcing referential integrity defined
by foreign keys; so from that perspective the answer to the question
is "Yes."
Hopefully that made sense....
-Kevin


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

Предыдущее
От: Euler Taveira de Oliveira
Дата:
Сообщение: Re: SQLSTATE of notice PGresult
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Deadlock bug