These are my settings: https://collabshot.com/show/6b9f6c

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?


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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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