Re: Normal errors codes in serializable transactions

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: Normal errors codes in serializable transactions
Дата
Msg-id 20130509.083458.1838644215501720872.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответ на Normal errors codes in serializable transactions  (Jon Smark <jon.smark@yahoo.com>)
Ответы Re: Normal errors codes in serializable transactions  (Jon Smark <jon.smark@yahoo.com>)
Список pgsql-general
> The manual mentions that SERIALIZABLE transactions may abort with error 40001,
> in which case the client application is supposed to retry the transaction.  I've been
> stress testing an application by issuing lots of concurrent requests, and sure enough,
> every now and then I get back those 40001 errors.  However, sometimes I also get
> back error 40P01.  It seems no ill comes to pass if I also retry those transactions,
> but since this error code is not explicitly mentioned in the manual, one question
> arises: which error codes can be considered "normal" (in the sense it's reasonable
> for the client to retry) when issuing SERIALIZABLE transactions, and which ones
> (within the scope of class 40, of course) are to be considered real errors?

40P01 is mentioned in the manual. See "A. PostgreSQL Error Codes" of
Appendixes.

In most cases it means that transaction is aborted because PostgreSQL
detected deadlock.

Grepping source indicates that part of HOT standby code uses the error
code as well, I'm not sure what is the situation when the error code
is supposed to be generated, however.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: question on most efficient way to increment a column
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_upgrade -u