Re: ToDo: log plans of cancelled queries - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: ToDo: log plans of cancelled queries
Date
Msg-id 20130111162801.GB16126@tamriel.snowman.net
Whole thread Raw
In response to Re: ToDo: log plans of cancelled queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: ToDo: log plans of cancelled queries
List pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
> > An even better feature would be to be able to send a signal to a
> > running query to log its currently executing plan. That way you can
> > ask "Why so slow?" before deciding to kill it.
>
> That could conceivably work.  At least it wouldn't require running
> EXPLAIN in a failed transaction.

I like this idea, in general, also.  Taking that to the next level would
be figuring out how you can do the same kind of thing through an
interactive psql session where the user running the query doesn't need
access to the database server or PG log files...

We can send a 'cancel query', how about a 'report on query' which
returns the plan and perhaps whatever other stats are easily available?
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: ToDo: log plans of cancelled queries
Next
From: Robert Haas
Date:
Subject: Re: psql \l to accept patterns