Re: Increasing the length of - Mailing list pgsql-hackers

From Andrew Sullivan
Subject Re: Increasing the length of
Date
Msg-id 20041111173226.GE27959@phlogiston.dyndns.org
Whole thread Raw
In response to Re: Increasing the length of  (Robert Treat <xzilla@users.sourceforge.net>)
List pgsql-hackers
On Thu, Nov 11, 2004 at 10:20:43AM -0500, Robert Treat wrote:
> 
> I believe the geeky non-helpful answer is to attach to the process with
> gdb and do p debug_query_string which I believe will show you said long
> running query. 

Yes, this will work, & I've used it.  But of course, you don't
actually _know_ it's a long-running query.  All you know is that the
back end which has that pid has a query now.  So you have to connect
several times and look a thte query to see this.  This strategy is
also what pgmonitor and friends do.

> Of course that idea lead me to wondering why we couldn't have a function
> that could look at a connection (well, either by way of pid or possibly
> transaction id) and show the current query being executed. 

I think that's what's being requested.  I've no clue how to do it,
though.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
The fact that technology doesn't work is no bar to success in the marketplace.    --Philip Greenspun


pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: Re: Increasing the length of
Next
From: Andrew Dunstan
Date:
Subject: Re: [PATCHES] plperl Safe restrictions