Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZKTTQ-0003ue-D5 for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Jul 2015 15:40:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZKTTO-0005T9-Rh for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Jul 2015 15:40:50 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZKTTO-0005T2-AQ for pgsql-bugs@postgresql.org; Wed, 29 Jul 2015 15:40:50 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZKTTL-0006yP-NH for pgsql-bugs@postgresql.org; Wed, 29 Jul 2015 15:40:49 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t6TFejm1030589; Wed, 29 Jul 2015 11:40:45 -0400 From: Tom Lane To: bobby.rullo@coreos.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #13524: Not Getting expected Serialization error In-reply-to: <20150728204530.25042.78768@wrigleys.postgresql.org> References: <20150728204530.25042.78768@wrigleys.postgresql.org> Comments: In-reply-to bobby.rullo@coreos.com message dated "Tue, 28 Jul 2015 20:45:30 -0000" Date: Wed, 29 Jul 2015 11:40:45 -0400 Message-ID: <30588.1438184445@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) 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 bobby.rullo@coreos.com writes: > To reproduce: > 1) execute statements in sequence 1 on a connection, stopping at the > "--EXECUTE" statement. > 2) In another connection, execute all the statements in Sequence 2. > 3) Back in the first connection execute the remaining statement (the > "commit;") > Expected: > error when trying to commit, eg. "ERROR: could not serialize" > Actual: > Both commits succeed. > Interesting tidbit: > If you do the exact steps as above but uncomment the "select count(*)" in > sequence 2, you get the expected error. This seems perfectly fine to me. Without the "select count(*)" in transaction 2, there is a valid serialization of the transactions, ie t1 before t2. Serializability is *not* defined as "the transactions appear to have executed in the order they were started (or committed)". It is defined as "there is some consistent order in which they appear to have executed". regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs