X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A04A3475EDF for ; Wed, 14 May 2003 13:46:08 -0400 (EDT) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with ESMTP id 11978-01 for ; Wed, 14 May 2003 13:46:07 -0400 (EDT) Received: from mail.libertyrms.com (unknown [209.167.124.227]) by postgresql.org (Postfix) with ESMTP id E6584475A4B for ; Wed, 14 May 2003 13:46:06 -0400 (EDT) Received: from [10.1.2.130] (helo=dba2) by mail.libertyrms.com with esmtp (Exim 3.22 #3 (Debian)) id 19G0KM-0003zW-00 for ; Wed, 14 May 2003 13:46:06 -0400 Received: by dba2 (Postfix, from userid 1019) id 65069D087; Wed, 14 May 2003 13:46:06 -0400 (EDT) Date: Wed, 14 May 2003 13:46:06 -0400 From: Andrew Sullivan To: pgsql-admin@postgresql.org Subject: Re: database running slow Message-ID: <20030514174606.GR20729@libertyrms.info> Mail-Followup-To: Andrew Sullivan , pgsql-admin@postgresql.org References: <20030513121419.GC17278@libertyrms.info> <20030513171955.37103.qmail@web21101.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030513171955.37103.qmail@web21101.mail.yahoo.com> User-Agent: Mutt/1.5.3i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/181 X-Sequence-Number: 8743 On Tue, May 13, 2003 at 10:19:55AM -0700, Shankar K wrote: > > Define "run-away". You can look for long-running > transactions; that might be helpful. > > ++ i meant a backend process taking most of the cpu > cycles and running for ever. so i wanted to figure out > what those processes were doing and what made them to > hog the cpu cycles. You can use the pid of a process to look it up in the system tables. There's no simple way to identify long-running ones, except to look for back ends that have been hanging around for a long time (but if you're using pooling, it won't help you). Tools like top will be helpful in identifying processor hogs. > ++ how to identify those queries. once i have the If you can identify the process, then you can identify the pid, and use the pid in the stats tables to get the query. A -- ---- Andrew Sullivan 204-4141 Yonge Street Liberty RMS Toronto, Ontario Canada M2P 2A8 +1 416 646 3304 x110