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 85FCF5342C for ; Tue, 29 Mar 2005 17:11:53 +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 01267-03 for ; Tue, 29 Mar 2005 16:11:43 +0000 (GMT) Received: from mailhub1.sghms.ac.uk (mailhub1.sghms.ac.uk [194.82.51.7]) by svr1.postgresql.org (Postfix) with ESMTP id 65C23533B7 for ; Tue, 29 Mar 2005 17:11:42 +0100 (BST) Received: from [194.82.51.24] (helo=imail) by mailhub1.sghms.ac.uk with esmtp (Exim 4.24) id 1DGJJZ-0002On-Ej; Tue, 29 Mar 2005 17:11:37 +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 <0IE400L17FNDWT@imail.sghms.ac.uk>; Tue, 29 Mar 2005 17:11:37 +0100 (BST) Date: Tue, 29 Mar 2005 17:08:11 +0100 From: Adam Witney Subject: Re: Determine current running query, In-reply-to: <1112112384.22988.34.camel@state.g2switchworks.com> To: Scott Marlowe Cc: Tom Lane , 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-MH1: No virueses detected X-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.599, required 5, BAYES_00 -2.60, MY_NO_QU 0.50, MY_OBFUY 0.50) 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/466 X-Sequence-Number: 16964 On 29/3/05 5:06 pm, "Scott Marlowe" wrote: > On Tue, 2005-03-29 at 09:50, Adam Witney wrote: >> 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)? > > Note that there is a limit to what gets stored in the table, but I think > it is the first 255 characters. i.e. you should see something. Yes you are right, I misunderstood the google reference I found: http://archives.postgresql.org/pgsql-novice/2004-02/msg00187.php -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.