pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rlowe@pablowe.net
To: pgsql-bugs@postgresql.org
Subject: BUG #6497: Error sent to client, but data written anyway
Date: Tue, 28 Feb 2012 16:23:58 +0000
Message-ID: <E1S2PqI-0000DP-5q@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      6497
Logged by:          Ryan Lowe
Email address:      rlowe@pablowe.net
PostgreSQL version: 9.1.3
Operating system:   Linux
Description:        

There is an edge case where Postgres will return an error to the client, but
commit the operation anyway, thus breaking the contract with the client:

postgres=# begin; insert into s.t (c) values (1);
<postgres process core dumps (note that the forked processes were not
affected)>
postgres=# commit;
<this returns an error to the application>
<postgress process restarts>
The data is now on both the master and slave, but the application
believes that the transaction was rolled back.  A well-behaved
application will dutifully retry the transaction because it *should*
have rolled back.  However, the data is there so we'll have had the
transaction execute *twice*.




view thread (11+ messages)  latest in thread

Message-ID: <E1S2PqI-0000DP-5q@wrigleys.postgresql.org>
Permalink:  ../E1S2PqI-0000DP-5q@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/E1S2PqI-0000DP-5q@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: rlowe@pablowe.net
  Subject: Re: BUG #6497: Error sent to client, but data written anyway
  In-Reply-To: <E1S2PqI-0000DP-5q@wrigleys.postgresql.org>
  References: <E1S2PqI-0000DP-5q@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox