Question about RI checks

Поиск
Список
Период
Сортировка
От Nick Barnes
Тема Question about RI checks
Дата
Msg-id CAG+WGGnMCPzXhMxOCx9b887xbFMY-=n0NOSjoaHNknsnuSFKSg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Question about RI checks
Список pgsql-hackers
<div dir="ltr">One of the queries in ri_triggers.c has be a little baffled.<br /><br />For (relatively) obvious
reasons,a FK insert triggers a SELECT 1 FROM pk_rel ... FOR KEY SHARE.<br />For not-so-obvious reasons, a PK delete
triggersa SELECT 1 FROM fk_rel ... FOR KEY SHARE.<br /><br />I can't see what the lock on fk_rel achieves. Both
operationsare already contending for the lock on the PK row, which seems like enough to cover every eventuality.<br
/><br/>And even if the lock serves a purpose, KEY SHARE is an odd choice, since the referencing field is, in general,
nota "key" in this sense.<br /><br />Can anyone provide an explanation / counterexample?<br /></div> 

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Review of GetUserId() Usage
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Hide 'Execution time' in EXPLAIN (COSTS OFF)