|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <limits.h>#include "access/parallel.h"#include "commands/defrem.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 "nodes/makefuncs.h"#include "nodes/value.h"#include "parser/scansup.h"#include "utils/guc.h"#include "utils/varlena.h"
Go to the source code of this file.
Data Structures | |
| struct | auto_explain_option |
| struct | auto_explain_extension_options |
Macros | |
| #define | auto_explain_enabled() |
Typedefs | |
| typedef struct auto_explain_option | auto_explain_option |
| typedef struct auto_explain_extension_options | auto_explain_extension_options |
Functions | |
| PG_MODULE_MAGIC_EXT (.name="auto_explain",.version=PG_VERSION) | |
| static void | 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) |
| static bool | check_log_extension_options (char **newval, void **extra, GucSource source) |
| static void | assign_log_extension_options (const char *newval, void *extra) |
| static void | apply_extension_options (ExplainState *es, auto_explain_extension_options *ext) |
| static char * | auto_explain_scan_literal (char **endp, char **nextp) |
| static int | auto_explain_split_options (char *rawstring, auto_explain_option *options, int maxoptions, char **errmsg) |
| void | _PG_init (void) |
| #define auto_explain_enabled | ( | ) |
Definition at line 104 of file auto_explain.c.
Definition at line 136 of file auto_explain.c.
References assign_log_extension_options(), auto_explain_log_analyze, auto_explain_log_buffers, auto_explain_log_extension_options, auto_explain_log_format, auto_explain_log_io, 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, check_log_extension_options(), DefineCustomBoolVariable(), DefineCustomEnumVariable(), DefineCustomIntVariable(), DefineCustomRealVariable(), DefineCustomStringVariable(), 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.
|
static |
Definition at line 590 of file auto_explain.c.
References ApplyExtensionExplainOption(), arg, fb(), i, makeDefElem(), makeFloat(), makeInteger(), makeString(), auto_explain_option::name, auto_explain_extension_options::noptions, auto_explain_extension_options::options, auto_explain_option::type, and auto_explain_option::value.
Referenced by explain_ExecutorEnd().
Definition at line 581 of file auto_explain.c.
References extension_options.
Referenced by _PG_init().
Definition at line 622 of file auto_explain.c.
Referenced by auto_explain_split_options().
|
static |
Definition at line 663 of file auto_explain.c.
References auto_explain_scan_literal(), errmsg, fb(), name, noptions, scan_identifier(), scanner_isspace(), T_Invalid, type, and value.
Referenced by check_log_extension_options().
Definition at line 506 of file auto_explain.c.
References auto_explain_split_options(), errmsg, fb(), GUC_check_errdetail, guc_free(), guc_malloc(), GUCCheckExplainExtensionOption(), i, LOG, memcpy(), name, newval, result, type, and value.
Referenced by _PG_init().
Definition at line 421 of file auto_explain.c.
References ExplainState::analyze, apply_extension_options(), auto_explain_enabled, auto_explain_log_analyze, auto_explain_log_buffers, auto_explain_log_format, auto_explain_log_io, 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, EState::es_queryEnv, QueryDesc::estate, EXPLAIN_FORMAT_JSON, explain_per_plan_hook, ExplainBeginOutput(), ExplainEndOutput(), ExplainPrintJITSummary(), ExplainPrintPlan(), ExplainPrintTriggers(), ExplainQueryParameters(), ExplainQueryText(), extension_options, fb(), ExplainState::format, INSTR_TIME_GET_MILLISEC, QueryDesc::instrument_options, ExplainState::io, StringInfoData::len, MemoryContextSwitchTo(), NewExplainState(), QueryDesc::params, QueryDesc::plannedstmt, prev_ExecutorEnd, QueryDesc::query_instr, ExplainState::settings, QueryDesc::sourceText, standard_ExecutorEnd(), ExplainState::str, ExplainState::summary, ExplainState::timing, Instrumentation::total, ExplainState::verbose, and ExplainState::wal.
Referenced by _PG_init().
Definition at line 400 of file auto_explain.c.
References nesting_level, PG_END_TRY, PG_FINALLY, PG_TRY, prev_ExecutorFinish, and standard_ExecutorFinish().
Referenced by _PG_init().
|
static |
Definition at line 378 of file auto_explain.c.
References nesting_level, PG_END_TRY, PG_FINALLY, PG_TRY, prev_ExecutorRun, and standard_ExecutorRun().
Referenced by _PG_init().
Definition at line 327 of file auto_explain.c.
References auto_explain_enabled, auto_explain_log_analyze, auto_explain_log_buffers, auto_explain_log_io, auto_explain_log_min_duration, auto_explain_log_timing, auto_explain_log_wal, auto_explain_sample_rate, current_query_sampled, EXEC_FLAG_EXPLAIN_ONLY, INSTRUMENT_BUFFERS, INSTRUMENT_IO, QueryDesc::instrument_options, INSTRUMENT_ROWS, INSTRUMENT_TIMER, INSTRUMENT_WAL, IsParallelWorker, nesting_level, pg_global_prng_state, pg_prng_double(), prev_ExecutorStart, QueryDesc::query_instr_options, and standard_ExecutorStart().
Referenced by _PG_init().
| PG_MODULE_MAGIC_EXT | ( | . | name = "auto_explain", |
| . | version = PG_VERSION |
||
| ) |
Definition at line 38 of file auto_explain.c.
Referenced by _PG_init(), explain_ExecutorEnd(), and explain_ExecutorStart().
Definition at line 40 of file auto_explain.c.
Referenced by _PG_init(), explain_ExecutorEnd(), and explain_ExecutorStart().
Definition at line 50 of file auto_explain.c.
Referenced by _PG_init().
|
static |
Definition at line 46 of file auto_explain.c.
Referenced by _PG_init(), and explain_ExecutorEnd().
Definition at line 41 of file auto_explain.c.
Referenced by _PG_init(), explain_ExecutorEnd(), and explain_ExecutorStart().
Definition at line 47 of file auto_explain.c.
Referenced by _PG_init(), and explain_ExecutorEnd().
|
static |
Definition at line 36 of file auto_explain.c.
Referenced by _PG_init(), explain_ExecutorEnd(), and explain_ExecutorStart().
Definition at line 48 of file auto_explain.c.
Referenced by _PG_init().
|
static |
Definition at line 37 of file auto_explain.c.
Referenced by _PG_init(), and explain_ExecutorEnd().
Definition at line 45 of file auto_explain.c.
Referenced by _PG_init(), and explain_ExecutorEnd().
Definition at line 44 of file auto_explain.c.
Referenced by _PG_init(), explain_ExecutorEnd(), and explain_ExecutorStart().
Definition at line 43 of file auto_explain.c.
Referenced by _PG_init(), and explain_ExecutorEnd().
Definition at line 39 of file auto_explain.c.
Referenced by _PG_init(), and explain_ExecutorEnd().
Definition at line 42 of file auto_explain.c.
Referenced by _PG_init(), explain_ExecutorEnd(), and explain_ExecutorStart().
|
static |
Definition at line 49 of file auto_explain.c.
Referenced by _PG_init(), and explain_ExecutorStart().
Definition at line 102 of file auto_explain.c.
Referenced by explain_ExecutorStart().
|
static |
Definition at line 74 of file auto_explain.c.
Referenced by assign_log_extension_options(), and explain_ExecutorEnd().
|
static |
Definition at line 76 of file auto_explain.c.
Referenced by _PG_init().
|
static |
Definition at line 84 of file auto_explain.c.
Referenced by _PG_init().
|
static |
Definition at line 99 of file auto_explain.c.
Referenced by explain_ExecutorFinish(), explain_ExecutorRun(), and explain_ExecutorStart().
|
static |
Definition at line 113 of file auto_explain.c.
Referenced by _PG_init(), and explain_ExecutorEnd().
|
static |
Definition at line 112 of file auto_explain.c.
Referenced by _PG_init(), and explain_ExecutorFinish().
|
static |
Definition at line 111 of file auto_explain.c.
Referenced by _PG_init(), and explain_ExecutorRun().
|
static |
Definition at line 110 of file auto_explain.c.
Referenced by _PG_init(), and explain_ExecutorStart().