Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xzyrh-0005wd-G0 for pgsql-bugs@arkaria.postgresql.org; Sun, 14 Dec 2014 02:24:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xzyrh-0004HT-12 for pgsql-bugs@arkaria.postgresql.org; Sun, 14 Dec 2014 02:24:57 +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 1Xzyrg-0004HN-Aa for pgsql-bugs@postgresql.org; Sun, 14 Dec 2014 02:24:56 +0000 Received: from mail.catalyst.net.nz ([2404:130:0:10::40:0]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xzyra-0004sK-VL for pgsql-bugs@postgresql.org; Sun, 14 Dec 2014 02:24:53 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.catalyst.net.nz (Postfix) with ESMTP id AE5B932079; Sun, 14 Dec 2014 15:24:48 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at catalyst.net.nz Received: from mail.catalyst.net.nz ([127.0.0.1]) by localhost (bertrand.catalyst.net.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bcU0+xi5p2qD; Sun, 14 Dec 2014 15:24:47 +1300 (NZDT) Received: from [192.168.1.64] (122-60-157-10.jetstream.xtra.co.nz [122.60.157.10]) (Authenticated sender: mark.kirkwood) by mail.catalyst.net.nz (Postfix) with ESMTPSA id A7ABE3206E; Sun, 14 Dec 2014 15:24:47 +1300 (NZDT) Message-ID: <548CF4EF.9090104@catalyst.net.nz> Date: Sun, 14 Dec 2014 15:24:47 +1300 From: Mark Kirkwood User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Alvaro Herrera CC: Andrew Sackville-West , pgsql-bugs@postgresql.org, Paulo Tanimoto Subject: Re: regression, deadlock in high frequency single-row UPDATE 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> <20141212215752.GF1768@alvh.no-ip.org> <548CF449.9080402@catalyst.net.nz> In-Reply-To: <548CF449.9080402@catalyst.net.nz> Content-Type: text/plain; charset=windows-1252; 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 On 14/12/14 15:22, Mark Kirkwood wrote: > On 13/12/14 10:57, Alvaro Herrera wrote: >> 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. >> >> Here's a finished version of this patch, which I messed a bit with and >> so needs some extra testing. I want to push this shortly and backpatch >> to 9.4 and 9.3. I don't want to disrupt the 9.4.0 release next week, >> but it'd be nice not to ship it with this bug. >> > > This patch seems good too. I'm possibly seeing it performing slightly > slower than the previous patch (approx 68 tps vs 63 on average - > completely untuned 9.5 running on a single SATA drive, but that could > just be natural variation/noise). > Blast - and forgot to clarify that "seems good" means I've tested it against both your and Andrew's deadlock producing schema (no deadlocks with this patch applied)... Cheers Mark -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs