Re: ToDo: log plans of cancelled queries

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: ToDo: log plans of cancelled queries
Дата
Msg-id 20130111155415.GC4208@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: ToDo: log plans of cancelled queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: ToDo: log plans of cancelled queries  (Simon Riggs <simon@2ndQuadrant.com>)
Re: ToDo: log plans of cancelled queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane escribió:
> Pavel Stehule <pavel.stehule@gmail.com> writes:
> > 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.
>
> Oh, sorry, not enough caffeine yet --- somehow I was thinking about
> pg_stat_statements not auto_explain.
>
> However, auto_explain is even worse on the other problem.  You flat out
> cannot do catalog lookups in a failed transaction, but there's no way to
> print a decompiled plan without such lookups.  So it won't work.  (It
> would also be appropriate to be suspicious of whether the executor's
> plan state tree is even fully set up at the time the error is thrown...)

Maybe it'd work to save the query source text and parameter values
somewhere and log an explain in a different session.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: ToDo: log plans of cancelled queries
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Performance Improvement by reducing WAL for Update Operation