65#define BYTES_TO_KILOBYTES(b) (((b) + 1023) / 1024)
199 (*post_parse_analyze_hook) (pstate, query,
jstate);
266 foreach(
lc,
stmt->options)
274 if (
strcmp(p,
"xml") == 0)
276 else if (
strcmp(p,
"json") == 0)
312 (*ExplainOneQuery_hook) (query, cursorOptions, into, es,
349 "explain analyze planner context",
399 if (utilityStmt ==
NULL)
424 elog(
ERROR,
"unexpected object type: %d",
425 (
int)
ctas->objtype);
481 "Utility statements have no plan structure\n");
601 dest->rDestroy(dest);
658 (*explain_per_plan_hook) (plannedstmt, into, es, queryString,
713 for (
int i = 0;
i < num;
i++)
735 for (
int i = 0;
i < num;
i++)
914 if (!
ji ||
ji->created_functions == 0)
938 "Inlining", jit_flags &
PGJIT_INLINE ?
"true" :
"false",
939 "Optimization", jit_flags &
PGJIT_OPT3 ?
"true" :
"false",
940 "Expressions", jit_flags &
PGJIT_EXPR ?
"true" :
"false",
941 "Deforming", jit_flags &
PGJIT_DEFORM ?
"true" :
"false");
947 "Timing: %s %.3f ms (%s %.3f ms), %s %.3f ms, %s %.3f ms, %s %.3f ms, %s %.3f ms\n",
1087 if (params ==
NULL || params->
numParams <= 0 || maxlen == 0)
1091 if (
str &&
str[0] !=
'\0')
1104 if (!
rInfo->ri_TrigDesc || !
rInfo->ri_TrigInstrument)
1106 for (
nt = 0;
nt <
rInfo->ri_TrigDesc->numtriggers;
nt++)
1111 char *conname =
NULL;
1228 if (
plan->targetlist)
1263 if (
plan->disabled_nodes == 0)
1282 foreach(
lc,
aplan->appendplans)
1370 const char *strategy =
NULL;
1398 sname =
"ModifyTable";
1438 sname =
"Merge Join";
1442 sname =
"Hash Join";
1496 sname =
"Foreign Scan";
1500 pname =
"Foreign Scan";
1504 pname =
"Foreign Insert";
1508 pname =
"Foreign Update";
1512 pname =
"Foreign Delete";
1521 sname =
"Custom Scan";
1547 sname =
"Aggregate";
1548 switch (
agg->aggstrategy)
1551 pname =
"Aggregate";
1555 pname =
"GroupAggregate";
1556 strategy =
"Sorted";
1559 pname =
"HashAggregate";
1560 strategy =
"Hashed";
1563 pname =
"MixedAggregate";
1567 pname =
"Aggregate ???";
1598 strategy =
"Sorted";
1601 pname =
"HashSetOp";
1602 strategy =
"Hashed";
1605 pname =
"SetOp ???";
1642 if (
plan->parallel_aware)
1644 if (
plan->async_capable)
1685 if (((
Scan *)
plan)->scanrelid > 0)
1711 const char *indexname =
1728 const char *jointype;
1751 jointype =
"Right Semi";
1754 jointype =
"Right Anti";
1812 plan->startup_cost,
plan->total_cost,
1813 plan->plan_rows,
plan->plan_width);
1845 double nloops = instr->
nloops;
1848 double rows = instr->
ntuples / nloops;
1905 double nloops = instrument->
nloops;
1914 rows = instrument->
ntuples / nloops;
1971 "Index Cond", planstate, ancestors, es);
1976 "Order By", planstate, ancestors, es);
1985 "Index Cond", planstate, ancestors, es);
1990 "Order By", planstate, ancestors, es);
2002 "Index Cond", planstate, ancestors, es);
2007 "Recheck Cond", planstate, ancestors, es);
2020 planstate, ancestors, es);
2046 gather->num_workers, es);
2052 nworkers = ((
GatherState *) planstate)->nworkers_launched;
2070 gm->num_workers, es);
2096 "Function Call", planstate, ancestors,
2110 "Table Function Call", planstate, ancestors,
2170 if (
css->methods->ExplainCustomScan)
2171 css->methods->ExplainCustomScan(
css, ancestors, es);
2176 "Join Filter", planstate, ancestors, es);
2187 "Merge Cond", planstate, ancestors, es);
2189 "Join Filter", planstate, ancestors, es);
2200 "Hash Cond", planstate, ancestors, es);
2202 "Join Filter", planstate, ancestors, es);
2222 "Run Condition", planstate, ancestors, es);
2253 "One-Time Filter", planstate, ancestors, es);
2315 double nloops = instrument->
nloops;
2336 (*explain_per_node_hook) (planstate, ancestors,
relationship,
2421 "Subquery",
NULL, es);
2496 foreach(
lc,
plan->targetlist)
2590 plan->numCols, 0,
plan->sortColIdx,
2591 plan->sortOperators,
plan->collations,
2606 plan->sort.numCols,
plan->nPresortedCols,
2607 plan->sort.sortColIdx,
2608 plan->sort.sortOperators,
plan->sort.collations,
2609 plan->sort.nullsFirst,
2623 plan->numCols, 0,
plan->sortColIdx,
2624 plan->sortOperators,
plan->collations,
2638 if (
plan->numCols > 0 ||
plan->groupingSets)
2643 if (
plan->groupingSets)
2674 foreach(
lc,
agg->chain)
2716 sortnode->
numCols, 0, sortnode->sortColIdx,
2717 sortnode->sortOperators, sortnode->collations,
2718 sortnode->nullsFirst,
2809 for (keyno = 0; keyno < nkeys; keyno++)
2825 if (sortOperators !=
NULL)
2828 sortOperators[keyno],
2851 bool reverse =
false;
2868 if (collname ==
NULL)
2869 elog(
ERROR,
"cache lookup failed for collation %u", collation);
2874 if (sortOperator == typentry->
gt_opr)
2879 else if (sortOperator != typentry->
lt_opr)
2884 elog(
ERROR,
"cache lookup failed for operator %u", sortOperator);
2916 if (
wagg->partNumCols > 0)
2920 wagg->partNumCols,
wagg->partColIdx,
2924 if (
wagg->ordNumCols > 0)
2982 for (
int keyno = 0; keyno < nkeys; keyno++)
3055 foreach(
lc,
tsc->args)
3063 if (
tsc->repeatable)
3110 const char *sortMethod;
3111 const char *spaceType;
3123 sortMethod, spaceType, spaceUsed);
3149 const char *sortMethod;
3150 const char *spaceType;
3168 sortMethod, spaceType, spaceUsed);
3203 if (
groupInfo->sortMethods & sortMethod)
3312 fullsortGroupInfo = &
incrsortstate->incsort_info.fullsortGroupInfo;
3329 prefixsortGroupInfo = &
incrsortstate->incsort_info.prefixsortGroupInfo;
3345 for (n = 0; n <
incrsortstate->shared_info->num_workers; n++)
3439 if (hinstrument.
nbatch > 0)
3461 "Buckets: %d (originally %d) Batches: %d (originally %d) Memory Usage: " UINT64_FORMAT "kB\n",
3472 "Buckets: %d Batches: %d Memory Usage: " UINT64_FORMAT "kB\n",
3623 foreach(
lc,
mplan->param_exprs)
3644 appendStringInfo(es->
str,
"Estimates: capacity=%u distinct keys=%.0f lookups=%.0f hit percent=%.2f%%\n",
3646 mplan->est_calls,
mplan->est_hit_ratio * 100.0);
3660 if (
mstate->stats.cache_misses > 0)
3666 if (
mstate->stats.mem_peak > 0)
3684 mstate->stats.cache_hits,
3685 mstate->stats.cache_misses,
3686 mstate->stats.cache_evictions,
3687 mstate->stats.cache_overflows,
3696 for (
int n = 0; n <
mstate->shared_info->num_workers; n++)
3700 si = &
mstate->shared_info->sinstrument[n];
3706 if (
si->cache_misses == 0)
3725 si->cache_hits,
si->cache_misses,
3726 si->cache_evictions,
si->cache_overflows,
3732 si->cache_hits, es);
3734 si->cache_misses, es);
3736 si->cache_evictions, es);
3738 si->cache_overflows, es);
3765 aggstate->hash_planned_partitions, es);
3789 aggstate->hash_planned_partitions);
3810 if (
aggstate->hash_batches_used > 1)
3824 for (
int n = 0; n <
aggstate->shared_info->num_workers; n++)
3828 int hash_batches_used;
3830 sinstrument = &
aggstate->shared_info->sinstrument[n];
3849 if (hash_batches_used > 1)
3857 hash_batches_used, es);
3965 if (
si->exact_pages == 0 &&
si->lossy_pages == 0)
3975 if (
si->exact_pages > 0)
3977 if (
si->lossy_pages > 0)
3984 si->exact_pages, es);
3986 si->lossy_pages, es);
4028 " size=%.2f in-progress=%.2f\n",
4268 usage->shared_blks_read > 0 ||
4269 usage->shared_blks_dirtied > 0 ||
4270 usage->shared_blks_written > 0);
4272 usage->local_blks_read > 0 ||
4273 usage->local_blks_dirtied > 0 ||
4274 usage->local_blks_written > 0);
4276 usage->temp_blks_written > 0);
4297 usage->shared_blks_read > 0 ||
4298 usage->shared_blks_dirtied > 0 ||
4299 usage->shared_blks_written > 0);
4301 usage->local_blks_read > 0 ||
4302 usage->local_blks_dirtied > 0 ||
4303 usage->local_blks_written > 0);
4305 usage->temp_blks_written > 0);
4322 if (
usage->shared_blks_hit > 0)
4324 usage->shared_blks_hit);
4325 if (
usage->shared_blks_read > 0)
4327 usage->shared_blks_read);
4328 if (
usage->shared_blks_dirtied > 0)
4330 usage->shared_blks_dirtied);
4331 if (
usage->shared_blks_written > 0)
4333 usage->shared_blks_written);
4340 if (
usage->local_blks_hit > 0)
4342 usage->local_blks_hit);
4343 if (
usage->local_blks_read > 0)
4345 usage->local_blks_read);
4346 if (
usage->local_blks_dirtied > 0)
4348 usage->local_blks_dirtied);
4349 if (
usage->local_blks_written > 0)
4351 usage->local_blks_written);
4358 if (
usage->temp_blks_read > 0)
4360 usage->temp_blks_read);
4361 if (
usage->temp_blks_written > 0)
4363 usage->temp_blks_written);
4414 usage->shared_blks_hit, es);
4416 usage->shared_blks_read, es);
4418 usage->shared_blks_dirtied, es);
4420 usage->shared_blks_written, es);
4422 usage->local_blks_hit, es);
4424 usage->local_blks_read, es);
4426 usage->local_blks_dirtied, es);
4428 usage->local_blks_written, es);
4430 usage->temp_blks_read, es);
4432 usage->temp_blks_written, es);
4466 if ((
usage->wal_records > 0) || (
usage->wal_fpi > 0) ||
4467 (
usage->wal_bytes > 0) || (
usage->wal_buffers_full > 0) ||
4468 (
usage->wal_fpi_bytes > 0))
4473 if (
usage->wal_records > 0)
4475 usage->wal_records);
4476 if (
usage->wal_fpi > 0)
4479 if (
usage->wal_bytes > 0)
4482 if (
usage->wal_fpi_bytes > 0)
4484 usage->wal_fpi_bytes);
4485 if (
usage->wal_buffers_full > 0)
4487 usage->wal_buffers_full);
4494 usage->wal_records, es);
4496 usage->wal_fpi, es);
4498 usage->wal_bytes, es);
4500 usage->wal_fpi_bytes, es);
4502 usage->wal_buffers_full, es);
4551 switch (indexorderdir)
4597 char *
namespace =
NULL;
4604 if (refname ==
NULL)
4605 refname =
rte->eref->aliasname;
4670 elog(
ERROR,
"invalid TableFunc type %d",
4705 if (
namespace !=
NULL)
4717 if (
namespace !=
NULL)
4821 fdwroutine !=
NULL &&
4896 &mtstate->
ps, ancestors, es);
4991 switch (
result->result_type)
5036 if (refname ==
NULL)
5037 refname =
rte->eref->aliasname;
5081 for (
j = 0;
j < nplans;
j++)
5083 "Member",
NULL, es);
5139 ancestors =
lcons(
sp, ancestors);
5148 else if (
sp->isInitPlan)
5170 foreach(cell,
css->custom_ps)
5191 wstate->num_workers = num_workers;
5192 wstate->worker_inited = (
bool *)
palloc0(num_workers *
sizeof(
bool));
5195 wstate->worker_state_save = (
int *)
palloc(num_workers *
sizeof(
int));
5213 if (!
wstate->worker_inited[n])
5233 wstate->worker_inited[n] =
true;
5306 for (
int i = 0;
i <
wstate->num_workers;
i++)
void ExplainExecuteQuery(ExecuteStmt *execstmt, IntoClause *into, ExplainState *es, ParseState *pstate, ParamListInfo params)
int bms_next_member(const Bitmapset *a, int prevbit)
bool bms_is_member(int x, const Bitmapset *a)
Bitmapset * bms_add_member(Bitmapset *a, int x)
Bitmapset * bms_add_members(Bitmapset *a, const Bitmapset *b)
#define unconstify(underlying_type, expr)
#define Assert(condition)
#define OidIsValid(objectId)
memcpy(sums, checksumBaseOffsets, sizeof(checksumBaseOffsets))
bool CreateTableAsRelExists(CreateTableAsStmt *ctas)
int GetIntoRelEFlags(IntoClause *intoClause)
DestReceiver * CreateIntoRelDestReceiver(IntoClause *intoClause)
static DataChecksumsWorkerOperation operation
char * defGetString(DefElem *def)
DestReceiver * None_Receiver
void ExecutorEnd(QueryDesc *queryDesc)
void ExecutorFinish(QueryDesc *queryDesc)
void ExecutorStart(QueryDesc *queryDesc, int eflags)
void ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, uint64 count)
const TupleTableSlotOps TTSOpsVirtual
void end_tup_output(TupOutputState *tstate)
void do_text_output_multiline(TupOutputState *tstate, const char *txt)
TupOutputState * begin_tup_output_tupdesc(DestReceiver *dest, TupleDesc tupdesc, const TupleTableSlotOps *tts_ops)
#define outerPlanState(node)
#define innerPlanState(node)
#define EXEC_FLAG_EXPLAIN_GENERIC
#define do_text_output_oneline(tstate, str_to_emit)
#define EXEC_FLAG_EXPLAIN_ONLY
static void show_modifytable_info(ModifyTableState *mtstate, List *ancestors, ExplainState *es)
#define BYTES_TO_KILOBYTES(b)
static void show_plan_tlist(PlanState *planstate, List *ancestors, ExplainState *es)
static void show_memoize_info(MemoizeState *mstate, List *ancestors, ExplainState *es)
static void show_group_keys(GroupState *gstate, List *ancestors, ExplainState *es)
static void ExplainModifyTarget(ModifyTable *plan, ExplainState *es)
static void show_window_def(WindowAggState *planstate, List *ancestors, ExplainState *es)
static void show_result_replacement_info(Result *result, ExplainState *es)
static void show_agg_keys(AggState *astate, List *ancestors, ExplainState *es)
static void show_hashagg_info(AggState *aggstate, ExplainState *es)
static void show_scan_qual(List *qual, const char *qlabel, PlanState *planstate, List *ancestors, ExplainState *es)
static const char * explain_get_index_name(Oid indexId)
static void ExplainIndexScanDetails(Oid indexid, ScanDirection indexorderdir, ExplainState *es)
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)
ExplainOneQuery_hook_type ExplainOneQuery_hook
static void show_instrumentation_count(const char *qlabel, int which, PlanState *planstate, ExplainState *es)
static void ExplainNode(PlanState *planstate, List *ancestors, const char *relationship, const char *plan_name, ExplainState *es)
static void show_incremental_sort_group_info(IncrementalSortGroupInfo *groupInfo, const char *groupLabel, bool indent, ExplainState *es)
static void ExplainMemberNodes(PlanState **planstates, int nplans, List *ancestors, ExplainState *es)
static void show_ctescan_info(CteScanState *ctescanstate, ExplainState *es)
explain_get_index_name_hook_type explain_get_index_name_hook
static bool ExplainPreScanNode(PlanState *planstate, Bitmapset **rels_used)
static void ExplainPrintJIT(ExplainState *es, int jit_flags, JitInstrumentation *ji)
static void show_recursive_union_info(RecursiveUnionState *rstate, ExplainState *es)
void ExplainQuery(ParseState *pstate, ExplainStmt *stmt, ParamListInfo params, DestReceiver *dest)
static void show_incremental_sort_info(IncrementalSortState *incrsortstate, ExplainState *es)
static void show_tablesample(TableSampleClause *tsc, PlanState *planstate, List *ancestors, ExplainState *es)
static void show_upper_qual(List *qual, const char *qlabel, PlanState *planstate, List *ancestors, ExplainState *es)
static void show_sort_info(SortState *sortstate, ExplainState *es)
static void show_window_keys(StringInfo buf, PlanState *planstate, int nkeys, AttrNumber *keycols, List *ancestors, ExplainState *es)
static void ExplainMissingMembers(int nplans, int nchildren, ExplainState *es)
explain_per_node_hook_type explain_per_node_hook
TupleDesc ExplainResultDesc(ExplainStmt *stmt)
static void ExplainFlushWorkersState(ExplainState *es)
static bool peek_buffer_usage(ExplainState *es, const BufferUsage *usage)
void ExplainPrintJITSummary(ExplainState *es, QueryDesc *queryDesc)
static void show_hash_info(HashState *hashstate, ExplainState *es)
static void show_sortorder_options(StringInfo buf, Node *sortexpr, Oid sortOperator, Oid collation, bool nullsFirst)
static void show_table_func_scan_info(TableFuncScanState *tscanstate, ExplainState *es)
static void show_indexsearches_info(PlanState *planstate, ExplainState *es)
static void show_expression(Node *node, const char *qlabel, PlanState *planstate, List *ancestors, bool useprefix, ExplainState *es)
static double elapsed_time(instr_time *starttime)
void ExplainQueryText(ExplainState *es, QueryDesc *queryDesc)
explain_per_plan_hook_type explain_per_plan_hook
static bool plan_is_disabled(Plan *plan)
static void show_sort_group_keys(PlanState *planstate, const char *qlabel, int nkeys, int nPresortedKeys, AttrNumber *keycols, Oid *sortOperators, Oid *collations, bool *nullsFirst, List *ancestors, ExplainState *es)
static void show_tidbitmap_info(BitmapHeapScanState *planstate, ExplainState *es)
static void show_windowagg_info(WindowAggState *winstate, ExplainState *es)
static void show_memory_counters(ExplainState *es, const MemoryContextCounters *mem_counters)
static void show_scan_io_usage(ScanState *planstate, ExplainState *es)
static void ExplainSubPlans(List *plans, List *ancestors, const char *relationship, ExplainState *es)
static void show_foreignscan_info(ForeignScanState *fsstate, ExplainState *es)
static void ExplainScanTarget(Scan *plan, ExplainState *es)
void ExplainPrintPlan(ExplainState *es, QueryDesc *queryDesc)
static void show_merge_append_keys(MergeAppendState *mstate, List *ancestors, ExplainState *es)
static void report_triggers(ResultRelInfo *rInfo, bool show_relname, ExplainState *es)
void ExplainQueryParameters(ExplainState *es, ParamListInfo params, int maxlen)
static void ExplainPrintSerialize(ExplainState *es, SerializeMetrics *metrics)
static void show_grouping_sets(PlanState *planstate, Agg *agg, List *ancestors, ExplainState *es)
static void ExplainPrintSettings(ExplainState *es)
static void ExplainCloseWorker(int n, ExplainState *es)
static void ExplainOpenWorker(int n, ExplainState *es)
static void ExplainOneQuery(Query *query, int cursorOptions, IntoClause *into, ExplainState *es, ParseState *pstate, ParamListInfo params)
static void ExplainTargetRel(Plan *plan, Index rti, ExplainState *es)
void ExplainOneUtility(Node *utilityStmt, IntoClause *into, ExplainState *es, ParseState *pstate, ParamListInfo params)
static void print_io_usage(ExplainState *es, IOStats *stats)
static void show_wal_usage(ExplainState *es, const WalUsage *usage)
static void show_storage_info(char *maxStorageType, int64 maxSpaceUsed, ExplainState *es)
static void show_grouping_set_keys(PlanState *planstate, Agg *aggnode, Sort *sortnode, List *context, bool useprefix, List *ancestors, ExplainState *es)
static void show_qual(List *qual, const char *qlabel, PlanState *planstate, List *ancestors, bool useprefix, ExplainState *es)
static void show_material_info(MaterialState *mstate, ExplainState *es)
static void show_sort_keys(SortState *sortstate, List *ancestors, ExplainState *es)
static ExplainWorkersState * ExplainCreateWorkersState(int num_workers)
void ExplainPrintTriggers(ExplainState *es, QueryDesc *queryDesc)
void standard_ExplainOneQuery(Query *query, int cursorOptions, IntoClause *into, ExplainState *es, const char *queryString, ParamListInfo params, QueryEnvironment *queryEnv)
static void show_buffer_usage(ExplainState *es, const BufferUsage *usage)
static void show_incremental_sort_keys(IncrementalSortState *incrsortstate, List *ancestors, ExplainState *es)
static void ExplainCustomChildren(CustomScanState *css, List *ancestors, ExplainState *es)
const char *(* explain_get_index_name_hook_type)(Oid indexId)
void(* explain_per_plan_hook_type)(PlannedStmt *plannedstmt, IntoClause *into, ExplainState *es, const char *queryString, ParamListInfo params, QueryEnvironment *queryEnv)
void(* explain_per_node_hook_type)(PlanState *planstate, List *ancestors, const char *relationship, const char *plan_name, ExplainState *es)
void(* ExplainOneQuery_hook_type)(Query *query, int cursorOptions, IntoClause *into, ExplainState *es, const char *queryString, ParamListInfo params, QueryEnvironment *queryEnv)
SerializeMetrics GetSerializationMetrics(DestReceiver *dest)
DestReceiver * CreateExplainSerializeDestReceiver(ExplainState *es)
ExplainState * NewExplainState(void)
void ParseExplainOptionList(ExplainState *es, List *options, ParseState *pstate)
@ EXPLAIN_SERIALIZE_BINARY
#define palloc_object(type)
char * GetConfigOptionByName(const char *name, const char **varname, bool missing_ok)
struct config_generic ** get_explain_guc_options(int *num)
#define INSTR_TIME_SET_CURRENT(t)
#define INSTR_TIME_ADD(x, y)
#define INSTR_TIME_IS_ZERO(t)
#define INSTR_TIME_GET_DOUBLE(t)
#define INSTR_TIME_SUBTRACT(x, y)
#define INSTR_TIME_GET_MILLISEC(t)
#define INSTR_TIME_SET_ZERO(t)
BufferUsage pgBufferUsage
void BufferUsageAccumDiff(BufferUsage *dst, const BufferUsage *add, const BufferUsage *sub)
void InstrEndLoop(NodeInstrumentation *instr)
#define NUM_TUPLESORTMETHODS
static void AccumulateIOStats(IOStats *dst, IOStats *src)
@ SORT_TYPE_STILL_IN_PROGRESS
void InstrJitAgg(JitInstrumentation *dst, JitInstrumentation *add)
List * lappend(List *list, void *datum)
List * list_delete_first(List *list)
List * lcons(void *datum, List *list)
char * get_rel_name(Oid relid)
char * get_opname(Oid opno)
Oid get_equality_op_for_ordering_op(Oid opno, bool *reverse)
Oid get_rel_namespace(Oid relid)
Oid get_typcollation(Oid typid)
char * get_collation_name(Oid colloid)
char * get_namespace_name_or_temp(Oid nspid)
char * get_constraint_name(Oid conoid)
char * get_func_name(Oid funcid)
Oid get_func_namespace(Oid funcid)
Expr * make_orclause(List *orclauses)
Expr * make_ands_explicit(List *andclauses)
Expr * make_andclause(List *andclauses)
void MemoryContextMemConsumed(MemoryContext context, MemoryContextCounters *consumed)
char * pstrdup(const char *in)
void pfree(void *pointer)
void * palloc0(Size size)
MemoryContext CurrentMemoryContext
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
Oid exprType(const Node *expr)
#define planstate_tree_walker(ps, w, c)
#define DO_AGGSPLIT_SKIPFINAL(as)
#define IsA(nodeptr, _type_)
#define DO_AGGSPLIT_COMBINE(as)
#define castNode(_type_, nodeptr)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
char * BuildParamLogString(ParamListInfo params, char **knownTextValues, int maxlen)
TargetEntry * get_tle_by_resno(List *tlist, AttrNumber resno)
#define CURSOR_OPT_PARALLEL_OK
#define FRAMEOPTION_NONDEFAULT
post_parse_analyze_hook_type post_parse_analyze_hook
#define rt_fetch(rangetable_index, rangetable)
#define lfirst_node(type, lc)
static int list_length(const List *l)
#define linitial_node(type, l)
#define foreach_current_index(var_or_cell)
static void * list_nth(const List *list, int n)
static ListCell * lnext(const List *l, const ListCell *c)
static char buf[DEFAULT_XLOG_SEG_SIZE]
PlannedStmt * pg_plan_query(Query *querytree, const char *query_string, int cursorOptions, ParamListInfo boundParams, ExplainState *es)
void FreeQueryDesc(QueryDesc *qdesc)
QueryDesc * CreateQueryDesc(PlannedStmt *plannedstmt, const char *sourceText, Snapshot snapshot, Snapshot crosscheck_snapshot, DestReceiver *dest, ParamListInfo params, QueryEnvironment *queryEnv, int instrument_options)
char * psprintf(const char *fmt,...)
@ COMPUTE_QUERY_ID_REGRESS
static bool IsQueryIdEnabled(void)
JumbleState * JumbleQuery(Query *query)
static const struct fns functions
#define RelationGetRelationName(relation)
List * QueryRewrite(Query *parsetree)
List * deparse_context_for_plan_tree(PlannedStmt *pstmt, List *rtable_names)
List * set_deparse_context_plan(List *dpcontext, Plan *plan, List *ancestors)
const char * quote_identifier(const char *ident)
List * select_rtable_names_for_explain(List *rtable, Bitmapset *rels_used)
char * get_window_frame_options_for_explain(int frameOptions, Node *startOffset, Node *endOffset, List *dpcontext, bool forceprefix)
char * deparse_expression(Node *expr, List *dpcontext, bool forceprefix, bool showimplicit)
#define ScanDirectionIsBackward(direction)
@ NoMovementScanDirection
void UpdateActiveSnapshotCommandId(void)
void PopActiveSnapshot(void)
void PushCopiedSnapshot(Snapshot snapshot)
Snapshot GetActiveSnapshot(void)
void resetStringInfo(StringInfo str)
void appendStringInfo(StringInfo str, const char *fmt,...)
void appendStringInfoSpaces(StringInfo str, int count)
void appendStringInfoString(StringInfo str, const char *s)
void appendStringInfoChar(StringInfo str, char ch)
void initStringInfo(StringInfo str)
TableScanInstrumentation stats
BitmapHeapScanInstrumentation stats
SharedBitmapHeapInstrumentation * sinstrument
IndexScanInstrumentation * biss_Instrument
List * es_tuple_routing_result_relations
struct JitContext * es_jit
struct JitInstrumentation * es_jit_worker_instr
Bitmapset * es_unpruned_relids
List * es_trig_target_relations
List * es_opened_result_relations
Bitmapset * printed_subplans
ExplainWorkersState * workers_state
ExplainSerializeOption serialize
ExplainForeignScan_function ExplainForeignScan
ExplainForeignModify_function ExplainForeignModify
ExplainDirectModify_function ExplainDirectModify
struct FdwRoutine * fdwroutine
IncrementalSortGroupInfo prefixsortGroupInfo
IncrementalSortGroupInfo fullsortGroupInfo
IndexScanInstrumentation * ioss_Instrument
IndexScanInstrumentation * iss_Instrument
ResultRelInfo * resultRelInfo
LockClauseStrength onConflictLockStrength
OnConflictAction onConflictAction
QueryEnvironment * p_queryEnv
const char * p_sourcetext
struct SharedJitInstrumentation * worker_jit_instrument
NodeInstrumentation * instrument
WorkerNodeInstrumentation * worker_instrument
PlannedStmt * plannedstmt
Tuplestorestate * working_table
Tuplestorestate * intermediate_table
struct FdwRoutine * ri_FdwRoutine
bool ri_usesFdwDirectModify
struct TableScanDescData * ss_currentScanDesc
TableScanInstrumentation stats
BitmapHeapScanInstrumentation sinstrument[FLEXIBLE_ARRAY_MEMBER]
HashInstrumentation hinstrument[FLEXIBLE_ARRAY_MEMBER]
JitInstrumentation jit_instr[FLEXIBLE_ARRAY_MEMBER]
SeqScanInstrumentation sinstrument[FLEXIBLE_ARRAY_MEMBER]
TuplesortInstrumentation sinstrument[FLEXIBLE_ARRAY_MEMBER]
TidRangeScanInstrumentation sinstrument[FLEXIBLE_ARRAY_MEMBER]
SharedSortInfo * shared_info
struct TableScanInstrumentation * rs_instrument
TableScanInstrumentation stats
TuplesortMethod sortMethod
TuplesortSpaceType spaceType
NodeInstrumentation instrument[FLEXIBLE_ARRAY_MEMBER]
TupleDesc CreateTemplateTupleDesc(int natts)
void TupleDescFinalize(TupleDesc tupdesc)
void TupleDescInitEntry(TupleDesc desc, AttrNumber attributeNumber, const char *attributeName, Oid oidtypeid, int32 typmod, int attdim)
void tuplesort_get_stats(Tuplesortstate *state, TuplesortInstrumentation *stats)
const char * tuplesort_space_type_name(TuplesortSpaceType t)
const char * tuplesort_method_name(TuplesortMethod m)
void tuplestore_get_stats(Tuplestorestate *state, char **max_storage_type, int64 *max_space)
TypeCacheEntry * lookup_type_cache(Oid type_id, int flags)
Datum bit(PG_FUNCTION_ARGS)
void CommandCounterIncrement(void)