Re: Normal errors codes in serializable transactions - Mailing list pgsql-general

From Jon Smark
Subject Re: Normal errors codes in serializable transactions
Date
Msg-id 1368097332.36821.YahooMailNeo@web121004.mail.ne1.yahoo.com
Whole thread Raw
In response to Re: Normal errors codes in serializable transactions  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-general
Hi,

> In PostgreSQL, 40001 is used for serialization failures due to MVCC

> issues, and 40P01 is used for serialization failures due to
> deadlocks.  I think that many years back when PostgreSQL moved to
> MVCC it was judged important to differentiate between them with
> different SQLSTATE values because deadlocks tend to be somewhat
> more problematic.  Had I been involved with PostgreSQL at the time,
> I would have argued the value of staying with the standard
> serialization failure SQLSTATE (40001) for both, but it is unlikely
> to be changed at this point.  From the application perspective,
> both can (and generally should) be treated as meaning that there
> was nothing wrong with the transaction in itself; it only failed
> because of conflicts with one or more concurrent transactions and
> is likely to succeed if retried from the start.

Thank you very much for the prompt and informative reply!
That clears up my doubt.  For future reference: both 40001
and 40P01 are "normal" errors when issuing SERIALIZABLE
transactions in a concurrent setting...

Best,
Jon



pgsql-general by date:

Previous
From: Jon Smark
Date:
Subject: Re: Normal errors codes in serializable transactions
Next
From: itishree sukla
Date:
Subject: Views