55 {
"info",
INFO,
false},
68 #define auto_explain_enabled() \
69 (auto_explain_log_min_duration >= 0 && \
70 (nesting_level == 0 || auto_explain_log_nested_statements) && \
71 current_query_sampled)
82 uint64 count,
bool execute_once);
95 "Sets the minimum execution time above which plans will be logged.",
96 "Zero prints all plans. -1 turns this feature off.",
107 "Sets the maximum length of query parameters to log.",
108 "Zero logs no query parameters, -1 logs them in full.",
119 "Use EXPLAIN ANALYZE for plan logging.",
130 "Log modified configuration parameters affecting query planning.",
141 "Use EXPLAIN VERBOSE for plan logging.",
152 "Log buffers usage.",
174 "Include trigger statistics in plans.",
175 "This has no effect unless log_analyze is also set.",
185 "EXPLAIN format to be used for plan logging.",
197 "Log level for the plan.",
209 "Log nested statements.",
220 "Collect timing data, not just row counts.",
231 "Fraction of queries to process.",
324 uint64 count,
bool execute_once)
430 (
errmsg(
"duration: %.3f ms plan:\n%s",
static ExecutorRun_hook_type prev_ExecutorRun
static int auto_explain_log_min_duration
static bool auto_explain_log_analyze
static void explain_ExecutorEnd(QueryDesc *queryDesc)
static bool auto_explain_log_wal
#define auto_explain_enabled()
static double auto_explain_sample_rate
static bool auto_explain_log_nested_statements
static int auto_explain_log_parameter_max_length
static bool auto_explain_log_verbose
static void explain_ExecutorFinish(QueryDesc *queryDesc)
static bool current_query_sampled
static void explain_ExecutorStart(QueryDesc *queryDesc, int eflags)
static ExecutorStart_hook_type prev_ExecutorStart
static const struct config_enum_entry loglevel_options[]
static bool auto_explain_log_timing
static int auto_explain_log_format
static bool auto_explain_log_buffers
static bool auto_explain_log_triggers
static const struct config_enum_entry format_options[]
static ExecutorEnd_hook_type prev_ExecutorEnd
static int auto_explain_log_level
static void explain_ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, uint64 count, bool execute_once)
static ExecutorFinish_hook_type prev_ExecutorFinish
static bool auto_explain_log_settings
int errhidestmt(bool hide_stmt)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
ExecutorEnd_hook_type ExecutorEnd_hook
ExecutorFinish_hook_type ExecutorFinish_hook
ExecutorStart_hook_type ExecutorStart_hook
void standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
void standard_ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, uint64 count, bool execute_once)
ExecutorRun_hook_type ExecutorRun_hook
void standard_ExecutorEnd(QueryDesc *queryDesc)
void standard_ExecutorFinish(QueryDesc *queryDesc)
void(* ExecutorRun_hook_type)(QueryDesc *queryDesc, ScanDirection direction, uint64 count, bool execute_once)
void(* ExecutorFinish_hook_type)(QueryDesc *queryDesc)
void(* ExecutorStart_hook_type)(QueryDesc *queryDesc, int eflags)
void(* ExecutorEnd_hook_type)(QueryDesc *queryDesc)
#define EXEC_FLAG_EXPLAIN_ONLY
void ExplainEndOutput(ExplainState *es)
void ExplainPrintJITSummary(ExplainState *es, QueryDesc *queryDesc)
void ExplainQueryText(ExplainState *es, QueryDesc *queryDesc)
void ExplainBeginOutput(ExplainState *es)
ExplainState * NewExplainState(void)
void ExplainPrintPlan(ExplainState *es, QueryDesc *queryDesc)
void ExplainQueryParameters(ExplainState *es, ParamListInfo params, int maxlen)
void ExplainPrintTriggers(ExplainState *es, QueryDesc *queryDesc)
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)
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)
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)
void MarkGUCPrefixReserved(const char *className)
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)
#define IsParallelWorker()
void InstrEndLoop(Instrumentation *instr)
Instrumentation * InstrAlloc(int n, int instrument_options, bool async_mode)
double pg_prng_double(pg_prng_state *state)
pg_prng_state pg_global_prng_state
MemoryContextSwitchTo(old_ctx)
MemoryContext es_query_cxt
struct Instrumentation * totaltime