Re: Partitioning/inherited tables vs FKs

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Partitioning/inherited tables vs FKs
Дата
Msg-id 4BE91E450200002500031507@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: Partitioning/inherited tables vs FKs  (Nicolas Barbier <nicolas.barbier@gmail.com>)
Список pgsql-hackers
Nicolas Barbier <nicolas.barbier@gmail.com> wrote:
>>>>>>> Switch to T1:
> 
> 1> COMMIT; -- Commit the insertion...
> COMMIT
> 
>>>>>>> T2 continues:
> 
> DELETE 1
> T2> COMMIT; -- Commit the deletion of a with i = 1.
> COMMIT
> T2> SELECT * FROM b EXCEPT SELECT * FROM a;
>  a_id
> ------
>     1
> (1 Zeile)
> 
> Woops.
This is exactly the sort of issue for which true serializable
behavior will provide a solution.  I will be offering a patch to
implement that for 9.1 once 9.0 settles down.  FWIW when you commit
T1, the patched code rolls back T2 with this message:
T2> DELETE FROM a WHERE i = 1;
ERROR:  could not serialize access due to read/write dependencies
among transactions
HINT:  The transaction might succeed if retried.
Thanks for the example; I will it to the others.
-Kevin


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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: List traffic
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: List traffic