Re: Handling transaction failure due to concurrency errors

Поиск
Список
Период
Сортировка
От Christopher BROWN
Тема Re: Handling transaction failure due to concurrency errors
Дата
Msg-id CAHL_zcN5n+EzDT8wfdbbgU=0yqThGgDEh94LBC+a9yjQvW=Cow@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Handling transaction failure due to concurrency errors  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Handling transaction failure due to concurrency errors
Список pgsql-jdbc
Tom,

That's what I was looking for, so thanks, I'll give it a go.

Best regards,
Christopher



On 2 March 2018 at 16:21, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Christopher BROWN <brown@reflexe.fr> writes:
> Thanks for the quick reply.  OK for the explanation, and I don't mind
> implementing the retry logic for this case... I just don't know how to
> detect when my code encounters this case (as opposed to other cases that
> can arise, such as unresolved foreign keys when importing data; I don't
> want to get into an infinite retry loop because it will never work in these
> other cases).

Yes, you should only retry in this way for the specific case of a
serialization failure (SQLSTATE 40001).

                        regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Handling transaction failure due to concurrency errors
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: MyBatis Batch Update Leads to PSQLException "Too many updateresults were returned"