Re: Documenting when to retry on serialization failure

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Documenting when to retry on serialization failure
Дата
Msg-id 2968200.1648133782@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Documenting when to retry on serialization failure  (Simon Riggs <simon.riggs@enterprisedb.com>)
Ответы Re: Documenting when to retry on serialization failure  (Simon Riggs <simon.riggs@enterprisedb.com>)
Список pgsql-hackers
Simon Riggs <simon.riggs@enterprisedb.com> writes:
> OK, I see what you mean. There are 2 types of transaction, one that
> reads inside the transaction, one that decides what value to use some
> other way.

> So now we have 2 cases, both of which generate uniqueness violations,
> but only one of which might succeed if retried. The patch does cover
> this, I guess, by saying be careful, but I would be happier if we can
> also add

> "this is thought to occur only with multiple unique constraints and/or
> an exclusion constraints"

Um, what's that got to do with it?  The example in 
read-write-unique-4.spec involves only a single pkey constraint.

We could add something trying to explain that if the application inserts a
value into a constrained column based on data it read earlier, then any
resulting constraint violation might be effectively a serialization
failure.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Remove an unnecessary errmsg_plural in dependency.c
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Remove an unnecessary errmsg_plural in dependency.c