|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/xact.h"#include "catalog/pg_type.h"#include "commands/createas.h"#include "commands/defrem.h"#include "commands/explain.h"#include "commands/explain_dr.h"#include "commands/explain_format.h"#include "commands/explain_state.h"#include "commands/prepare.h"#include "foreign/fdwapi.h"#include "jit/jit.h"#include "libpq/pqformat.h"#include "libpq/protocol.h"#include "nodes/extensible.h"#include "nodes/makefuncs.h"#include "nodes/nodeFuncs.h"#include "parser/analyze.h"#include "parser/parsetree.h"#include "rewrite/rewriteHandler.h"#include "storage/bufmgr.h"#include "tcop/tcopprot.h"#include "utils/builtins.h"#include "utils/guc_tables.h"#include "utils/json.h"#include "utils/lsyscache.h"#include "utils/rel.h"#include "utils/ruleutils.h"#include "utils/snapmgr.h"#include "utils/tuplesort.h"#include "utils/typcache.h"#include "utils/xml.h"
Go to the source code of this file.
Macros | |
| #define | BYTES_TO_KILOBYTES(b) (((b) + 1023) / 1024) |
|
static |
Definition at line 1166 of file explain.c.
References fb(), INSTR_TIME_GET_DOUBLE, INSTR_TIME_SET_CURRENT, and INSTR_TIME_SUBTRACT.
Referenced by ExplainOnePlan(), and IsCheckpointOnSchedule().
Definition at line 4049 of file explain.c.
References elog, ERROR, explain_get_index_name_hook, fb(), and get_rel_name().
Referenced by ExplainIndexScanDetails(), and ExplainNode().
|
static |
Definition at line 5060 of file explain.c.
References Assert, StringInfoData::data, EXPLAIN_FORMAT_TEXT, ExplainSaveGroup(), fb(), ExplainState::format, ExplainState::indent, StringInfoData::len, ExplainState::str, and ExplainState::workers_state.
Referenced by ExplainNode(), show_hashagg_info(), show_incremental_sort_info(), show_memoize_info(), show_sort_info(), and show_tidbitmap_info().
|
static |
Definition at line 4981 of file explain.c.
References fb(), palloc(), palloc0(), and palloc_object.
Referenced by ExplainNode().
|
static |
Definition at line 4959 of file explain.c.
References ExplainNode(), fb(), label, lfirst, and list_length().
Referenced by ExplainNode().
|
static |
Definition at line 5096 of file explain.c.
References appendStringInfoString(), StringInfoData::data, ExplainCloseGroup(), ExplainOpenGroup(), fb(), i, pfree(), ExplainState::str, and ExplainState::workers_state.
Referenced by ExplainNode().
|
static |
Definition at line 4357 of file explain.c.
References appendStringInfo(), appendStringInfoString(), BackwardScanDirection, EXPLAIN_FORMAT_TEXT, explain_get_index_name(), ExplainPropertyText(), fb(), ExplainState::format, ForwardScanDirection, quote_identifier(), ScanDirectionIsBackward, and ExplainState::str.
Referenced by ExplainNode().
|
static |
Definition at line 4871 of file explain.c.
References ExplainNode(), fb(), and j.
Referenced by ExplainNode().
|
static |
Definition at line 4889 of file explain.c.
References EXPLAIN_FORMAT_TEXT, ExplainPropertyInteger(), fb(), and format.
Referenced by ExplainNode().
|
static |
Definition at line 4406 of file explain.c.
References ExplainTargetRel(), and plan.
Referenced by ExplainNode().
|
static |
Definition at line 1358 of file explain.c.
References AGG_HASHED, AGG_MIXED, AGG_PLAIN, AGG_SORTED, ExplainState::analyze, appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), ExplainState::buffers, Instrumentation::bufusage, castNode, CMD_DELETE, CMD_INSERT, CMD_MERGE, CMD_SELECT, CMD_UPDATE, ExplainState::costs, DO_AGGSPLIT_COMBINE, DO_AGGSPLIT_SKIPFINAL, EState::es_jit_flags, EXPLAIN_FORMAT_TEXT, explain_get_index_name(), explain_per_node_hook, ExplainCloseGroup(), ExplainCloseWorker(), ExplainCreateWorkersState(), ExplainCustomChildren(), ExplainFlushWorkersState(), ExplainIndentText(), ExplainIndexScanDetails(), ExplainMemberNodes(), ExplainMissingMembers(), ExplainModifyTarget(), ExplainNode(), ExplainOpenGroup(), ExplainOpenWorker(), ExplainPrintJIT(), ExplainPropertyBool(), ExplainPropertyFloat(), ExplainPropertyInteger(), ExplainPropertyText(), ExplainScanTarget(), ExplainSubPlans(), fb(), ExplainState::format, RangeTblFunction::funcexpr, functions, ExplainState::hide_workers, ExplainState::indent, PlanState::initPlan, innerPlanState, INSTR_TIME_GET_MILLISEC, InstrEndLoop(), WorkerInstrumentation::instrument, PlanState::instrument, IsA, SharedJitInstrumentation::jit_instr, JOIN_ANTI, JOIN_FULL, JOIN_INNER, JOIN_LEFT, JOIN_RIGHT, JOIN_RIGHT_ANTI, JOIN_RIGHT_SEMI, JOIN_SEMI, lappend(), lcons(), lfirst, list_delete_first(), list_length(), list_make1, make_andclause(), make_orclause(), NIL, Instrumentation::nloops, nodeTag, Instrumentation::ntuples, Instrumentation::ntuples2, WorkerInstrumentation::num_workers, SharedJitInstrumentation::num_workers, outerPlanState, PlanState::plan, plan, plan_is_disabled(), psprintf(), quote_identifier(), SETOP_HASHED, SETOP_SORTED, SETOPCMD_EXCEPT, SETOPCMD_EXCEPT_ALL, SETOPCMD_INTERSECT, SETOPCMD_INTERSECT_ALL, show_agg_keys(), show_buffer_usage(), show_ctescan_info(), show_expression(), show_foreignscan_info(), show_group_keys(), show_hash_info(), show_hashagg_info(), show_incremental_sort_info(), show_incremental_sort_keys(), show_indexsearches_info(), show_instrumentation_count(), show_material_info(), show_memoize_info(), show_merge_append_keys(), show_modifytable_info(), show_plan_tlist(), show_recursive_union_info(), show_result_replacement_info(), show_scan_qual(), show_sort_info(), show_sort_keys(), show_table_func_scan_info(), show_tablesample(), show_tidbitmap_info(), show_upper_qual(), show_wal_usage(), show_window_def(), show_windowagg_info(), Instrumentation::startup, PlanState::state, ExplainState::str, PlanState::subPlan, ExplainState::timing, Instrumentation::total, ExplainState::verbose, ExplainState::wal, Instrumentation::walusage, PlanState::worker_instrument, PlanState::worker_jit_instrument, and ExplainState::workers_state.
Referenced by ExplainCustomChildren(), ExplainMemberNodes(), ExplainNode(), ExplainPrintPlan(), and ExplainSubPlans().
| void ExplainOnePlan | ( | PlannedStmt * | plannedstmt, |
| IntoClause * | into, | ||
| ExplainState * | es, | ||
| const char * | queryString, | ||
| ParamListInfo | params, | ||
| QueryEnvironment * | queryEnv, | ||
| const instr_time * | planduration, | ||
| const BufferUsage * | bufusage, | ||
| const MemoryContextCounters * | mem_counters | ||
| ) |
Definition at line 495 of file explain.c.
References ExplainState::analyze, appendStringInfoString(), Assert, ExplainState::buffers, CMD_UTILITY, CommandCounterIncrement(), PlannedStmt::commandType, ExplainState::costs, CreateExplainSerializeDestReceiver(), CreateIntoRelDestReceiver(), CreateQueryDesc(), elapsed_time(), EXEC_FLAG_EXPLAIN_GENERIC, EXEC_FLAG_EXPLAIN_ONLY, ExecutorEnd(), ExecutorFinish(), ExecutorRun(), ExecutorStart(), EXPLAIN_FORMAT_TEXT, explain_per_plan_hook, EXPLAIN_SERIALIZE_NONE, ExplainCloseGroup(), ExplainIndentText(), ExplainOpenGroup(), ExplainPrintJITSummary(), ExplainPrintPlan(), ExplainPrintSerialize(), ExplainPrintTriggers(), ExplainPropertyFloat(), fb(), ExplainState::format, ForwardScanDirection, FreeQueryDesc(), ExplainState::generic, GetActiveSnapshot(), GetIntoRelEFlags(), GetSerializationMetrics(), ExplainState::indent, INSTR_TIME_GET_DOUBLE, INSTR_TIME_SET_CURRENT, INSTRUMENT_BUFFERS, INSTRUMENT_ROWS, INSTRUMENT_TIMER, INSTRUMENT_WAL, InvalidSnapshot, NoMovementScanDirection, None_Receiver, peek_buffer_usage(), PopActiveSnapshot(), PushCopiedSnapshot(), ExplainState::serialize, show_buffer_usage(), show_memory_counters(), IntoClause::skipData, ExplainState::str, ExplainState::summary, ExplainState::timing, UpdateActiveSnapshotCommandId(), and ExplainState::wal.
Referenced by ExplainExecuteQuery(), and standard_ExplainOneQuery().
|
static |
Definition at line 294 of file explain.c.
References CMD_UTILITY, Query::commandType, ExplainOneQuery_hook, ExplainOneUtility(), ParseState::p_queryEnv, ParseState::p_sourcetext, standard_ExplainOneQuery(), and Query::utilityStmt.
Referenced by ExplainOneUtility(), and ExplainQuery().
| void ExplainOneUtility | ( | Node * | utilityStmt, |
| IntoClause * | into, | ||
| ExplainState * | es, | ||
| ParseState * | pstate, | ||
| ParamListInfo | params | ||
| ) |
Definition at line 391 of file explain.c.
References appendStringInfoString(), Assert, castNode, copyObject, CreateTableAsRelExists(), CURSOR_OPT_PARALLEL_OK, elog, ERROR, EXPLAIN_FORMAT_TEXT, ExplainDummyGroup(), ExplainExecuteQuery(), ExplainOneQuery(), fb(), ExplainState::format, IsA, IsQueryIdEnabled(), JumbleQuery(), linitial_node, list_length(), OBJECT_MATVIEW, OBJECT_TABLE, post_parse_analyze_hook, QueryRewrite(), and ExplainState::str.
Referenced by ExplainExecuteQuery(), and ExplainOneQuery().
|
static |
Definition at line 4998 of file explain.c.
References appendStringInfo(), Assert, EXPLAIN_FORMAT_TEXT, ExplainIndentText(), ExplainOpenSetAsideGroup(), ExplainPropertyInteger(), ExplainRestoreGroup(), fb(), ExplainState::format, ExplainState::indent, initStringInfo(), StringInfoData::len, ExplainState::str, and ExplainState::workers_state.
Referenced by ExplainNode(), show_hashagg_info(), show_incremental_sort_info(), show_memoize_info(), show_sort_info(), and show_tidbitmap_info().
Definition at line 1185 of file explain.c.
References bms_add_member(), bms_add_members(), ExplainPreScanNode(), fb(), linitial_int, nodeTag, PlanState::plan, plan, and planstate_tree_walker.
Referenced by ExplainPreScanNode(), and ExplainPrintPlan().
|
static |
Definition at line 902 of file explain.c.
References ExplainState::analyze, appendStringInfo(), appendStringInfoString(), EXPLAIN_FORMAT_TEXT, ExplainCloseGroup(), ExplainIndentText(), ExplainOpenGroup(), ExplainPropertyBool(), ExplainPropertyFloat(), ExplainPropertyInteger(), fb(), ExplainState::format, ExplainState::indent, INSTR_TIME_ADD, INSTR_TIME_GET_DOUBLE, INSTR_TIME_SET_ZERO, PGJIT_DEFORM, PGJIT_EXPR, PGJIT_INLINE, PGJIT_OPT3, ExplainState::str, and ExplainState::timing.
Referenced by ExplainNode(), and ExplainPrintJITSummary().
| void ExplainPrintJITSummary | ( | ExplainState * | es, |
| QueryDesc * | queryDesc | ||
| ) |
Definition at line 876 of file explain.c.
References EState::es_jit, EState::es_jit_flags, EState::es_jit_worker_instr, QueryDesc::estate, ExplainPrintJIT(), fb(), JitContext::instr, InstrJitAgg(), and PGJIT_PERFORM.
Referenced by explain_ExecutorEnd(), and ExplainOnePlan().
| void ExplainPrintPlan | ( | ExplainState * | es, |
| QueryDesc * | queryDesc | ||
| ) |
Definition at line 760 of file explain.c.
References Assert, compute_query_id, COMPUTE_QUERY_ID_REGRESS, deparse_context_for_plan_tree(), ExplainState::deparse_cxt, ExplainNode(), ExplainPreScanNode(), ExplainPrintSettings(), ExplainPropertyInteger(), fb(), ExplainState::hide_workers, INT64CONST, IsA, lfirst_node, list_length(), NIL, outerPlanState, QueryDesc::plannedstmt, QueryDesc::planstate, ExplainState::printed_subplans, ps, ExplainState::pstmt, PlannedStmt::queryId, ExplainState::rtable, PlannedStmt::rtable, ExplainState::rtable_names, ExplainState::rtable_size, RTE_GROUP, select_rtable_names_for_explain(), and ExplainState::verbose.
Referenced by explain_ExecutorEnd(), and ExplainOnePlan().
|
static |
Definition at line 1000 of file explain.c.
References appendStringInfo(), Assert, ExplainState::buffers, SerializeMetrics::bufferUsage, BYTES_TO_KILOBYTES, SerializeMetrics::bytesSent, EXPLAIN_FORMAT_TEXT, EXPLAIN_SERIALIZE_BINARY, EXPLAIN_SERIALIZE_TEXT, ExplainCloseGroup(), ExplainIndentText(), ExplainOpenGroup(), ExplainPropertyFloat(), ExplainPropertyText(), ExplainPropertyUInteger(), format, ExplainState::format, ExplainState::indent, INSTR_TIME_GET_DOUBLE, peek_buffer_usage(), ExplainState::serialize, show_buffer_usage(), ExplainState::str, SerializeMetrics::timeSpent, ExplainState::timing, and UINT64_FORMAT.
Referenced by ExplainOnePlan().
|
static |
Definition at line 690 of file explain.c.
References appendStringInfo(), appendStringInfoString(), EXPLAIN_FORMAT_TEXT, ExplainCloseGroup(), ExplainOpenGroup(), ExplainPropertyText(), fb(), ExplainState::format, get_explain_guc_options(), GetConfigOptionByName(), i, initStringInfo(), ExplainState::settings, and str.
Referenced by ExplainPrintPlan().
| void ExplainPrintTriggers | ( | ExplainState * | es, |
| QueryDesc * | queryDesc | ||
| ) |
Definition at line 833 of file explain.c.
References EState::es_opened_result_relations, EState::es_trig_target_relations, EState::es_tuple_routing_result_relations, QueryDesc::estate, ExplainCloseGroup(), ExplainOpenGroup(), fb(), lfirst, list_length(), NIL, and report_triggers().
Referenced by explain_ExecutorEnd(), and ExplainOnePlan().
| void ExplainQuery | ( | ParseState * | pstate, |
| ExplainStmt * | stmt, | ||
| ParamListInfo | params, | ||
| DestReceiver * | dest | ||
| ) |
Definition at line 177 of file explain.c.
References appendStringInfoString(), Assert, begin_tup_output_tupdesc(), castNode, CURSOR_OPT_PARALLEL_OK, StringInfoData::data, do_text_output_multiline(), do_text_output_oneline, end_tup_output(), EXPLAIN_FORMAT_TEXT, ExplainBeginOutput(), ExplainEndOutput(), ExplainOneQuery(), ExplainResultDesc(), ExplainSeparatePlans(), fb(), ExplainState::format, ExplainState::indent, IsQueryIdEnabled(), JumbleQuery(), lfirst_node, lnext(), NewExplainState(), NIL, ParseExplainOptionList(), pfree(), post_parse_analyze_hook, QueryRewrite(), stmt, ExplainState::str, and TTSOpsVirtual.
Referenced by standard_ProcessUtility().
| void ExplainQueryParameters | ( | ExplainState * | es, |
| ParamListInfo | params, | ||
| int | maxlen | ||
| ) |
Definition at line 1075 of file explain.c.
References BuildParamLogString(), ExplainPropertyText(), fb(), ParamListInfoData::numParams, and str.
Referenced by explain_ExecutorEnd().
| void ExplainQueryText | ( | ExplainState * | es, |
| QueryDesc * | queryDesc | ||
| ) |
Definition at line 1060 of file explain.c.
References ExplainPropertyText(), and QueryDesc::sourceText.
Referenced by explain_ExecutorEnd().
| TupleDesc ExplainResultDesc | ( | ExplainStmt * | stmt | ) |
Definition at line 255 of file explain.c.
References CreateTemplateTupleDesc(), defGetString(), DefElem::defname, fb(), lfirst, stmt, and TupleDescInitEntry().
Referenced by ExplainQuery(), and UtilityTupleDescriptor().
|
static |
Definition at line 4393 of file explain.c.
References ExplainTargetRel(), and plan.
Referenced by ExplainNode().
|
static |
Definition at line 4903 of file explain.c.
References bms_add_member(), bms_is_member(), CTE_SUBLINK, ExplainNode(), fb(), lcons(), lfirst, list_delete_first(), ExplainState::printed_subplans, and psprintf().
Referenced by ExplainNode().
|
static |
Definition at line 4415 of file explain.c.
References appendStringInfo(), appendStringInfoString(), Assert, elog, ERROR, EXPLAIN_FORMAT_TEXT, ExplainPropertyText(), fb(), ExplainState::format, RangeTblFunction::funcexpr, FuncExpr::funcid, TableFunc::functype, get_func_name(), get_func_namespace(), get_namespace_name_or_temp(), get_rel_name(), get_rel_namespace(), IsA, linitial, list_length(), list_nth(), nodeTag, plan, quote_identifier(), rt_fetch, ExplainState::rtable, ExplainState::rtable_names, RTE_CTE, RTE_FUNCTION, RTE_NAMEDTUPLESTORE, RTE_RELATION, RTE_TABLEFUNC, RTE_VALUES, ExplainState::str, TFT_JSON_TABLE, TFT_XMLTABLE, and ExplainState::verbose.
Referenced by ExplainModifyTarget(), ExplainScanTarget(), and show_modifytable_info().
|
static |
Definition at line 4073 of file explain.c.
References EXPLAIN_FORMAT_TEXT, fb(), ExplainState::format, INSTR_TIME_IS_ZERO, and usage().
Referenced by ExplainOnePlan(), and ExplainPrintSerialize().
Definition at line 1253 of file explain.c.
References CustomScan::custom_plans, Plan::disabled_nodes, fb(), innerPlan, IsA, lfirst, outerPlan, and plan.
Referenced by ExplainNode().
|
static |
Definition at line 1093 of file explain.c.
References appendStringInfo(), appendStringInfoString(), EXPLAIN_FORMAT_TEXT, ExplainCloseGroup(), ExplainOpenGroup(), ExplainPropertyFloat(), ExplainPropertyText(), fb(), ExplainState::format, get_constraint_name(), INSTR_TIME_GET_MILLISEC, InstrEndLoop(), Instrumentation::ntuples, OidIsValid, pfree(), RelationGetRelationName, relname, ExplainState::str, ExplainState::timing, Instrumentation::total, and ExplainState::verbose.
Referenced by ExplainPrintTriggers().
|
static |
Definition at line 2624 of file explain.c.
References fb(), lcons(), list_delete_first(), outerPlanState, PlanState::plan, plan, ScanState::ps, show_grouping_sets(), show_sort_group_keys(), and AggState::ss.
Referenced by ExplainNode().
|
static |
Definition at line 4113 of file explain.c.
References appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), EXPLAIN_FORMAT_TEXT, ExplainIndentText(), ExplainPropertyFloat(), ExplainPropertyInteger(), fb(), ExplainState::format, INSTR_TIME_GET_MILLISEC, INSTR_TIME_IS_ZERO, ExplainState::str, track_io_timing, and usage().
Referenced by ExplainNode(), ExplainOnePlan(), and ExplainPrintSerialize().
|
static |
Definition at line 3521 of file explain.c.
References ExplainState::analyze, fb(), show_storage_info(), and tuplestore_get_stats().
Referenced by ExplainNode().
|
static |
Definition at line 2504 of file explain.c.
References config_generic::context, ExplainState::deparse_cxt, deparse_expression(), ExplainPropertyText(), fb(), PlanState::plan, and set_deparse_context_plan().
Referenced by ExplainNode(), and show_qual().
|
static |
Definition at line 4021 of file explain.c.
References CMD_SELECT, FdwRoutine::ExplainDirectModify, FdwRoutine::ExplainForeignScan, fb(), ForeignScanState::fdwroutine, PlanState::plan, ScanState::ps, and ForeignScanState::ss.
Referenced by ExplainNode().
|
static |
Definition at line 2756 of file explain.c.
References fb(), lcons(), list_delete_first(), outerPlanState, Group::plan, plan, and show_sort_group_keys().
Referenced by ExplainNode().
|
static |
Definition at line 2678 of file explain.c.
References AGG_HASHED, AGG_MIXED, Agg::aggstrategy, config_generic::context, deparse_expression(), elog, ERROR, EXPLAIN_FORMAT_TEXT, ExplainCloseGroup(), ExplainOpenGroup(), ExplainPropertyListNested(), ExplainPropertyText(), TargetEntry::expr, fb(), ExplainState::format, get_tle_by_resno(), Agg::groupingSets, i, ExplainState::indent, lappend(), lfirst, lfirst_int, NIL, Sort::numCols, PlanState::plan, plan, and show_sort_group_keys().
Referenced by show_grouping_sets().
|
static |
Definition at line 2647 of file explain.c.
References config_generic::context, ExplainState::deparse_cxt, ExplainCloseGroup(), ExplainOpenGroup(), fb(), Plan::lefttree, lfirst, PlanState::plan, Agg::plan, ExplainState::rtable_size, set_deparse_context_plan(), show_grouping_set_keys(), and ExplainState::verbose.
Referenced by show_agg_keys().
|
static |
Definition at line 3383 of file explain.c.
References appendStringInfo(), BYTES_TO_KILOBYTES, EXPLAIN_FORMAT_TEXT, ExplainIndentText(), ExplainPropertyInteger(), ExplainPropertyUInteger(), fb(), ExplainState::format, SharedHashInfo::hinstrument, i, Max, HashInstrumentation::nbatch, HashInstrumentation::nbatch_original, HashInstrumentation::nbuckets, HashInstrumentation::nbuckets_original, SharedHashInfo::num_workers, HashInstrumentation::space_peak, ExplainState::str, and UINT64_FORMAT.
Referenced by ExplainNode().
|
static |
Definition at line 3743 of file explain.c.
References AGG_HASHED, AGG_MIXED, ExplainState::analyze, appendStringInfo(), appendStringInfoChar(), appendStringInfoSpaces(), BYTES_TO_KILOBYTES, ExplainState::costs, EXPLAIN_FORMAT_TEXT, ExplainCloseWorker(), ExplainIndentText(), ExplainOpenWorker(), ExplainPropertyInteger(), fb(), ExplainState::format, AggregateInstrumentation::hash_batches_used, AggregateInstrumentation::hash_disk_used, AggregateInstrumentation::hash_mem_peak, INT64_FORMAT, Agg::plan, ExplainState::str, UINT64_FORMAT, and ExplainState::workers_state.
Referenced by ExplainNode().
|
static |
Definition at line 3183 of file explain.c.
References appendStringInfo(), appendStringInfoSpaces(), appendStringInfoString(), bit(), EXPLAIN_FORMAT_TEXT, ExplainCloseGroup(), ExplainOpenGroup(), ExplainPropertyInteger(), ExplainPropertyList(), fb(), foreach_current_index, ExplainState::format, ExplainState::indent, initStringInfo(), INT64_FORMAT, lappend(), list_length(), NIL, NUM_TUPLESORTMETHODS, SORT_SPACE_TYPE_DISK, SORT_SPACE_TYPE_MEMORY, ExplainState::str, tuplesort_method_name(), tuplesort_space_type_name(), and unconstify.
Referenced by show_incremental_sort_info().
|
static |
Definition at line 3297 of file explain.c.
References ExplainState::analyze, appendStringInfoChar(), EXPLAIN_FORMAT_TEXT, ExplainCloseWorker(), ExplainOpenWorker(), fb(), ExplainState::format, IncrementalSortInfo::fullsortGroupInfo, IncrementalSortGroupInfo::groupCount, IncrementalSortInfo::prefixsortGroupInfo, show_incremental_sort_group_info(), ExplainState::str, ExplainState::verbose, and ExplainState::workers_state.
Referenced by ExplainNode().
|
static |
Definition at line 2591 of file explain.c.
References fb(), plan, and show_sort_group_keys().
Referenced by ExplainNode().
|
static |
Definition at line 3865 of file explain.c.
References ExplainState::analyze, BitmapIndexScanState::biss_Instrument, ExplainPropertyUInteger(), fb(), i, IndexOnlyScanState::ioss_Instrument, IndexScanState::iss_Instrument, nodeTag, IndexScanInstrumentation::nsearches, PlanState::plan, and plan.
Referenced by ExplainNode().
|
static |
Definition at line 3992 of file explain.c.
References ExplainState::analyze, EXPLAIN_FORMAT_TEXT, ExplainPropertyFloat(), fb(), ExplainState::format, PlanState::instrument, Instrumentation::nfiltered1, Instrumentation::nfiltered2, and Instrumentation::nloops.
Referenced by ExplainNode(), and show_modifytable_info().
|
static |
Definition at line 3475 of file explain.c.
References ExplainState::analyze, fb(), show_storage_info(), and tuplestore_get_stats().
Referenced by ExplainNode().
|
static |
Definition at line 3590 of file explain.c.
References ExplainState::analyze, appendStringInfo(), appendStringInfoString(), BYTES_TO_KILOBYTES, config_generic::context, ExplainState::costs, ExplainState::deparse_cxt, deparse_expression(), EXPLAIN_FORMAT_TEXT, ExplainCloseWorker(), ExplainIndentText(), ExplainOpenWorker(), ExplainPropertyFloat(), ExplainPropertyInteger(), ExplainPropertyText(), ExplainPropertyUInteger(), fb(), ExplainState::format, initStringInfo(), INT64_FORMAT, lfirst, pfree(), plan, ExplainState::rtable_size, set_deparse_context_plan(), ExplainState::str, UINT64_FORMAT, ExplainState::verbose, and ExplainState::workers_state.
Referenced by ExplainNode().
|
static |
Definition at line 4331 of file explain.c.
References appendStringInfo(), appendStringInfoChar(), BYTES_TO_KILOBYTES, EXPLAIN_FORMAT_TEXT, ExplainIndentText(), ExplainPropertyInteger(), fb(), ExplainState::format, INT64_FORMAT, and ExplainState::str.
Referenced by ExplainOnePlan().
|
static |
Definition at line 2608 of file explain.c.
References fb(), MergeAppend::plan, plan, and show_sort_group_keys().
Referenced by ExplainNode().
|
static |
Definition at line 4553 of file explain.c.
References ExplainState::analyze, appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), ModifyTable::arbiterIndexes, Assert, bms_is_member(), CMD_DELETE, CMD_INSERT, CMD_MERGE, CMD_UPDATE, EState::es_unpruned_relids, EXPLAIN_FORMAT_TEXT, ExplainCloseGroup(), FdwRoutine::ExplainForeignModify, ExplainIndentText(), ExplainOpenGroup(), ExplainPropertyFloat(), ExplainPropertyList(), ExplainPropertyText(), ExplainTargetRel(), fb(), ModifyTable::fdwPrivLists, ExplainState::format, get_rel_name(), ExplainState::indent, InstrEndLoop(), PlanState::instrument, j, lappend(), lfirst_oid, list_nth(), ModifyTableState::mt_merge_deleted, ModifyTableState::mt_merge_inserted, ModifyTableState::mt_merge_updated, ModifyTableState::mt_nrels, NIL, ModifyTable::nominalRelation, Instrumentation::ntuples2, ONCONFLICT_NONE, ONCONFLICT_NOTHING, ModifyTable::onConflictAction, ModifyTable::onConflictWhere, ModifyTable::operation, outerPlanState, PlanState::plan, ModifyTableState::ps, ModifyTableState::resultRelInfo, ResultRelInfo::ri_FdwRoutine, ResultRelInfo::ri_RangeTableIndex, ResultRelInfo::ri_usesFdwDirectModify, show_instrumentation_count(), show_upper_qual(), PlanState::state, and ExplainState::str.
Referenced by ExplainNode().
|
static |
Definition at line 2446 of file explain.c.
References CMD_SELECT, config_generic::context, ExplainState::deparse_cxt, deparse_expression(), ExplainPropertyList(), fb(), IsA, lappend(), lfirst, NIL, PlanState::plan, plan, ExplainState::rtable_size, and set_deparse_context_plan().
Referenced by ExplainNode().
|
static |
Definition at line 2527 of file explain.c.
References fb(), make_ands_explicit(), NIL, and show_expression().
Referenced by show_scan_qual(), and show_upper_qual().
|
static |
Definition at line 3559 of file explain.c.
References ExplainState::analyze, fb(), RecursiveUnionState::intermediate_table, show_storage_info(), tuplestore_get_stats(), and RecursiveUnionState::working_table.
Referenced by ExplainNode().
|
static |
Definition at line 4771 of file explain.c.
References appendStringInfoString(), Assert, bms_next_member(), buf, ExplainPropertyText(), fb(), initStringInfo(), Plan::lefttree, list_nth(), Result::plan, psprintf(), Result::relids, Result::result_type, RESULT_TYPE_GATING, RESULT_TYPE_JOIN, RESULT_TYPE_MINMAX, RESULT_TYPE_SCAN, RESULT_TYPE_UPPER, rt_fetch, ExplainState::rtable, ExplainState::rtable_names, RTE_JOIN, and RTE_RESULT.
Referenced by ExplainNode().
|
static |
Definition at line 2548 of file explain.c.
References fb(), IsA, PlanState::plan, show_qual(), and ExplainState::verbose.
Referenced by ExplainNode().
|
static |
Definition at line 2776 of file explain.c.
References appendStringInfoString(), config_generic::context, ExplainState::deparse_cxt, deparse_expression(), elog, ERROR, ExplainPropertyList(), TargetEntry::expr, fb(), get_tle_by_resno(), initStringInfo(), lappend(), NIL, PlanState::plan, plan, pstrdup(), resetStringInfo(), ExplainState::rtable_size, set_deparse_context_plan(), show_sortorder_options(), and ExplainState::verbose.
Referenced by show_agg_keys(), show_group_keys(), show_grouping_set_keys(), show_incremental_sort_keys(), show_merge_append_keys(), and show_sort_keys().
|
static |
Definition at line 3092 of file explain.c.
References ExplainState::analyze, appendStringInfo(), EXPLAIN_FORMAT_TEXT, ExplainCloseWorker(), ExplainIndentText(), ExplainOpenWorker(), ExplainPropertyInteger(), ExplainPropertyText(), fb(), ExplainState::format, INT64_FORMAT, SharedSortInfo::num_workers, SortState::shared_info, SharedSortInfo::sinstrument, SortState::sort_Done, SORT_TYPE_STILL_IN_PROGRESS, TuplesortInstrumentation::sortMethod, TuplesortInstrumentation::spaceType, TuplesortInstrumentation::spaceUsed, ExplainState::str, tuplesort_get_stats(), tuplesort_method_name(), tuplesort_space_type_name(), SortState::tuplesortstate, and ExplainState::workers_state.
Referenced by ExplainNode().
|
static |
Definition at line 2576 of file explain.c.
References PlanState::plan, plan, ScanState::ps, show_sort_group_keys(), and SortState::ss.
Referenced by ExplainNode().
|
static |
Definition at line 2838 of file explain.c.
References appendStringInfo(), appendStringInfoString(), buf, elog, ERROR, exprType(), fb(), get_collation_name(), get_equality_op_for_ordering_op(), get_opname(), get_typcollation(), TypeCacheEntry::gt_opr, lookup_type_cache(), TypeCacheEntry::lt_opr, OidIsValid, quote_identifier(), TYPECACHE_GT_OPR, and TYPECACHE_LT_OPR.
Referenced by show_sort_group_keys().
|
static |
Definition at line 3003 of file explain.c.
References appendStringInfo(), BYTES_TO_KILOBYTES, EXPLAIN_FORMAT_TEXT, ExplainIndentText(), ExplainPropertyInteger(), ExplainPropertyText(), fb(), ExplainState::format, INT64_FORMAT, and ExplainState::str.
Referenced by show_ctescan_info(), show_material_info(), show_recursive_union_info(), show_table_func_scan_info(), and show_windowagg_info().
|
static |
Definition at line 3540 of file explain.c.
References ExplainState::analyze, fb(), show_storage_info(), and tuplestore_get_stats().
Referenced by ExplainNode().
|
static |
Definition at line 3026 of file explain.c.
References appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), arg, config_generic::context, ExplainState::deparse_cxt, deparse_expression(), EXPLAIN_FORMAT_TEXT, ExplainIndentText(), ExplainPropertyList(), ExplainPropertyText(), fb(), ExplainState::format, get_func_name(), lappend(), lfirst, NIL, PlanState::plan, ExplainState::rtable_size, set_deparse_context_plan(), and ExplainState::str.
Referenced by ExplainNode().
|
static |
Definition at line 3923 of file explain.c.
References ExplainState::analyze, appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), BitmapHeapScanInstrumentation::exact_pages, EXPLAIN_FORMAT_TEXT, ExplainCloseWorker(), ExplainIndentText(), ExplainOpenWorker(), ExplainPropertyUInteger(), fb(), ExplainState::format, BitmapHeapScanInstrumentation::lossy_pages, SharedBitmapHeapInstrumentation::num_workers, BitmapHeapScanState::pstate, SharedBitmapHeapInstrumentation::sinstrument, BitmapHeapScanState::sinstrument, BitmapHeapScanState::stats, ExplainState::str, UINT64_FORMAT, and ExplainState::workers_state.
Referenced by ExplainNode().
|
static |
Definition at line 2562 of file explain.c.
References fb(), ExplainState::rtable_size, show_qual(), and ExplainState::verbose.
Referenced by ExplainNode(), and show_modifytable_info().
|
static |
Definition at line 4282 of file explain.c.
References appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), EXPLAIN_FORMAT_TEXT, ExplainIndentText(), ExplainPropertyInteger(), ExplainPropertyUInteger(), fb(), ExplainState::format, ExplainState::str, and usage().
Referenced by ExplainNode().
|
static |
Definition at line 2896 of file explain.c.
References appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), config_generic::context, ExplainState::deparse_cxt, ExplainPropertyText(), fb(), FRAMEOPTION_NONDEFAULT, get_window_frame_options_for_explain(), initStringInfo(), lcons(), list_delete_first(), outerPlanState, pfree(), PlanState::plan, ScanState::ps, quote_identifier(), ExplainState::rtable_size, set_deparse_context_plan(), show_window_keys(), WindowAggState::ss, and ExplainState::verbose.
Referenced by ExplainNode().
|
static |
Definition at line 2959 of file explain.c.
References appendStringInfoString(), buf, config_generic::context, ExplainState::deparse_cxt, deparse_expression(), elog, ERROR, TargetEntry::expr, fb(), get_tle_by_resno(), pfree(), PlanState::plan, plan, ExplainState::rtable_size, set_deparse_context_plan(), and ExplainState::verbose.
Referenced by show_window_def().
|
static |
Definition at line 3498 of file explain.c.
References ExplainState::analyze, WindowAggState::buffer, fb(), show_storage_info(), and tuplestore_get_stats().
Referenced by ExplainNode().
| void standard_ExplainOneQuery | ( | Query * | query, |
| int | cursorOptions, | ||
| IntoClause * | into, | ||
| ExplainState * | es, | ||
| const char * | queryString, | ||
| ParamListInfo | params, | ||
| QueryEnvironment * | queryEnv | ||
| ) |
Definition at line 319 of file explain.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, ExplainState::buffers, BufferUsageAccumDiff(), CurrentMemoryContext, ExplainOnePlan(), fb(), INSTR_TIME_SET_CURRENT, INSTR_TIME_SUBTRACT, ExplainState::memory, MemoryContextMemConsumed(), MemoryContextSwitchTo(), pg_plan_query(), pgBufferUsage, and plan.
Referenced by ExplainOneQuery().
| explain_get_index_name_hook_type explain_get_index_name_hook = NULL |
Definition at line 53 of file explain.c.
Referenced by explain_get_index_name().
| explain_per_node_hook_type explain_per_node_hook = NULL |
Definition at line 57 of file explain.c.
Referenced by _PG_init(), and ExplainNode().
| explain_per_plan_hook_type explain_per_plan_hook = NULL |
Definition at line 56 of file explain.c.
Referenced by _PG_init(), and ExplainOnePlan().
| ExplainOneQuery_hook_type ExplainOneQuery_hook = NULL |
Definition at line 50 of file explain.c.
Referenced by ExplainOneQuery().