Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 4FA019FB48B for ; Wed, 18 Oct 2006 05:12:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 22085-06 for ; Wed, 18 Oct 2006 05:12:48 -0300 (ADT) X-Greylist: delayed 00:06:36.548996 by SQLgrey- Received: from web56608.mail.re3.yahoo.com (web56608.mail.re3.yahoo.com [66.196.97.52]) by postgresql.org (Postfix) with SMTP id DD76C9FB29C for ; Wed, 18 Oct 2006 05:12:47 -0300 (ADT) Received: (qmail 90851 invoked by uid 60001); 18 Oct 2006 08:06:06 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=So7fMfKtPxzHc+rzg15zuZnx/ZFGCPna9gBsGqGyB7ChUrlKwf4PllEr5vWSeiQ6XSNyRo1D/Gus32MzbYvurNcoUk3uNkB4JTJepXAg7WYRYbX3ELScv6MQ5F6srOmU5S4055WPBv+wXjY9vSd0Z8+Uhio0eP5OFyK/Gl5IKfU= ; Message-ID: <20061018080606.90849.qmail@web56608.mail.re3.yahoo.com> Received: from [203.115.30.220] by web56608.mail.re3.yahoo.com via HTTP; Wed, 18 Oct 2006 01:06:06 PDT Date: Wed, 18 Oct 2006 01:06:06 -0700 (PDT) From: Thusitha Kodikara Subject: Finding current SQL activity To: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-522470912-1161158766=:89709" Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=4.151 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS, HTML_00_10, HTML_MESSAGE X-Spam-Level: **** X-Archive-Number: 200610/108 X-Sequence-Number: 23411 --0-522470912-1161158766=:89709 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I would like to find the current (and very recent) SQL statements. I went through 'pg_stat_activity'. But it showed only the current statement I was issuing. Going through the defintion of 'pg_stat_activity' I came across pg_stat_get_backend_activity(), and I thought if I could get the source of this function I would be able to further. But I can't see the definition of this function. Am I on the right direction, or is there an easier way? I would appreciate if someone can give some suggestions. Thanks in advance. -Thusitha --0-522470912-1161158766=:89709 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi,

I would like to find the current (and very recent) SQL statements.  I went through 'pg_stat_activity'. But it showed only the current statement I was issuing. Going through the defintion of 'pg_stat_activity' I came across pg_stat_get_backend_activity(), and I thought if I could get the source of this function I would be able to further. But I can't see the definition of this function.

Am I on the right direction, or is there an easier way? I would appreciate if someone can give some suggestions.

Thanks in advance.

-Thusitha
--0-522470912-1161158766=:89709--