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 | [EMAIL PROTECTED] The fact that technology doesn't work is no bar to success in the marketplace. --Philip Greenspun ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])