Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YBTA9-0003U8-Iq for pgsql-bugs@arkaria.postgresql.org; Wed, 14 Jan 2015 18:59:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YBTA8-00022i-W3 for pgsql-bugs@arkaria.postgresql.org; Wed, 14 Jan 2015 18:59:29 +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 1YBTA7-000229-6J for pgsql-bugs@postgresql.org; Wed, 14 Jan 2015 18:59:28 +0000 Received: from nm9-vm3.bullet.mail.ne1.yahoo.com ([98.138.91.139]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YBTA3-00071F-2W for pgsql-bugs@postgresql.org; Wed, 14 Jan 2015 18:59:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s2048; t=1421261961; bh=TQGWjcTZzqTW//aNyCSp4XBx54BrYXy31ScNhxYOucM=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=ev/d6eOChjnIUWjUtg5Cby7NPd9M8giGINw6HJHhourlBqEwNIAOPA9aDIq7mZDlz5imCo0l+IYAbpCheFwzx9FBQdbuyhTlCeyT2xpF4PHmxiw7SGMv0L0rpxHWF142LF2DPPalFEvcL0YEop+Oyx0bup1QmfEP503P+mx7GfETGCUUkP3IdZDWChZDsCtmTClMi+pqfnPgzLCQ6sIbaMFf/Mpogdmlq9KN/j+6MBy6e2LFAeU3tVFQ4wGWY02wPeOxmPVOZ78CpzLWjWYPXuj9FnpYc0qG7juksx40MxvHpW05uwRdbRyeEth0LErB6XkHlJLH160oSWFRviPJfw== Received: from [98.138.101.132] by nm9.bullet.mail.ne1.yahoo.com with NNFMP; 14 Jan 2015 18:59:21 -0000 Received: from [98.138.87.12] by tm20.bullet.mail.ne1.yahoo.com with NNFMP; 14 Jan 2015 18:59:21 -0000 Received: from [127.0.0.1] by omp1012.mail.ne1.yahoo.com with NNFMP; 14 Jan 2015 18:59:21 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 190528.5723.bm@omp1012.mail.ne1.yahoo.com X-YMail-OSG: 1UAW35YVM1l2qChwW.xHYT_ub7OdfdNDPYrVb_TjqpVO1qnMKvHqoWzVQ.xQM1K cT7Wzk6Ko_1EzdlYOqJHPHVDWvsBrQzqOTcqIO3KMF2x3VfDjR8G7leBtdcr0gz8J8RdRGiMSzNd y7ztdsDH87wx9_bjb8BgsObOC5Ngqex5rHwxMxa1qnPEuCO7xQGOxySy2NXc_Zl3pyOEZs0CUmCO VXK5O0cEBKzWklZEnKiJ7ZzgTcWRrCrxMRT7ApiHay1aeC18aWd6pojOEI4oNVAis.kWTMQ0iKRU hCY4.f0KC5vUn2WF7rBDSfSeJeLtOS3Io9f5ljPZXbY8yuvDMvceWn.6mvA1CG7KHOVapmd4soVZ baZI3An8epiHo6FbTqKPROsGT1HA9H6Bxju01WQWWg5L.jOhKj4W3SHzd8wA.Vd8JafDhjHCyWHh QyhUS.ndHTymyO89CmsmRSukZ3ORIErX4xpmJwUOifDLFj3s2AKCvvAc3AyVubGfJ.NALBxXRPEi Xf.T1BywCaT.Y_cOE.4ZUjHFxbRuWxtn72lPfDHPImWKOQ70.xrgOCSSF3ku8ev7_H8n_lWL3QUl agqy4apnBXZJH.Om1ANe95B9ce5TRqdu8VnELaS5.1FGt5jXXAcE3XHd_WKXoEcNBwZOJj1x7y.q yZb55VTUbxiQ8B7OXDDT1NoE3JFv1u6pwu.ZtzBQ- Received: by 98.138.105.204; Wed, 14 Jan 2015 18:59:20 +0000 Date: Wed, 14 Jan 2015 18:59:20 +0000 (UTC) From: Kevin Grittner Reply-To: Kevin Grittner To: "rafael.faria@linx.com.br" , "pgsql-bugs@postgresql.org" Message-ID: <1870555685.702501.1421261960244.JavaMail.yahoo@jws100151.mail.ne1.yahoo.com> In-Reply-To: <20150113233751.2504.81691@wrigleys.postgresql.org> References: <20150113233751.2504.81691@wrigleys.postgresql.org> Subject: =?UTF-8?Q?Re:__BUG_#12538:_Transa=C3=A7=C3=A3o_concorrente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Length: 1774 X-Pg-Spam-Score: -2.0 (--) 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 "rafael.faria@linx.com.br" wrote: [posting quotes as rendered in English by Google translate] > I'm analyst / developer of a system in python running a bank > postgres, and our system has approval only to version 8.4, but > we have clients running smoothly until version 9.0, but any > up version of this is unusable since in many routines > system is generated the error below. > > Traceback (most recent call last): > File "class / base.py", line 318, in update > File "C: \ Python22 \ lib \ site-packages \ lzt \ lztdb.py", line 534, in run > ProgrammingError: ERROR: could not serialize access due to read / write > Among dependencies transactions > > This error did not occur for smaller versions to 9.1, I noticed that you > made changes to the question of how the bank works with the question of > transactions, checked the documentation > http://www.postgresql.org/docs/9.4/static/transaction-iso.html As that documentation mentions, the behavior which was available before 9.1 by choosing either SERIALIZABLE or REPEATABLE READ remains available under REPEATABLE READ in 9.1 and later. Some additional practical examples of differences are available on this Wiki page, which you may want to review before deciding which isolation level you prefer to use: https://wiki.postgresql.org/wiki/SSI For banking applications you might want to pay particular attention to how you are preventing problems like the one in this example: https://wiki.postgresql.org/wiki/SSI#Overdraft_Protection There are certainly ways to handle that without a truly serializable transaction isolation level, but such issues are sometimes missed under less strict levels. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs