PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
auto_explain.c File Reference
#include "postgres.h"
#include <limits.h>
#include "access/parallel.h"
#include "commands/explain.h"
#include "commands/explain_format.h"
#include "commands/explain_state.h"
#include "common/pg_prng.h"
#include "executor/instrument.h"
#include "utils/guc.h"
Include dependency graph for auto_explain.c:

Go to the source code of this file.

Macros

#define auto_explain_enabled()
 

Functions

 PG_MODULE_MAGIC_EXT (.name="auto_explain",.version=PG_VERSION)
 
static bool explain_ExecutorStart (QueryDesc *queryDesc, int eflags)
 
static void explain_ExecutorRun (QueryDesc *queryDesc, ScanDirection direction, uint64 count)
 
static void explain_ExecutorFinish (QueryDesc *queryDesc)
 
static void explain_ExecutorEnd (QueryDesc *queryDesc)
 
void _PG_init (void)
 

Variables

static int auto_explain_log_min_duration = -1
 
static int auto_explain_log_parameter_max_length = -1
 
static bool auto_explain_log_analyze = false
 
static bool auto_explain_log_verbose = false
 
static bool auto_explain_log_buffers = false
 
static bool auto_explain_log_wal = false
 
static bool auto_explain_log_triggers = false
 
static bool auto_explain_log_timing = true
 
static bool auto_explain_log_settings = false
 
static int auto_explain_log_format = EXPLAIN_FORMAT_TEXT
 
static int auto_explain_log_level = LOG
 
static bool auto_explain_log_nested_statements = false
 
static double auto_explain_sample_rate = 1
 
static const struct config_enum_entry format_options []
 
static const struct config_enum_entry loglevel_options []
 
static int nesting_level = 0
 
static bool current_query_sampled = false
 
static ExecutorStart_hook_type prev_ExecutorStart = NULL
 
static ExecutorRun_hook_type prev_ExecutorRun = NULL
 
static ExecutorFinish_hook_type prev_ExecutorFinish = NULL
 
static ExecutorEnd_hook_type prev_ExecutorEnd = NULL
 

Macro Definition Documentation

◆ auto_explain_enabled

#define auto_explain_enabled ( )
Value:
static int auto_explain_log_min_duration
Definition: auto_explain.c:31
static bool auto_explain_log_nested_statements
Definition: auto_explain.c:42
static int nesting_level
Definition: auto_explain.c:68
static bool current_query_sampled
Definition: auto_explain.c:71

Definition at line 73 of file auto_explain.c.

Function Documentation

◆ _PG_init()

void _PG_init ( void  )

Definition at line 96 of file auto_explain.c.

97{
98 /* Define custom GUC variables. */
99 DefineCustomIntVariable("auto_explain.log_min_duration",
100 "Sets the minimum execution time above which plans will be logged.",
101 "-1 disables logging plans. 0 means log all plans.",
103 -1,
104 -1, INT_MAX,
105 PGC_SUSET,
107 NULL,
108 NULL,
109 NULL);
110
111 DefineCustomIntVariable("auto_explain.log_parameter_max_length",
112 "Sets the maximum length of query parameter values to log.",
113 "-1 means log values in full.",
115 -1,
116 -1, INT_MAX,
117 PGC_SUSET,
119 NULL,
120 NULL,
121 NULL);
122
123 DefineCustomBoolVariable("auto_explain.log_analyze",
124 "Use EXPLAIN ANALYZE for plan logging.",
125 NULL,
127 false,
128 PGC_SUSET,
129 0,
130 NULL,
131 NULL,
132 NULL);
133
134 DefineCustomBoolVariable("auto_explain.log_settings",
135 "Log modified configuration parameters affecting query planning.",
136 NULL,
138 false,
139 PGC_SUSET,
140 0,
141 NULL,
142 NULL,
143 NULL);
144
145 DefineCustomBoolVariable("auto_explain.log_verbose",
146 "Use EXPLAIN VERBOSE for plan logging.",
147 NULL,
149 false,
150 PGC_SUSET,
151 0,
152 NULL,
153 NULL,
154 NULL);
155
156 DefineCustomBoolVariable("auto_explain.log_buffers",
157 "Log buffers usage.",
158 NULL,
160 false,
161 PGC_SUSET,
162 0,
163 NULL,
164 NULL,
165 NULL);
166
167 DefineCustomBoolVariable("auto_explain.log_wal",
168 "Log WAL usage.",
169 NULL,
171 false,
172 PGC_SUSET,
173 0,
174 NULL,
175 NULL,
176 NULL);
177
178 DefineCustomBoolVariable("auto_explain.log_triggers",
179 "Include trigger statistics in plans.",
180 "This has no effect unless log_analyze is also set.",
182 false,
183 PGC_SUSET,
184 0,
185 NULL,
186 NULL,
187 NULL);
188
189 DefineCustomEnumVariable("auto_explain.log_format",
190 "EXPLAIN format to be used for plan logging.",
191 NULL,
195 PGC_SUSET,
196 0,
197 NULL,
198 NULL,
199 NULL);
200
201 DefineCustomEnumVariable("auto_explain.log_level",
202 "Log level for the plan.",
203 NULL,
205 LOG,
207 PGC_SUSET,
208 0,
209 NULL,
210 NULL,
211 NULL);
212
213 DefineCustomBoolVariable("auto_explain.log_nested_statements",
214 "Log nested statements.",
215 NULL,
217 false,
218 PGC_SUSET,
219 0,
220 NULL,
221 NULL,
222 NULL);
223
224 DefineCustomBoolVariable("auto_explain.log_timing",
225 "Collect timing data, not just row counts.",
226 NULL,
228 true,
229 PGC_SUSET,
230 0,
231 NULL,
232 NULL,
233 NULL);
234
235 DefineCustomRealVariable("auto_explain.sample_rate",
236 "Fraction of queries to process.",
237 NULL,
239 1.0,
240 0.0,
241 1.0,
242 PGC_SUSET,
243 0,
244 NULL,
245 NULL,
246 NULL);
247
248 MarkGUCPrefixReserved("auto_explain");
249
250 /* Install hooks. */
259}
static ExecutorRun_hook_type prev_ExecutorRun
Definition: auto_explain.c:80
static bool auto_explain_log_analyze
Definition: auto_explain.c:33
static void explain_ExecutorEnd(QueryDesc *queryDesc)
Definition: auto_explain.c:379
static bool auto_explain_log_wal
Definition: auto_explain.c:36
static double auto_explain_sample_rate
Definition: auto_explain.c:43
static int auto_explain_log_parameter_max_length
Definition: auto_explain.c:32
static bool explain_ExecutorStart(QueryDesc *queryDesc, int eflags)
Definition: auto_explain.c:265
static bool auto_explain_log_verbose
Definition: auto_explain.c:34
static void explain_ExecutorFinish(QueryDesc *queryDesc)
Definition: auto_explain.c:358
static void explain_ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, uint64 count)
Definition: auto_explain.c:336
static ExecutorStart_hook_type prev_ExecutorStart
Definition: auto_explain.c:79
static const struct config_enum_entry loglevel_options[]
Definition: auto_explain.c:53
static bool auto_explain_log_timing
Definition: auto_explain.c:38
static int auto_explain_log_format
Definition: auto_explain.c:40
static bool auto_explain_log_buffers
Definition: auto_explain.c:35
static bool auto_explain_log_triggers
Definition: auto_explain.c:37
static const struct config_enum_entry format_options[]
Definition: auto_explain.c:45
static ExecutorEnd_hook_type prev_ExecutorEnd
Definition: auto_explain.c:82
static int auto_explain_log_level
Definition: auto_explain.c:41
static ExecutorFinish_hook_type prev_ExecutorFinish
Definition: auto_explain.c:81
static bool auto_explain_log_settings
Definition: auto_explain.c:39
#define LOG
Definition: elog.h:31
ExecutorEnd_hook_type ExecutorEnd_hook
Definition: execMain.c:73
ExecutorFinish_hook_type ExecutorFinish_hook
Definition: execMain.c:72
ExecutorStart_hook_type ExecutorStart_hook
Definition: execMain.c:70
ExecutorRun_hook_type ExecutorRun_hook
Definition: execMain.c:71
@ EXPLAIN_FORMAT_TEXT
Definition: explain_state.h:29
void DefineCustomRealVariable(const char *name, const char *short_desc, const char *long_desc, double *valueAddr, double bootValue, double minValue, double maxValue, GucContext context, int flags, GucRealCheckHook check_hook, GucRealAssignHook assign_hook, GucShowHook show_hook)
Definition: guc.c:5189
void DefineCustomEnumVariable(const char *name, const char *short_desc, const char *long_desc, int *valueAddr, int bootValue, const struct config_enum_entry *options, GucContext context, int flags, GucEnumCheckHook check_hook, GucEnumAssignHook assign_hook, GucShowHook show_hook)
Definition: guc.c:5244
void DefineCustomBoolVariable(const char *name, const char *short_desc, const char *long_desc, bool *valueAddr, bool bootValue, GucContext context, int flags, GucBoolCheckHook check_hook, GucBoolAssignHook assign_hook, GucShowHook show_hook)
Definition: guc.c:5133
void MarkGUCPrefixReserved(const char *className)
Definition: guc.c:5280
void DefineCustomIntVariable(const char *name, const char *short_desc, const char *long_desc, int *valueAddr, int bootValue, int minValue, int maxValue, GucContext context, int flags, GucIntCheckHook check_hook, GucIntAssignHook assign_hook, GucShowHook show_hook)
Definition: guc.c:5159
#define GUC_UNIT_MS
Definition: guc.h:239
@ PGC_SUSET
Definition: guc.h:78
#define GUC_UNIT_BYTE
Definition: guc.h:236

References auto_explain_log_analyze, auto_explain_log_buffers, auto_explain_log_format, auto_explain_log_level, auto_explain_log_min_duration, auto_explain_log_nested_statements, auto_explain_log_parameter_max_length, auto_explain_log_settings, auto_explain_log_timing, auto_explain_log_triggers, auto_explain_log_verbose, auto_explain_log_wal, auto_explain_sample_rate, DefineCustomBoolVariable(), DefineCustomEnumVariable(), DefineCustomIntVariable(), DefineCustomRealVariable(), ExecutorEnd_hook, ExecutorFinish_hook, ExecutorRun_hook, ExecutorStart_hook, explain_ExecutorEnd(), explain_ExecutorFinish(), explain_ExecutorRun(), explain_ExecutorStart(), EXPLAIN_FORMAT_TEXT, format_options, GUC_UNIT_BYTE, GUC_UNIT_MS, LOG, loglevel_options, MarkGUCPrefixReserved(), PGC_SUSET, prev_ExecutorEnd, prev_ExecutorFinish, prev_ExecutorRun, and prev_ExecutorStart.

◆ explain_ExecutorEnd()

static void explain_ExecutorEnd ( QueryDesc queryDesc)
static

Definition at line 379 of file auto_explain.c.

380{
381 if (queryDesc->totaltime && auto_explain_enabled())
382 {
383 MemoryContext oldcxt;
384 double msec;
385
386 /*
387 * Make sure we operate in the per-query context, so any cruft will be
388 * discarded later during ExecutorEnd.
389 */
390 oldcxt = MemoryContextSwitchTo(queryDesc->estate->es_query_cxt);
391
392 /*
393 * Make sure stats accumulation is done. (Note: it's okay if several
394 * levels of hook all do this.)
395 */
396 InstrEndLoop(queryDesc->totaltime);
397
398 /* Log plan if duration is exceeded. */
399 msec = queryDesc->totaltime->total * 1000.0;
401 {
403
407 es->wal = (es->analyze && auto_explain_log_wal);
409 es->summary = es->analyze;
410 /* No support for MEMORY */
411 /* es->memory = false; */
414
416 ExplainQueryText(es, queryDesc);
418 ExplainPrintPlan(es, queryDesc);
420 ExplainPrintTriggers(es, queryDesc);
421 if (es->costs)
422 ExplainPrintJITSummary(es, queryDesc);
424
425 /* Remove last line break */
426 if (es->str->len > 0 && es->str->data[es->str->len - 1] == '\n')
427 es->str->data[--es->str->len] = '\0';
428
429 /* Fix JSON to output an object */
431 {
432 es->str->data[0] = '{';
433 es->str->data[es->str->len - 1] = '}';
434 }
435
436 /*
437 * Note: we rely on the existing logging of context or
438 * debug_query_string to identify just which statement is being
439 * reported. This isn't ideal but trying to do it here would
440 * often result in duplication.
441 */
443 (errmsg("duration: %.3f ms plan:\n%s",
444 msec, es->str->data),
445 errhidestmt(true)));
446 }
447
448 MemoryContextSwitchTo(oldcxt);
449 }
450
452 prev_ExecutorEnd(queryDesc);
453 else
454 standard_ExecutorEnd(queryDesc);
455}
#define auto_explain_enabled()
Definition: auto_explain.c:73
int errhidestmt(bool hide_stmt)
Definition: elog.c:1433
int errmsg(const char *fmt,...)
Definition: elog.c:1071
#define ereport(elevel,...)
Definition: elog.h:149
void standard_ExecutorEnd(QueryDesc *queryDesc)
Definition: execMain.c:547
void ExplainPrintJITSummary(ExplainState *es, QueryDesc *queryDesc)
Definition: explain.c:891
void ExplainQueryText(ExplainState *es, QueryDesc *queryDesc)
Definition: explain.c:1075
void ExplainPrintPlan(ExplainState *es, QueryDesc *queryDesc)
Definition: explain.c:771
void ExplainQueryParameters(ExplainState *es, ParamListInfo params, int maxlen)
Definition: explain.c:1090
void ExplainPrintTriggers(ExplainState *es, QueryDesc *queryDesc)
Definition: explain.c:848
void ExplainEndOutput(ExplainState *es)
void ExplainBeginOutput(ExplainState *es)
ExplainState * NewExplainState(void)
Definition: explain_state.c:61
@ EXPLAIN_FORMAT_JSON
Definition: explain_state.h:31
void InstrEndLoop(Instrumentation *instr)
Definition: instrument.c:140
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:124
MemoryContext es_query_cxt
Definition: execnodes.h:708
StringInfo str
Definition: explain_state.h:46
ExplainFormat format
Definition: explain_state.h:59
ParamListInfo params
Definition: execdesc.h:43
int instrument_options
Definition: execdesc.h:45
EState * estate
Definition: execdesc.h:49
struct Instrumentation * totaltime
Definition: execdesc.h:56

References ExplainState::analyze, auto_explain_enabled, auto_explain_log_analyze, auto_explain_log_buffers, auto_explain_log_format, auto_explain_log_level, auto_explain_log_min_duration, auto_explain_log_parameter_max_length, auto_explain_log_settings, auto_explain_log_timing, auto_explain_log_triggers, auto_explain_log_verbose, auto_explain_log_wal, ExplainState::buffers, ExplainState::costs, StringInfoData::data, ereport, errhidestmt(), errmsg(), EState::es_query_cxt, QueryDesc::estate, EXPLAIN_FORMAT_JSON, ExplainBeginOutput(), ExplainEndOutput(), ExplainPrintJITSummary(), ExplainPrintPlan(), ExplainPrintTriggers(), ExplainQueryParameters(), ExplainQueryText(), ExplainState::format, InstrEndLoop(), QueryDesc::instrument_options, StringInfoData::len, MemoryContextSwitchTo(), NewExplainState(), QueryDesc::params, prev_ExecutorEnd, ExplainState::settings, standard_ExecutorEnd(), ExplainState::str, ExplainState::summary, ExplainState::timing, Instrumentation::total, QueryDesc::totaltime, ExplainState::verbose, and ExplainState::wal.

Referenced by _PG_init().

◆ explain_ExecutorFinish()

static void explain_ExecutorFinish ( QueryDesc queryDesc)
static

Definition at line 358 of file auto_explain.c.

359{
361 PG_TRY();
362 {
364 prev_ExecutorFinish(queryDesc);
365 else
366 standard_ExecutorFinish(queryDesc);
367 }
368 PG_FINALLY();
369 {
371 }
372 PG_END_TRY();
373}
#define PG_TRY(...)
Definition: elog.h:371
#define PG_END_TRY(...)
Definition: elog.h:396
#define PG_FINALLY(...)
Definition: elog.h:388
void standard_ExecutorFinish(QueryDesc *queryDesc)
Definition: execMain.c:484

References nesting_level, PG_END_TRY, PG_FINALLY, PG_TRY, prev_ExecutorFinish, and standard_ExecutorFinish().

Referenced by _PG_init().

◆ explain_ExecutorRun()

static void explain_ExecutorRun ( QueryDesc queryDesc,
ScanDirection  direction,
uint64  count 
)
static

Definition at line 336 of file auto_explain.c.

338{
340 PG_TRY();
341 {
343 prev_ExecutorRun(queryDesc, direction, count);
344 else
345 standard_ExecutorRun(queryDesc, direction, count);
346 }
347 PG_FINALLY();
348 {
350 }
351 PG_END_TRY();
352}
void standard_ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, uint64 count)
Definition: execMain.c:375

References nesting_level, PG_END_TRY, PG_FINALLY, PG_TRY, prev_ExecutorRun, and standard_ExecutorRun().

Referenced by _PG_init().

◆ explain_ExecutorStart()

static bool explain_ExecutorStart ( QueryDesc queryDesc,
int  eflags 
)
static

Definition at line 265 of file auto_explain.c.

266{
267 bool plan_valid;
268
269 /*
270 * At the beginning of each top-level statement, decide whether we'll
271 * sample this statement. If nested-statement explaining is enabled,
272 * either all nested statements will be explained or none will.
273 *
274 * When in a parallel worker, we should do nothing, which we can implement
275 * cheaply by pretending we decided not to sample the current statement.
276 * If EXPLAIN is active in the parent session, data will be collected and
277 * reported back to the parent, and it's no business of ours to interfere.
278 */
279 if (nesting_level == 0)
280 {
283 else
284 current_query_sampled = false;
285 }
286
288 {
289 /* Enable per-node instrumentation iff log_analyze is required. */
291 {
294 else
300 }
301 }
302
304 plan_valid = prev_ExecutorStart(queryDesc, eflags);
305 else
306 plan_valid = standard_ExecutorStart(queryDesc, eflags);
307
308 /* The plan may have become invalid during standard_ExecutorStart() */
309 if (!plan_valid)
310 return false;
311
313 {
314 /*
315 * Set up to track total elapsed time in ExecutorRun. Make sure the
316 * space is allocated in the per-query context so it will go away at
317 * ExecutorEnd.
318 */
319 if (queryDesc->totaltime == NULL)
320 {
321 MemoryContext oldcxt;
322
323 oldcxt = MemoryContextSwitchTo(queryDesc->estate->es_query_cxt);
324 queryDesc->totaltime = InstrAlloc(1, INSTRUMENT_ALL, false);
325 MemoryContextSwitchTo(oldcxt);
326 }
327 }
328
329 return true;
330}
bool standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
Definition: execMain.c:151
#define EXEC_FLAG_EXPLAIN_ONLY
Definition: executor.h:66
#define IsParallelWorker()
Definition: parallel.h:60
Instrumentation * InstrAlloc(int n, int instrument_options, bool async_mode)
Definition: instrument.c:31
@ INSTRUMENT_ALL
Definition: instrument.h:66
@ INSTRUMENT_TIMER
Definition: instrument.h:62
@ INSTRUMENT_BUFFERS
Definition: instrument.h:63
@ INSTRUMENT_WAL
Definition: instrument.h:65
@ INSTRUMENT_ROWS
Definition: instrument.h:64
double pg_prng_double(pg_prng_state *state)
Definition: pg_prng.c:268
pg_prng_state pg_global_prng_state
Definition: pg_prng.c:34

References auto_explain_enabled, auto_explain_log_analyze, auto_explain_log_buffers, auto_explain_log_min_duration, auto_explain_log_timing, auto_explain_log_wal, auto_explain_sample_rate, current_query_sampled, EState::es_query_cxt, QueryDesc::estate, EXEC_FLAG_EXPLAIN_ONLY, InstrAlloc(), INSTRUMENT_ALL, INSTRUMENT_BUFFERS, QueryDesc::instrument_options, INSTRUMENT_ROWS, INSTRUMENT_TIMER, INSTRUMENT_WAL, IsParallelWorker, MemoryContextSwitchTo(), nesting_level, pg_global_prng_state, pg_prng_double(), prev_ExecutorStart, standard_ExecutorStart(), and QueryDesc::totaltime.

Referenced by _PG_init().

◆ PG_MODULE_MAGIC_EXT()

PG_MODULE_MAGIC_EXT ( name = "auto_explain",
version = PG_VERSION 
)

Variable Documentation

◆ auto_explain_log_analyze

bool auto_explain_log_analyze = false
static

Definition at line 33 of file auto_explain.c.

Referenced by _PG_init(), explain_ExecutorEnd(), and explain_ExecutorStart().

◆ auto_explain_log_buffers

bool auto_explain_log_buffers = false
static

Definition at line 35 of file auto_explain.c.

Referenced by _PG_init(), explain_ExecutorEnd(), and explain_ExecutorStart().

◆ auto_explain_log_format

int auto_explain_log_format = EXPLAIN_FORMAT_TEXT
static

Definition at line 40 of file auto_explain.c.

Referenced by _PG_init(), and explain_ExecutorEnd().

◆ auto_explain_log_level

int auto_explain_log_level = LOG
static

Definition at line 41 of file auto_explain.c.

Referenced by _PG_init(), and explain_ExecutorEnd().

◆ auto_explain_log_min_duration

int auto_explain_log_min_duration = -1
static

