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