Aw: Re: question on auto_explain

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Aw: Re: question on auto_explain
Дата
Msg-id trinity-7a634cbb-d52a-48c7-b541-78c3b16a8629-1691091939561@3c-app-gmx-bs14
обсуждение исходный текст
Ответ на Aw: Re: question on auto_explain  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Ответы Re: question on auto_explain
Список pgsql-general
> > auto_explain automatically produces the explain output of a query that is running for reals.  The effect is
identicalto running explain analyze except your output > here is whatever the query would produce instead of the
explainoutput, which instead goes into the log. 
>
> Thanks David. I take this to mean that auto_explain produces the same side-effects as manually running "explain
analyze"does. 
>
> Would this warrant a documentation patch ?  Like so:
>
>   auto_explain.log_analyze causes EXPLAIN ANALYZE output, rather than just EXPLAIN output, to be printed when an
executionplan is logged. Hence 
>   the same caveats apply for INSERT/UPDATE/DELETE queries.
>
> Also, doesn't this makes auto_explain.log_analyze = TRUE rather surprising as it
> can make any INSERT/UPDATE/DELETE fail when it is slow for some reason ...

Ah, wait, I think I've been a bit dense here. I thought it was a two-step process of
first running any queries "normally", somehow magically noticing slow ones as per
auto_explain.log_min_duration, and re-running those with EPXPLAIN ANALYZE prepended.

I think I understand better now: with auto_explain ALL queries are run with EXPLAIN ANALYZE
prepended BUT the output is two-fold: query results are fed into whatever wire protocol client
is and EXPLAIN output is re-routed to the log. Does that sound right ?

I think was misguided by psql discarding (?) query results (the rows)
while displaying EXPLAIN output only.

The auto_explain docs might perhaps still benefit from a more
explicit hint towards write query side effects.

Karsten



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

Предыдущее
От: Don Seiler
Дата:
Сообщение: Runaway Initial Table Syncs in Logical Replication?
Следующее
От: Mark Atlantic
Дата:
Сообщение: Re: Installation Issue