Transaction Rollback errors

Started by Siddharth Jainalmost 3 years ago2 messagesgeneral
Jump to latest
#1Siddharth Jain
siddhsql@gmail.com

Hi All,

when my application (Node.js) receives a class 40 error:

Class 40 — Transaction Rollback
40000 transaction_rollback
40002 transaction_integrity_constraint_violation
40001 serialization_failure
40003 statement_completion_unknown
40P01 deadlock_detectedthen does it mean PG has already rolled back the tx
and therefore I should not attempt to roll it back again? Thanks,

S.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Siddharth Jain (#1)
Re: Transaction Rollback errors

Siddharth Jain <siddhsql@gmail.com> writes:

when my application (Node.js) receives a class 40 error:

Class 40 — Transaction Rollback
40000 transaction_rollback
40002 transaction_integrity_constraint_violation
40001 serialization_failure
40003 statement_completion_unknown
40P01 deadlock_detectedthen does it mean PG has already rolled back the tx
and therefore I should not attempt to roll it back again? Thanks,

No, treat these the same as any other error.

regards, tom lane