Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 7E1941337B85 for ; Tue, 30 Nov 2010 12:53:07 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 39571-05 for ; Tue, 30 Nov 2010 16:53:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 2EDF91335B36 for ; Tue, 30 Nov 2010 12:53:00 -0400 (AST) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Tue, 30 Nov 2010 10:52:59 -0600 Message-Id: <4CF4D7850200002500037F87@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Tue, 30 Nov 2010 10:52:53 -0600 From: "Kevin Grittner" To: "bakkiya" , Subject: Re: postgresql statements are waiting References: <1291117080292-3285939.post@n5.nabble.com> In-Reply-To: <1291117080292-3285939.post@n5.nabble.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/412 X-Sequence-Number: 41436 bakkiya wrote: > I am working on a performance issue with a partitioned table. Some > of my sql statements against this partition table is in waiting > state for long time. I have queried waiting=true in > pg_stat_activity. Now, is there a way to find out which sql is > making other statements to wait. You probably need to take a look at pg_locks for details. If you combine information from pg_locks, pg_stat_activity, and pg_class, you can get a pretty good idea what's up. -Kevin