Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YYP78-0005m2-4P for pgsql-bugs@arkaria.postgresql.org; Thu, 19 Mar 2015 01:19:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YYP76-00063s-W6 for pgsql-bugs@arkaria.postgresql.org; Thu, 19 Mar 2015 01:19:09 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YYP75-00063l-Ux for pgsql-bugs@postgresql.org; Thu, 19 Mar 2015 01:19:08 +0000 Received: from smtp106.iad3a.emailsrvr.com ([173.203.187.106]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YYP6y-00060n-Oe for pgsql-bugs@postgresql.org; Thu, 19 Mar 2015 01:19:06 +0000 Received: from smtp30.relay.iad3a.emailsrvr.com (localhost.localdomain [127.0.0.1]) by smtp30.relay.iad3a.emailsrvr.com (SMTP Server) with ESMTP id 6E645380399 for ; Wed, 18 Mar 2015 21:18:59 -0400 (EDT) Received: by smtp30.relay.iad3a.emailsrvr.com (Authenticated sender: hurshjain-AT-beesell.com) with ESMTPSA id 42393380381 for ; Wed, 18 Mar 2015 21:18:59 -0400 (EDT) X-Sender-Id: hurshjain@beesell.com Received: from [192.168.1.11] (pool-98-114-164-232.phlapa.east.verizon.net [98.114.164.232]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA) by 0.0.0.0:465 (trex/5.4.2); Thu, 19 Mar 2015 01:18:59 GMT Message-ID: <550A2400.8090201@beesell.com> Date: Wed, 18 Mar 2015 21:18:56 -0400 From: Hursh Jain User-Agent: Postbox 3.0.11 (Macintosh/20140602) MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: postgres 9.3.6, serialize error with two independent, serially consistent transactions.. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) 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 In the example below, client #1 and client #2 are not doing anything that can possibly cause a inconsistent serial order of execution. You can pick and choose whichever one you want to run first, the final result will be 100% consistent and exactly the same, either way. So why does postgres 9.3.6 give an error to the second client ? Unless I am reading this docs wrong, this looks like a major bug. Best, -H =============== Initial setup ========== test# create table test (id int, value text); CREATE TABLE test# insert into test (id, value) values (1, 'a'); INSERT 0 1 =============== Client #1 ========== test# BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; BEGIN test# select * from test where id = 1; id | value ----+------- 1 | a (1 row) test=# insert into test (id, value) values (1, 'b'); INSERT 0 1 test=# commit; COMMIT ========== Client #2 (concurrently with client #1) ========== test# BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; BEGIN test# select * from test where id = 2; id | value ----+------- (0 rows) test# insert into test (id, value) values (2, 'xxx'); INSERT 0 1 test# commit; ERROR: could not serialize access due to read/write dependencies among transactions DETAIL: Reason code: Canceled on identification as a pivot, during commit attempt. HINT: The transaction might succeed if retried. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs