Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xnzfk-0004Q9-27 for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Nov 2014 00:51:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xnzfj-00085E-7k for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Nov 2014 00:51:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XnFet-0008Vq-0M for pgsql-bugs@postgresql.org; Sat, 08 Nov 2014 23:43:07 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XnFeo-0006x2-QG for pgsql-bugs@postgresql.org; Sat, 08 Nov 2014 23:43:05 +0000 MIME-Version: 1.0 Subject: BUG #11919: Serializable isolation issue: one session seeing writes from another session. To: pgsql-bugs@postgresql.org From: gavin.panella@canonical.com Date: Sat, 08 Nov 2014 23:42:36 +0000 Message-ID: <20141108234236.2524.67434@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 11919 Logged by: Gavin Panella Email address: gavin.panella@canonical.com PostgreSQL version: 9.3.5 Operating system: Ubuntu 12.04 Description: I think I might have found a bug in PostgreSQL 9.3.5 relating to serializable isolation, where code running within a savepoint can see data committed in a second session after the commencement of the first, but that data then "disappears" when the savepoint is rolled-back. Of course, my understanding may be the bug, but here's how to reproduce the effect: 1. Open two psql sessions to the same database. 2. Create an example table: create table things (a int unique); 3. In the first session: begin isolation level serializable; insert into things (a) values (1); Don't commit yet. 4. In the second session: begin isolation level serializable; savepoint one; insert into things (a) values (1); This should hang. 5. In the first session: commit; 6. Go back to the second session. It will have failed with: ERROR: duplicate key value violates unique constraint "things_a_key" DETAIL: Key (a)=(1) already exists. 7. Continue in the second session: rollback to savepoint one; select * from things; You should see: a --- (0 rows) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs