Aw: Re: question on auto_explain

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Aw: Re: question on auto_explain
Date: 2023-08-03 16:53:28
Message-ID: trinity-dd3b1a5a-7646-4c8d-8a15-0bd59dd5fb83-1691081608121@3c-app-gmx-bs14
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Thu, Aug 3, 2023 at 9:29 AM Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net[mailto:Karsten(dot)Hilbert(at)gmx(dot)net]> wrote:
>>
>>  https://www.postgresql.org/docs/current/auto-explain.html[https://www.postgresql.org/docs/current/auto-explain.html]
>>
>> don't explicitely state that it does so, too. Nor can I read impliciteness that
>> "normal" EXPLAIN is *run* by auto_explain.
>
> auto_explain automatically produces the explain output of a query that is running for reals.  The effect is identical to running explain analyze except your output > here is whatever the query would produce instead of the explain output, 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 execution plan 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 ...

Thanks,
Karsten

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Don Seiler 2023-08-03 19:24:04 Runaway Initial Table Syncs in Logical Replication?
Previous Message David G. Johnston 2023-08-03 16:35:12 Re: question on auto_explain