Re: Missing query plan for auto_explain.

From: Matheus Martin <matheus(dot)martin(at)voidbridge(dot)com>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Missing query plan for auto_explain.
Date: 2022-09-02 09:58:58
Message-ID: CAB_m0bHiurUveZsJnh0TFftHaNuxDr0s3d6dg2KvWnMt9TX5sQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yes, we do see some plans logged by the auto_explain. We couldn't find a
`auto_explain.log_min_duration_statements` setting but
`log_min_duration_statement` as in
https://www.postgresql.org/docs/current/runtime-config-logging.html is set
to 100 ms.

Unfortunately, due to the amount of traffic we have, we cannot lower the
threshold for the auto_explain.

`log_lock_waits` is turned on and the logs do not indicate any locks
related to the tables in the query.

On Fri, 2 Sept 2022 at 05:49, Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote:

> Hi,
>
> On Thu, Sep 01, 2022 at 08:20:13PM +0100, Matheus Martin wrote:
> > We tried running the prepared statement six times as suggested but wasn't
> > still able to recreate the original problem.
> >
> > Perhaps more concerning/relevant is that we have not found any
> explanation
> > to why the explain plan is not being logged by `auto_explain`. Could this
> > be a bug? Shall we report it?
>
> Just to be sure, do you get at least some plans logged by auto_explain when
> queries are executed by the JDBC application?
>
> Can you try to temporarily lower auto_explain.log_min_duration_statements
> to
> less than 50ms and see what auto_explain sees for the execution time (and
> planning time).
>
> Another possibility would be some conflicting locks held. If the conflict
> happens during the planning auto_explain still won't be triggered as it's
> outside the executor. Also, have you enabled log_lock_waits?
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter J. Holzer 2022-09-02 11:16:25 Re: Missing query plan for auto_explain.
Previous Message Julien Rouhaud 2022-09-02 04:48:57 Re: Missing query plan for auto_explain.