Definition at line 31 of file auto_explain.c.

Referenced by _PG_init(), explain_ExecutorEnd(), and explain_ExecutorStart().

◆ auto_explain_log_nested_statements

bool auto_explain_log_nested_statements = false
static

Definition at line 42 of file auto_explain.c.

Referenced by _PG_init().

◆ auto_explain_log_parameter_max_length

int auto_explain_log_parameter_max_length = -1
static

Definition at line 32 of file auto_explain.c.

Referenced by _PG_init(), and explain_ExecutorEnd().

◆ auto_explain_log_settings

bool auto_explain_log_settings = false
static

Definition at line 39 of file auto_explain.c.

Referenced by _PG_init(), and explain_ExecutorEnd().

◆ auto_explain_log_timing

bool auto_explain_log_timing = true
static

Definition at line 38 of file auto_explain.c.

Referenced by _PG_init(), explain_ExecutorEnd(), and explain_ExecutorStart().

◆ auto_explain_log_triggers

bool auto_explain_log_triggers = false
static

Definition at line 37 of file auto_explain.c.

Referenced by _PG_init(), and explain_ExecutorEnd().

◆ auto_explain_log_verbose

bool auto_explain_log_verbose = false
static

Definition at line 34 of file auto_explain.c.

Referenced by _PG_init(), and explain_ExecutorEnd().

◆ auto_explain_log_wal

bool auto_explain_log_wal = false
static

Definition at line 36 of file auto_explain.c.

Referenced by _PG_init(), explain_ExecutorEnd(), and explain_ExecutorStart().

◆ auto_explain_sample_rate

double auto_explain_sample_rate = 1
static

Definition at line 43 of file auto_explain.c.

Referenced by _PG_init(), and explain_ExecutorStart().

◆ current_query_sampled

bool current_query_sampled = false
static

Definition at line 71 of file auto_explain.c.

Referenced by explain_ExecutorStart().

◆ format_options

const struct config_enum_entry format_options[]
static
Initial value:
= {
{"text", EXPLAIN_FORMAT_TEXT, false},
{"xml", EXPLAIN_FORMAT_XML, false},
{"json", EXPLAIN_FORMAT_JSON, false},
{"yaml", EXPLAIN_FORMAT_YAML, false},
{NULL, 0, false}
}
@ EXPLAIN_FORMAT_XML
Definition: explain_state.h:30
@ EXPLAIN_FORMAT_YAML
Definition: explain_state.h:32

Definition at line 45 of file auto_explain.c.

Referenced by _PG_init().

◆ loglevel_options

const struct config_enum_entry loglevel_options[]
static
Initial value:
= {
{"debug5", DEBUG5, false},
{"debug4", DEBUG4, false},
{"debug3", DEBUG3, false},
{"debug2", DEBUG2, false},
{"debug1", DEBUG1, false},
{"debug", DEBUG2, true},
{"info", INFO, false},
{"notice", NOTICE, false},
{"warning", WARNING, false},
{"log", LOG, false},
{NULL, 0, false}
}
#define DEBUG3
Definition: elog.h:28
#define WARNING
Definition: elog.h:36
#define DEBUG2
Definition: elog.h:29
#define DEBUG1
Definition: elog.h:30
#define NOTICE
Definition: elog.h:35
#define INFO
Definition: elog.h:34
#define DEBUG5
Definition: elog.h:26
#define DEBUG4
Definition: elog.h:27

Definition at line 53 of file auto_explain.c.

Referenced by _PG_init().

◆ nesting_level

int nesting_level = 0
static

◆ prev_ExecutorEnd

ExecutorEnd_hook_type prev_ExecutorEnd = NULL
static

Definition at line 82 of file auto_explain.c.

Referenced by _PG_init(), and explain_ExecutorEnd().

◆ prev_ExecutorFinish

ExecutorFinish_hook_type prev_ExecutorFinish = NULL
static

Definition at line 81 of file auto_explain.c.

Referenced by _PG_init(), and explain_ExecutorFinish().

◆ prev_ExecutorRun

ExecutorRun_hook_type prev_ExecutorRun = NULL
static

Definition at line 80 of file auto_explain.c.

Referenced by _PG_init(), and explain_ExecutorRun().

◆ prev_ExecutorStart

ExecutorStart_hook_type prev_ExecutorStart = NULL
static

Definition at line 79 of file auto_explain.c.

Referenced by _PG_init(), and explain_ExecutorStart().