X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 873BC9F9F3D for ; Sun, 28 May 2006 14:56:14 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 43983-08 for ; Sun, 28 May 2006 14:56:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) by postgresql.org (Postfix) with ESMTP id C7A359FA42B for ; Sun, 28 May 2006 14:56:08 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1FkPUY-0008IJ-00; Sun, 28 May 2006 13:55:54 -0400 To: Tom Lane Cc: Greg Stark , Brendan Duddridge , PostgreSQL Performance Subject: Re: App very unresponsive while performing simple update References: <961F6F02-4B00-494C-B071-6DF76A305C14@clickspace.com> <21B15664-F4EE-462C-88B4-EEEB2B4A979F@clickspace.com> <874pzanvk6.fsf@stark.xeocode.com> <17733.1148832292@sss.pgh.pa.us> In-Reply-To: <17733.1148832292@sss.pgh.pa.us> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 28 May 2006 13:55:54 -0400 Message-ID: <87slmum3th.fsf@stark.xeocode.com> Lines: 17 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/507 X-Sequence-Number: 19294 Tom Lane writes: > Greg Stark writes: > > What queries are those two processes executing? And what foreign keys do you > > have on the product table or elsewhere referring to the product table? And > > what indexes do you have on those columns? > > And what PG version is this? Alvaro fixed the > foreign-keys-take-exclusive-locks problem in 8.1 ... Except I don't think this is taking an exclusive lock at all. The original post had the deadlock detection fire on a SharedLock. I think the other process is also an update and is holding an exclusive lock while also trying to acquire a SharedLock for a foreign key column. -- greg