Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4YBS-0005iS-SS for pgsql-bugs@arkaria.postgresql.org; Fri, 26 Dec 2014 16:56:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y4YBS-0004l1-DZ for pgsql-bugs@arkaria.postgresql.org; Fri, 26 Dec 2014 16:56:14 +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 1Y4YBR-0004kv-Km for pgsql-bugs@postgresql.org; Fri, 26 Dec 2014 16:56:13 +0000 Received: from outmail148093.authsmtp.net ([62.13.148.93]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4YBN-0008W3-6A for pgsql-bugs@postgresql.org; Fri, 26 Dec 2014 16:56:11 +0000 Received: from mail-c235.authsmtp.com (mail-c235.authsmtp.com [62.13.128.235]) by punt14.authsmtp.com (8.14.2/8.14.2) with ESMTP id sBQGu26q083539; Fri, 26 Dec 2014 16:56:02 GMT Received: from alvin.alvh.no-ip.org (client-186-11-243-193.imovil.entelpcs.cl [186.11.243.193] (may be forged)) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id sBQGttZE007703; Fri, 26 Dec 2014 16:55:58 GMT Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id BDD63565; Fri, 26 Dec 2014 13:56:07 -0300 (CLST) Date: Fri, 26 Dec 2014 13:56:07 -0300 From: Alvaro Herrera To: Mark Kirkwood Cc: Andrew Sackville-West , pgsql-bugs@postgresql.org, Paulo Tanimoto Subject: Re: regression, deadlock in high frequency single-row UPDATE Message-ID: <20141226165607.GE1645@alvh.no-ip.org> References: <20140804163027.GI5475@eldon.alvh.no-ip.org> <20141208235552.GZ6930@andrew-ThinkPad-X230> <54868FA2.80003@catalyst.net.nz> <5487B8F2.6050806@catalyst.net.nz> <20141210193314.GZ1768@alvh.no-ip.org> <5488C197.3060900@catalyst.net.nz> <548943C7.2030507@catalyst.net.nz> <20141211130653.GG1768@alvh.no-ip.org> <20141211172256.GB20615@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20141211172256.GB20615@alvh.no-ip.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Server-Quench: 11a7c252-8d20-11e4-b396-002590a15da7 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZcSBoa BzkeAQdJTRslYBtL RB4bawxAL0wMSABN M15eIxoPcUtGGxZ1 VjUUWVRVVE1wX2lw bQBRbUtcakxQXgR0 UkxKXFNbFxptCRse BlBdIHgFM0EsDX5w YkFiXT5cX0F4O0d8 E0kHF2gEeG80amAC UUENcx4GcwpMYx9F aFV2VCIMZDFWYTQC El17DBoMEg5qYD5Y TRsANkkTRkBPVjIx ThwGGj4sVUwDDyUy IBxuJEQRBVscNE4j eUAgX10cPloIDRIW InlhKRN0TwAA X-Authentic-SMTP: 61633235383639.1023:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 186.11.243.193/587 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Pg-Spam-Score: -2.6 (--) 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 Alvaro Herrera wrote: > Alvaro Herrera wrote: > > > I'm going to experiment with that idea and see if it leads to a > > solution. I tried the other idea yesterday (to keep the HW tuple lock > > we acquire in heap_lock_tuple until heap_update is done) but aside from > > being very complicated and bug-prone, it doesn't solve the problem > > anyway. > > Here's a preliminary patch. It does solve the deadlock in my simplified > test case. If Andrew can confirm that it fixes his original problem > too, that'd be good. Pushed this patch to master, 9.4 and 9.3. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs