Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XzLi9-0003cz-19 for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Dec 2014 08:36:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XzLi7-00046q-TP for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Dec 2014 08:36:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XzLi5-00046h-VQ for pgsql-bugs@postgresql.org; Fri, 12 Dec 2014 08:36:26 +0000 Received: from mail.catalyst.net.nz ([2404:130:0:10::40:0]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XzLhs-0008Bb-70 for pgsql-bugs@postgresql.org; Fri, 12 Dec 2014 08:36:21 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.catalyst.net.nz (Postfix) with ESMTP id F3CDF3223E; Fri, 12 Dec 2014 21:36:05 +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 0cKg4uF25Ytv; Fri, 12 Dec 2014 21:36:05 +1300 (NZDT) Received: from [192.168.1.64] (222-153-244-213.jetstream.xtra.co.nz [222.153.244.213]) (Authenticated sender: mark.kirkwood) by mail.catalyst.net.nz (Postfix) with ESMTPSA id 1EA5B32238; Fri, 12 Dec 2014 21:36:05 +1300 (NZDT) Message-ID: <548AA8F4.3020905@catalyst.net.nz> Date: Fri, 12 Dec 2014 21:36:04 +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: <20140804161205.GA30380@andrew-ThinkPad-X230> <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> In-Reply-To: <20141211172256.GB20615@alvh.no-ip.org> 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 12/12/14 06:22, Alvaro Herrera wrote: > Before this can be committed I need an isolationtester spec file that > reproduces the problem. Now that I understand why it happens it should > be easy to produce: just have a transaction that does BEGIN, then the > insert, and keeps the transaction open; enough other sessions run the > UPDATE until the problem pops up. (Also, comments on > Would_MultiXactIdWait_Block need work.) > FWIW - I was having a look at the isolationtester spec. Playing with the pgbench setup to see the minimal number of session I needed to provoke the deadlock (unpatched 9.5 code) seemed to converge to about 4. I managed to still see 1 deadlock with each session only doing 1 transaction - i.e: $ pgbench -c 4 -C -n -t 1 -f query.sql deadlock ...which resulted in 1 deadlock. So we may be able to get a reasonable test case that shows this up! I'll take a look at setting up a test case later - but don't let that stop you doing it 1st :-) 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