From: Rajesh Kumar Mallah. <mallah@trade-india.com>
To: pgsql-sql@postgresql.org
Subject: Getting full query string from pg_stat_get_backend_activity
Date: Fri, 10 May 2002 15:13:59 +0530
Message-ID: <200205101513.59553.mallah@trade-india.com> (raw)
Hi ,
Is it possible to get the full SQL query from
pg_stat_get_backend_activity, currently it is truncated after
certain number of characters , example below.
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) s;
procpid | current_query
27015 | <IDLE> in transaction
26978 | <IDLE> in transaction
26985 | <IDLE> in transaction
27135 | select count(*) from ( select distinct on (email_id)
email_id,email,contact from email_bank a join (select email_id from
email_export_category where category_id in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
12, 14, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 1
12262 | SELECT source_id , cnt from (SELECT source_id,count(source_id) as
cnt from email_source group by source_id ) subsel join sources
using(source_id) order by source_id
27136 | <IDLE> in transaction
(16 rows)
--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)
Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mallah@trade-india.com
Subject: Re: Getting full query string from pg_stat_get_backend_activity
In-Reply-To: <200205101513.59553.mallah@trade-india.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