Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 34D1E1337B4F for ; Wed, 17 Nov 2010 13:38:14 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 02026-01 for ; Wed, 17 Nov 2010 17:38:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from glacier.frostconsultingllc.com (glacier.frostconsultingllc.com [69.36.227.170]) by mail.postgresql.org (Postfix) with ESMTP id C38721337B58 for ; Wed, 17 Nov 2010 13:38:06 -0400 (AST) Received: from dsl081-245-111.sfo1.dsl.speakeasy.net ([64.81.245.111] helo=[192.168.1.118]) by glacier.frostconsultingllc.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.69) (envelope-from ) id 1PIlxK-0000B9-4c for pgsql-performance@postgresql.org; Wed, 17 Nov 2010 09:38:05 -0800 Message-ID: <4CE412F4.4090101@agliodbs.com> Date: Wed, 17 Nov 2010 09:37:56 -0800 From: Josh Berkus User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9pre) Gecko/20100217 Shredder/3.0.3pre MIME-Version: 1.0 To: postgres performance list Subject: Anyone seen this kind of lock pileup? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201011/289 X-Sequence-Number: 41313 All, Having an interesting issue on one 8.4 database. Due to poor application design, the application is requesting 8-15 exclusive (update) locks on the same row on parallel connections pretty much simultaneously (i.e. < 50ms apart). What's odd about this is that the resulting "lock pileup" takes a mysterious 2-3.5 seconds to clear, despite the fact that none of the connections are *doing* anything during that time, nor are there deadlock errors. In theory at least, the locks should clear out in reverse order in less than a second; none of the individual statements takes more than 10ms to execute. Has anyone else seen something like this? Any idea what causes it? -- -- Josh Berkus PostgreSQL Experts Inc. http://www.pgexperts.com