X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3DC095289C for ; Tue, 9 Aug 2005 16:08:22 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 90449-02 for ; Tue, 9 Aug 2005 19:08:10 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 4A84252808 for ; Tue, 9 Aug 2005 16:08:07 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j79J867x018200; Tue, 9 Aug 2005 15:08:06 -0400 (EDT) To: "Joshua D. Drake" Cc: Dan Harris , pgsql-performance@postgresql.org Subject: Re: Table locking problems? In-reply-to: <42F8F717.6030106@commandprompt.com> References: <52CFA236-FC43-4018-B399-1854240110FF@drivefaster.net> <42F8F717.6030106@commandprompt.com> Comments: In-reply-to "Joshua D. Drake" message dated "Tue, 09 Aug 2005 11:33:59 -0700" Date: Tue, 09 Aug 2005 15:08:06 -0400 Message-ID: <18199.1123614486@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200508/90 X-Sequence-Number: 13837 "Joshua D. Drake" writes: > My experience is that when this type of thing happens it is typically > specific queries that cause the problem. If you turn on statement > logging you can get the exact queries and debug from there. > Here are some things to look for: > Is it a large table (and thus large indexes) that it is updating? > Is the query using indexes? > Is the query modifying ALOT of rows? Another thing to look at is foreign keys. Dan could be running into problems with an update on one side of an FK being blocked by locks on the associated rows on the other side. regards, tom lane