SQLSTATE when PostgreSQL crashes during COMMIT statement

From: "Takahashi, Ryohei" <r(dot)takahashi_2(at)jp(dot)fujitsu(dot)com>
To: "'pgsql-general(at)lists(dot)postgresql(dot)org'" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: SQLSTATE when PostgreSQL crashes during COMMIT statement
Date: 2019-04-15 02:10:45
Message-ID: EE586BE92A4AFB45B03310C2A0C0565D7BB6B2F2@G01JPEXMBKW03
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

If application executes COMMIT statement and COMMIT failes because of PostgreSQL crash,
it is unknown whether the transaction is really committed.

Therefore, I think application should check the transaction is really committed after a while when certain SQLSTATE is returned.
Which SQLSTATE should application check? Or, is there any document which is written about this?

In my observation, ecpg returns '57P02' and libpq returns 'null' when PostgreSQL crashes during COMMIT statement.
Any other SQLSTATE?

Regards,
Ryohei Takahashi

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igor Korot 2019-04-15 04:20:09 Compilation fails with Solaris Studio 12.6
Previous Message Laura Smith 2019-04-14 19:40:01 Re: Where to find postgresql libs in the APT repo ?