Re: Access to transaction status - Mailing list pgsql-hackers

From Christian Plattner
Subject Re: Access to transaction status
Date
Msg-id 00e101c33704$c6811110$6e828481@ethz.ch
Whole thread Raw
In response to Re: Access to transaction status  ("Christian Plattner" <postgresql@sioux.ch>)
Responses Re: Access to transaction status
List pgsql-hackers
----- Original Message ----- 
From: "Jeroen T. Vermeulen" <jtv@xs4all.nl>

> > I see a race condition in this approach: if you reconnect too fast, and
the
> > backend which actually should commit is still in progress (assume it
takes a
> > while to commit for whatever reasons) you get the impression that it did
not
> > commit - and a short time later the backend will commit... (before
noticing
> > that the client connection was lost).
>
> Good point.  So far I assumed that a broken connection would take a while
> to repair.  OTOH by the time TCP gives up due to a bad network connection,
> wouldn't the server reach the same conclusion?
>

Well, I wouldn't rely solely on TCP when assuring consistency. Also, I don't
think that the backend will ever inspect its TCP socket while committing.

btw: There could be also other reasons for the client to loose the
connection (i.e. client process crashes).

- Christian



pgsql-hackers by date:

Previous
From: "Jeroen T. Vermeulen"
Date:
Subject: Re: Access to transaction status
Next
From: "Nigel J. Andrews"
Date:
Subject: Re: Two weeks to feature freeze