Robert Haas <> wrote:

> If the connection is closed after the client sends a COMMIT and
> before it gets a response, then the client must indeed be smart
> enough to figure out whether or not the commit happened.  But if
> the server sends a response, the client should be able to rely on
> that response being correct.  In this case, an ERROR is getting
> sent but the transaction is getting committed; yuck.  I'm not
> sure whether the fix is right, but this definitely seems like a
> bug.


It is one thing to send a request and experience a crash or loss of
connection before a response is delivered.  You have to consider
that the state of the transaction is indeterminate and needs to be
checked.  But if the client receives a response saying that the
commit was successful, or that the transaction was rolled back,
that had better reflect reality; otherwise it is a clear bug.

Kevin Grittner
The Enterprise PostgreSQL Company

Sent via pgsql-hackers mailing list (
To make changes to your subscription:

Reply via email to