X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 96590529F5 for ; Fri, 1 Jul 2005 13:24:18 -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 41002-02 for ; Fri, 1 Jul 2005 16:24:16 +0000 (GMT) Received: from amanda.contactbda.com (ipn36372-e65122.cidr.lightship.net [216.204.66.226]) by svr1.postgresql.org (Postfix) with ESMTP id 990D852915 for ; Fri, 1 Jul 2005 13:24:14 -0300 (ADT) Received: from amanda.contactbda.com (amanda.contactbda.com [192.168.1.2]) by amanda.contactbda.com (8.12.11/8.12.11/Debian-3) with ESMTP id j61GO66g000878; Fri, 1 Jul 2005 12:24:06 -0400 From: "Jim Buttafuoco" To: Erik Wasser , pgsql-sql@postgresql.org Reply-To: jim@contactbda.com Subject: Re: 'show full processlist' in postgres? Date: Fri, 1 Jul 2005 12:24:06 -0400 Message-Id: <20050701162340.M94433@contactbda.com> In-Reply-To: <200507011558.46408.erik.wasser@iquer.net> References: <200507011558.46408.erik.wasser@iquer.net> X-Mailer: Open WebMail 2.41 20040926 X-OriginatingIP: 192.168.1.1 (jim) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.053 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200507/5 X-Sequence-Number: 21983 did you restart postgresql and use the pg_stat_activity view instead (just to save some typing). Jim ---------- Original Message ----------- From: Erik Wasser To: pgsql-sql@postgresql.org Sent: Fri, 1 Jul 2005 15:58:46 +0200 Subject: [SQL] 'show full processlist' in postgres? > Hallo pgsql-sql@postgresql.org, > > I'm looking for a way to display the active querys of postgres. The > mysql way is a 'show [full] processlist'. > > After I've read http://pgsqld.active-venture.com/monitoring-stats.html I > set STATS_COMMAND_STRING, STATS_BLOCK_LEVEL, STATS_ROW_LEVEL and > STATS_START_COLLECTOR to 'true'. > > Then I executed the query from the bottom of the page: > > > SELECT pg_stat_get_backend_pid(S.backendid) AS procpid, > > pg_stat_get_backend_activity(S.backendid) AS current_query > > FROM (SELECT pg_stat_get_backend_idset() AS backendid) AS S; > > The result was: > > procpid | current_query > ---------+--------------- > 1367 | > 27387 | > 930 | > 28425 | > (4 rows) > > Why there isn't any query in the 'current_query' row? Calling the query > multiple times just changes the PID (sometimes) but 'current_query' was > always empty. How do I show up the a list of querys that will be > processed right in this moment? > > P.S: I'm using postgresql 7.4.7 and I was logged I as 'postgres'. > > -- > So long... Fuzz > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org ------- End of Original Message -------