From: Thusitha Kodikara <kthusi@yahoo.com>
To: pgsql-admin@postgresql.org
Subject: Finding current SQL activity
Date: Wed, 18 Oct 2006 01:06:06 -0700 (PDT)
Message-ID: <20061018080606.90849.qmail@web56608.mail.re3.yahoo.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: kthusi@yahoo.com
Subject: Re: Finding current SQL activity
In-Reply-To: <20061018080606.90849.qmail@web56608.mail.re3.yahoo.com>
References: <20061018080606.90849.qmail@web56608.mail.re3.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox