Commit b076eb76 authored by Andres Freund's avatar Andres Freund

auto_explain: Include JIT information if applicable.

Due to my (Andres') omission auto_explain did not include information
about JIT compilation. Fix that.

Author: Lukas Fittl
Discussion:
https://postgr.es/m/CAP53PkzgSyoTCau0-5FNaM484B=uO8nLzma7L1ncWLb1=oVJQA@mail.gmail.com
Backpatch: 11-, where JIT compilation was introduced
parent 52050ad8
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "commands/explain.h" #include "commands/explain.h"
#include "executor/instrument.h" #include "executor/instrument.h"
#include "jit/jit.h"
#include "utils/guc.h" #include "utils/guc.h"
PG_MODULE_MAGIC; PG_MODULE_MAGIC;
...@@ -361,6 +362,9 @@ explain_ExecutorEnd(QueryDesc *queryDesc) ...@@ -361,6 +362,9 @@ explain_ExecutorEnd(QueryDesc *queryDesc)
ExplainPrintPlan(es, queryDesc); ExplainPrintPlan(es, queryDesc);
if (es->analyze && auto_explain_log_triggers) if (es->analyze && auto_explain_log_triggers)
ExplainPrintTriggers(es, queryDesc); ExplainPrintTriggers(es, queryDesc);
if (queryDesc->estate->es_jit && es->costs &&
queryDesc->estate->es_jit->created_functions > 0)
ExplainPrintJIT(es, queryDesc);
ExplainEndOutput(es); ExplainEndOutput(es);
/* Remove last line break */ /* Remove last line break */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment