Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XyDpL-0002HQ-UP for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Dec 2014 05:59:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XyDpL-0003Fn-E3 for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Dec 2014 05:59:15 +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 1XyDpK-0003Ec-EF for pgsql-bugs@postgresql.org; Tue, 09 Dec 2014 05:59:14 +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 1XyDpC-00089O-OS for pgsql-bugs@postgresql.org; Tue, 09 Dec 2014 05:59:12 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.catalyst.net.nz (Postfix) with ESMTP id B222F32243; Tue, 9 Dec 2014 18:58:59 +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 VPEoDr3izhw6; Tue, 9 Dec 2014 18:58:58 +1300 (NZDT) Received: from [192.168.1.64] (122-62-82-114.jetstream.xtra.co.nz [122.62.82.114]) (Authenticated sender: mark.kirkwood) by mail.catalyst.net.nz (Postfix) with ESMTPSA id 795CC31E56; Tue, 9 Dec 2014 18:58:58 +1300 (NZDT) Message-ID: <54868FA2.80003@catalyst.net.nz> Date: Tue, 09 Dec 2014 18:58:58 +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 , pgsql-bugs@postgresql.org, Paulo Tanimoto Subject: Re: regression, deadlock in high frequency single-row UPDATE References: <20140731233051.GN17765@andrew-ThinkPad-X230> <20140801005950.GF5475@eldon.alvh.no-ip.org> <20140804161205.GA30380@andrew-ThinkPad-X230> <20140804163027.GI5475@eldon.alvh.no-ip.org> <20141208235552.GZ6930@andrew-ThinkPad-X230> In-Reply-To: <20141208235552.GZ6930@andrew-ThinkPad-X230> 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 09/12/14 12:55, Andrew Sackville-West wrote: > Some months later (stupid business priorities...) we have something to > report on this. We have been able to produce a minimal schema to > demonstrate the problem, and successfully induced the deadlock using > pgbench (thanks to Paulo Tanimoto, cc-ed here). > > Please see: > > https://gist.github.com/andrewsw-janrain/40d1687db013b1e7c3b3 > > for detailed instructions on how to trigger the deadlock. > > I would be thrilled to learn that we've done something wrong here, > otherwise I think this represents a regression introduced in 9.3. > > That is interesting - FWIW I can reproduce: - 9.2.9 no deadlock - 9.4rc1 many deadlocks so something has changed after 9.2 for sure! Just mucking about I changed certain things in your schema setup (removed ON DELETE CASCADE, use CURRENT_TIMESTAMP instead of now()...lessen the use of DEFAULT)...however still seeing deadlocks in 9.4, so at least it is easy to reproduce! Regards Mark -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs