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 8E14853913 for ; Tue, 29 Mar 2005 16:53:56 +0100 (BST) 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 94433-03 for ; Tue, 29 Mar 2005 15:53:54 +0000 (GMT) Received: from mailhub2.sghms.ac.uk (mailhub2.sghms.ac.uk [194.82.51.8]) by svr1.postgresql.org (Postfix) with ESMTP id 2127C53912 for ; Tue, 29 Mar 2005 16:53:53 +0100 (BST) Received: from [194.82.51.24] (helo=imail) by mailhub2.sghms.ac.uk with esmtp (Exim 4.24) id 1DGJ2P-00066X-6a; Tue, 29 Mar 2005 16:53:53 +0100 Received: from [172.16.20.3] (mrc1-003.sghms.ac.uk [172.16.20.3]) by imail.sghms.ac.uk (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0IE400KFNETSRC@imail.sghms.ac.uk>; Tue, 29 Mar 2005 16:53:53 +0100 (BST) Date: Tue, 29 Mar 2005 16:50:27 +0100 From: Adam Witney Subject: Re: Determine current running query, In-reply-to: <21904.1112110023@sss.pgh.pa.us> To: Tom Lane Cc: pgsql-admin Message-id: MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT User-Agent: Microsoft-Entourage/10.1.1.2418 X-MailScanner-Information: Please contact sysadmin at sghms.ac.uk for more information X-MailScanner-MH2: No Virues detected X-MailScanner-SpamCheck: not spam, SpamAssassin (score=1, required 5, MY_NO_QU 0.50, MY_OBFUY 0.50) X-MailScanner-SpamScore: s X-MailScanner-From: awitney@sghms.ac.uk X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200503/463 X-Sequence-Number: 16961 On 29/3/05 4:27 pm, "Tom Lane" wrote: > Adam Witney writes: >> Shouldn't there be something in current_query? > > Only if (a) you have stats_command_string turned on, *and* (b) you > are a superuser or the owner of the target process. I am logged in as the superuser, and I just switched stats_command_string on. Table now looks like this bugasbase=# SELECT * from pg_stat_activity ; datid | datname | procpid | usesysid | usename | current_query | query_start ----------+-----------+---------+----------+---------+---------------+------ -------------------------- 80573819 | bugasbase | 23197 | 1 | pgsql | | 29/03/2005 17:03:25.911288 BST 80573819 | bugasbase | 23195 | 109 | lubrook | | I did find a reference on google to the fact that there was/is a max query size length for this? I think this was for 7.3.5, is this still the case? Maybe this is the reason it is not showing up (it is quite a large query string)? Thanks Adam -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.