Re: Increasing the length of
От | Robert Treat |
---|---|
Тема | Re: Increasing the length of |
Дата | |
Msg-id | 1100186444.5506.20.camel@camel обсуждение исходный текст |
Ответ на | Re: Increasing the length of (Andrew Sullivan <ajs@crankycanuck.ca>) |
Ответы |
Re: Increasing the length of
|
Список | pgsql-hackers |
On Wed, 2004-11-10 at 17:57, Andrew Sullivan wrote: > On Wed, Nov 10, 2004 at 05:51:01PM -0500, Andrew Sullivan wrote: > > log_statement_after_min_duration (integer) -- which did what Simon > > wants. > > Uh, well, not what Simon wants, of course, but which gave us a useful > capability anyway. I agree that the full-bore profiling for the DBA > would be awful nice. But in its absence, if you could see your > long-running query in the log after a minute, and then go do an > EXPLAIN and realise "uh-oh, that's gonna take 3 days to complete" and > kill it, it would be a big help. > 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. (Someone who actually hacks C can correct me on that, but I believe I've done it that way before). 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. Robert Treat -- Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
В списке pgsql-hackers по дате отправления: