Re: Question about RI checks

Поиск
Список
Период
Сортировка
От Florian Pflug
Тема Re: Question about RI checks
Дата
Msg-id 05D9F5C7-36C5-4A8B-AE8C-D77B247D10A8@phlo.org
обсуждение исходный текст
Ответ на Re: Question about RI checks  (Kevin Grittner <kgrittn@ymail.com>)
Ответы Re: Question about RI checks
Список pgsql-hackers
> This should not be considered a problem for repeatable read
> transactions because the change in visible rows meet the definition
> of phantom reads, which are allowed in repeatable read: "A
> transaction re-executes a query returning a set of rows that
> satisfy a search condition and finds that the set of rows
> satisfying the condition has changed due to another
> recently-committed transaction."

Now I'm confused. Isn't the whole point of REPEATABLE READ to provide, well, repeatable reads? Also, note that after
theDELETE FROM parent, further SELECTS in the same transaction will use the original snapshot again, und thus will see
theconflicting child rows again that were ignored by the RI trigger. But they won't, of course, see the parent row. 

IOW, transaction A will, after the delete, see a state of the database in which the PK constraint is broken. I don't
thinkthat's acceptable in any isolation level. 

Best regards,
Florian Pflug


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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: idea: allow AS label inside ROW constructor
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: Question about RI checks