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

From Pavel Stehule
Subject Re: ToDo: log plans of cancelled queries
Date
Msg-id CAFj8pRB5JfQt9Hp2PmA7EjoDTAA+fa364Kn8TiDJCehx5v9oZw@mail.gmail.com
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
Re: ToDo: log plans of cancelled queries
Re: ToDo: log plans of cancelled queries
List pgsql-hackers
2013/1/11 Tom Lane <tgl@sss.pgh.pa.us>:
> Pavel Stehule <pavel.stehule@gmail.com> writes:
>> What do you thinking about this feature?
>
> The idea of expecting an add-on module to execute operations in an
> already-failed transaction seems pretty dubious to me.  I also think
> it's not a great idea to add partial executions into a query's stats.
> For instance, suppose query X has been done 3 times and took a minute
> each time.  The fourth time, the user cancels it after one second.
> If we now report that the query's average execution time is 45 seconds
> or so, that seems pretty misleading to me.

I don't propose logging query time for cancelled queries - although we
have path that do it - but it is our specific issue.

My propose is proposed for different dimensions and purpose - for
example - we have a limit 20 minutes for almost all queries, and after
this limit we killing queries. But we have to know little bit more
about these bad queries - and we hope, so execution plan can give this
additional info. We have same motivation like people who use
auto_explain for slow query - but we can't to wait to query complete.

Regards

Pavel

>
>                         regards, tom lane



pgsql-hackers by date:

Previous
From: Samuel Vogel
Date:
Subject: Re: Print b-tree tuples
Next
From: Stephen Frost
Date:
Subject: Re: ToDo: log plans of cancelled queries