From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adam Witney <awitney@sghms.ac.uk>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Determine current running query, but no query in pg_stat_activity
Date: Tue, 29 Mar 2005 11:02:14 -0500
Message-ID: <22780.1112112134@sss.pgh.pa.us> (raw)
In-Reply-To: <BE6F37D3.4358F%awitney@sghms.ac.uk>
References: <BE6F37D3.4358F%awitney@sghms.ac.uk>
Adam Witney <awitney@sghms.ac.uk> writes:
> I am logged in as the superuser, and I just switched stats_command_string
> on.
Just now? Too late then --- it needed to be on at the time the other
guy started his query, else he did not send the string to the stats
collector.
> I did find a reference on google to the fact that there was/is a max query
> size length for this?
Yeah, but it truncates, it doesn't just drop the string.
If you are feeling desperate you can attach to the other backend with
gdb:
$ gdb /path/to/postgres backend-PID
gdb> print debug_query_string
gdb> quit
detach and let process continue? y
$
regards, tom lane
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: tgl@sss.pgh.pa.us, awitney@sghms.ac.uk
Subject: Re: Determine current running query, but no query in pg_stat_activity
In-Reply-To: <22780.1112112134@sss.pgh.pa.us>
References: <BE6F37D3.4358F%awitney@sghms.ac.uk> <22780.1112112134@sss.pgh.pa.us>
* 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