From: Tom Lane <tgl@sss.pgh.pa.us>
To: Siddharth Jain <siddhsql@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Transaction Rollback errors
Date: Tue, 11 Apr 2023 22:23:37 -0400
Message-ID: <751896.1681266217@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPqV3pT0RrxLSxtzo62fZ-TXpm7Uj63Ve4AxGg7+emNz7wWmbw@mail.gmail.com>
References: <CAPqV3pT0RrxLSxtzo62fZ-TXpm7Uj63Ve4AxGg7+emNz7wWmbw@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, siddhsql@gmail.com
Subject: Re: Transaction Rollback errors
In-Reply-To: <751896.1681266217@sss.pgh.pa.us>
References: <CAPqV3pT0RrxLSxtzo62fZ-TXpm7Uj63Ve4AxGg7+emNz7wWmbw@mail.gmail.com> <751896.1681266217@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox