Re: How to handle failed COMMIT - Mailing list pgsql-general

From Håvar Nøvik
Subject Re: How to handle failed COMMIT
Date
Msg-id 094c9333-d7f5-4294-961a-54a0cd90b612@www.fastmail.com
Whole thread Raw
In response to Re: How to handle failed COMMIT  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
> Correct, the client did not get confirmation of commit success so it must operate as if it failed.

I mean that’s the point, the client can’t operate as if it failed. It must operate as the state is unknown. But maybe that’s the correct application behaviour, just that I haven’t thought this through previously.

/Håvar Nøvik

On Tue, Jul 19, 2022, at 16:12, David G. Johnston wrote:
On Monday, July 18, 2022, Håvar Nøvik <havar@novik.email> wrote:

try
   execute transactional sql
catch (commit failed)
   if (data is not stored)
     // regard data as not stored

Correct, the client did not get confirmation of commit success so it must operate as if it failed.

David J. 

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql 10.19 : "ERROR: cannot convert infinity to numeric" except there is no infinity
Next
From: "David G. Johnston"
Date:
Subject: Re: How to handle failed COMMIT