RE: SQLSTATE when PostgreSQL crashes during COMMIT statement - Mailing list pgsql-general

From Takahashi, Ryohei
Subject RE: SQLSTATE when PostgreSQL crashes during COMMIT statement
Date
Msg-id EE586BE92A4AFB45B03310C2A0C0565D7BB6BB90@G01JPEXMBKW03
Whole thread Raw
In response to Re: SQLSTATE when PostgreSQL crashes during COMMIT statement  (Andreas Kretschmer <andreas@a-kretschmer.de>)
Responses Re: SQLSTATE when PostgreSQL crashes during COMMIT statement  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi Francisco and Andreas,


Thank you for your reply.

> So, if the library gives you an error ( "I have not received the commit
> confirmation" , not something like "commit failed" ), you will still
> need to test the data, if you can, to know how the server come back up.

Yes.
I want to know what error does library give to the application on such case.
I supposed it is certain SQLSTATE.


> since pg10 you can use check the status of a transaction, here is a 
> explanation:
> https://blog.2ndquadrant.com/postgresql-10-transaction-traceability/

Thank you for the information.
According to the page and the PostgreSQL documentation of txid_status(),
the application should look up the transaction's completion status when the connection is lost,
not when certain SQLSTATE is given, right?


Regards,
Ryohei Takahashi


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: PG10 declarative partitioning that allow null value
Next
From: Raghavendra Rao J S V
Date:
Subject: Error while using pg_dump