Re: Increasing the length of

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Increasing the length of
Date: 2004-11-11 17:32:26
Message-ID: 20041111173226.GE27959@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)crankycanuck(dot)ca
The fact that technology doesn't work is no bar to success in the marketplace.
--Philip Greenspun

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-11-11 17:33:48 Re: [PATCHES] plperl Safe restrictions
Previous Message Andrew Dunstan 2004-11-11 17:28:35 Re: [PATCHES] plperl Safe restrictions