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 1FDA6D1BAF8 for ; Fri, 25 Jun 2004 16:37:56 -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 74969-02 for ; Fri, 25 Jun 2004 19:37:54 +0000 (GMT) Received: from smtp-out1.xs4all.nl (smtp-out1.xs4all.nl [194.109.24.11]) by svr1.postgresql.org (Postfix) with ESMTP id 2628FD1BAA5 for ; Fri, 25 Jun 2004 16:37:49 -0300 (ADT) Received: from faranth.bluehorizon.nl (pmg.xs4all.nl [80.127.73.103]) by smtp-out1.xs4all.nl (8.12.10/8.12.10) with ESMTP id i5PJbokh042859 for ; Fri, 25 Jun 2004 21:37:50 +0200 (CEST) Subject: How can one see what queries are running withing a postgres instance? From: "P.A.M. van Dam" Reply-To: pam@pmg.xs4all.nl To: pgsql-performance@postgresql.org Content-Type: text/plain Message-Id: <1088192269.6490.3.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.5.2 Date: Fri, 25 Jun 2004 21:37:49 +0200 Content-Transfer-Encoding: 7bit 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/256 X-Sequence-Number: 7314 Hi! I'd like to know if there is a way to see what queries are running within a certain postgres instance and how much resources (cpu/memory) etc. they are using. Right now it's impossible to see what is happening within postgres when it's binaries are using 100% CPU. In Sybase there is a command which let's you view what 'processes' are running within the server and how much cpu (according to Sybase) they are using. It also provides you with a stored procedure to kill off some bad behaving queries. How can one do this within postgres? Thanks in advance! Best regards, Pascal