Skip to content

Commit b076eb7

Browse files
committed
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
1 parent 52050ad commit b076eb7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/auto_explain/auto_explain.c

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include "commands/explain.h"
1818
#include "executor/instrument.h"
19+
#include "jit/jit.h"
1920
#include "utils/guc.h"
2021

2122
PG_MODULE_MAGIC;
@@ -361,6 +362,9 @@ explain_ExecutorEnd(QueryDesc *queryDesc)
361362
ExplainPrintPlan(es, queryDesc);
362363
if (es->analyze && auto_explain_log_triggers)
363364
ExplainPrintTriggers(es, queryDesc);
365+
if (queryDesc->estate->es_jit && es->costs &&
366+
queryDesc->estate->es_jit->created_functions > 0)
367+
ExplainPrintJIT(es, queryDesc);
364368
ExplainEndOutput(es);
365369

366370
/* Remove last line break */

0 commit comments

Comments
 (0)