X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E8331D1B1EC for ; Wed, 23 Jun 2004 18:36:00 -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 65469-08 for ; Wed, 23 Jun 2004 21:36:01 +0000 (GMT) Received: from smtp-out4.xs4all.nl (smtp-out4.xs4all.nl [194.109.24.5]) by svr1.postgresql.org (Postfix) with ESMTP id 3079BD1B1FD for ; Wed, 23 Jun 2004 18:35:57 -0300 (ADT) Received: from uucp1.xs4all.nl (uucp1.xs4all.nl [194.109.21.51]) by smtp-out4.xs4all.nl (8.12.10/8.12.10) with ESMTP id i5NLZw34082052 for ; Wed, 23 Jun 2004 23:35:59 +0200 (CEST) Received: from uucp1.xs4all.nl (localhost [127.0.0.1]) by uucp1.xs4all.nl (8.12.9/8.12.9) with ESMTP id i5NLZwE7089805 for ; Wed, 23 Jun 2004 23:35:58 +0200 (CEST) Received: from ramoth.UUCP (uucp@localhost) by uucp1.xs4all.nl (8.12.9/8.12.9/Submit) with UUCP id i5NLZvDi089804 for postgresql.org!pgsql-admin; Wed, 23 Jun 2004 23:35:57 +0200 (CEST) Received: by ladystrange.bluehorizon.nl id m1BdFOI-000gcbC (Debian Smail-3.2.0.115 2003-Jun-18 #2); Wed, 23 Jun 2004 23:34:46 +0200 (CEST) From: "P.A.M. van Dam " Date: Wed, 23 Jun 2004 23:34:46 +0200 To: pgsql-admin@postgresql.org Subject: How to list what queries are running in postgres? Message-ID: <20040623213446.GA31224@pmg.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/369 X-Sequence-Number: 14029 Hi! I'm looking for a command or method to find out what queries are currently being serviced by the database. Once in a while a query goes berzerk and uses up all CPU. I'd like to find out which query is the culprit and want to kill it off. In Sybase you can get a list of running "processes" within the database and kill the offending one. Is there an equivalent in postgres? Right now we only have the method to shutdown the database en restart it to get rid of the culprit. Thanks in advance! Best regards, Pascal