Aw: Re: question on auto_explain - Mailing list pgsql-general

From Karsten Hilbert
Subject Aw: Re: question on auto_explain
Date
Msg-id trinity-dd3b1a5a-7646-4c8d-8a15-0bd59dd5fb83-1691081608121@3c-app-gmx-bs14
Whole thread Raw
In response to Re: question on auto_explain  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Aw: Re: question on auto_explain
List pgsql-general
> On Thu, Aug 3, 2023 at 9:29 AM Karsten Hilbert <Karsten.Hilbert@gmx.net[mailto:Karsten.Hilbert@gmx.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
torunning explain analyze except your output > here is whatever the query would produce instead of the explain output,
whichinstead 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 ...

Thanks,
Karsten



pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: question on auto_explain
Next
From: Don Seiler
Date:
Subject: Runaway Initial Table Syncs in Logical Replication?