Re: Unique constraint error instead of serialization_failure

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Unique constraint error instead of serialization_failure
Дата
Msg-id CA+hUKG+YrObyris4OuuZyXPqWdmwge32-VYbnMr4Zvi4rUnxHQ@mail.gmail.com
обсуждение исходный текст
Ответ на Unique constraint error instead of serialization_failure  (Benny Kramek <benny@medflyt.com>)
Ответы Re: Unique constraint error instead of serialization_failure
Список pgsql-bugs
On Thu, May 21, 2020 at 9:24 AM Benny Kramek <benny@medflyt.com> wrote:
> Tested PostgreSQL versions: 10.7, 12.2
>
> Hello, I have found an example where I expect to get a serialization failure
> error, but instead receive a unique constraint error. My understanding is that
> this is not supposed to happen starting with PostgreSQL version 9.6 because of
> this patch:
>
> <https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=fcff8a575198478023ada8a48e13b50f70054766>

Agreed.  Thanks for the test case.  I hope to look into this in a few
days, but as a kind of Post-It note to remind me, here is your test
case in the form of an isolation test.  Clearly it hasn't quite formed
the dangerous structure at the point the UCV is raised.  Perhaps where
that commit added the extra CheckForSerializableConflictIn() call, it
also needs to ask the table AM to do the same sort of thing for its
tuple?  Not sure without doing some digging.  That'd be similar to
(but not the same as) the AM-assisted SSI checks I contemplated to
make this work for exclude constraints too.

https://www.postgresql.org/message-id/flat/CAMTXbE-sq9JoihvG-ccC70jpjMr%2BDWmnYUj%2BVdnFRFSRuaaLZQ%40mail.gmail.com

Вложения

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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16454: Mixed isolation levels inside transactions
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: BUG #16454: Mixed isolation levels inside transactions