Normal errors codes in serializable transactions

From: Jon Smark <jon(dot)smark(at)yahoo(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Normal errors codes in serializable transactions
Date: 2013-05-08 23:03:45
Message-ID: 1368054225.16633.YahooMailNeo@web121004.mail.ne1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

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?

Thanks in advance!
Best,
Jon

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2013-05-08 23:30:21 Re: question on most efficient way to increment a column
Previous Message Gavin Flower 2013-05-08 21:47:58 Re: Does it make sense to break a large query into separate functions?