2

These are my settings:

settings list

According to the documentation, as far as I can tell, this combination of settings along with a statement_timeout value of 3600000 should mean that hour-long queries time out, and well before then, they and anything else longer than ~214ms should be producing EXPLAIN output in the logs. But they're not.

  1. shared_preload_libraries already contained auto_explain by default when I checked.
  2. The parameters above are applied to the server.
  3. I've restarted the instance after applying the parameters.
  4. My back end has reported an incidence of canceling statement due to statement timeout (which only started happening after I set statement_timeout) but there is nothing in the logs (at all, let alone in the vicinity of the time reported) showing anything other than xlog starting and stopping.

What else could be missing?

1 Answer 1

5

auto_explain only logs a statement upon successful completion. If it gets cancelled, it does not get logged by auto_explain.

1
  • That's unfortunate, but very helpful to know! Thanks!
    – Kev
    Feb 21, 2018 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.