PostgreSQL Source Code git master
|
#include "nodes/execnodes.h"
#include "nodes/parsenodes.h"
#include "nodes/plannodes.h"
#include "partitioning/partprune.h"
Go to the source code of this file.
Data Structures | |
struct | PartitionedRelPruningData |
struct | PartitionPruningData |
struct | PartitionPruneState |
Typedefs | |
typedef struct PartitionDispatchData * | PartitionDispatch |
typedef struct PartitionTupleRouting | PartitionTupleRouting |
typedef struct PartitionedRelPruningData | PartitionedRelPruningData |
typedef struct PartitionPruningData | PartitionPruningData |
typedef struct PartitionPruneState | PartitionPruneState |
Functions | |
PartitionTupleRouting * | ExecSetupPartitionTupleRouting (EState *estate, Relation rel) |
ResultRelInfo * | ExecFindPartition (ModifyTableState *mtstate, ResultRelInfo *rootResultRelInfo, PartitionTupleRouting *proute, TupleTableSlot *slot, EState *estate) |
void | ExecCleanupTupleRouting (ModifyTableState *mtstate, PartitionTupleRouting *proute) |
PartitionPruneState * | ExecInitPartitionPruning (PlanState *planstate, int n_total_subplans, PartitionPruneInfo *pruneinfo, Bitmapset **initially_valid_subplans) |
Bitmapset * | ExecFindMatchingSubPlans (PartitionPruneState *prunestate, bool initial_prune) |
typedef struct PartitionDispatchData* PartitionDispatch |
Definition at line 22 of file execPartition.h.
typedef struct PartitionedRelPruningData PartitionedRelPruningData |
typedef struct PartitionPruneState PartitionPruneState |
typedef struct PartitionPruningData PartitionPruningData |
typedef struct PartitionTupleRouting PartitionTupleRouting |
Definition at line 23 of file execPartition.h.
void ExecCleanupTupleRouting | ( | ModifyTableState * | mtstate, |
PartitionTupleRouting * | proute | ||
) |
Definition at line 1231 of file execPartition.c.
References FdwRoutine::EndForeignInsert, ExecCloseIndices(), ExecDropSingleTupleTableSlot(), i, PartitionTupleRouting::is_borrowed_rel, NoLock, PartitionTupleRouting::num_dispatch, PartitionTupleRouting::num_partitions, PartitionTupleRouting::partition_dispatch_info, PartitionTupleRouting::partitions, ModifyTableState::ps, PartitionDispatchData::reldesc, ResultRelInfo::ri_FdwRoutine, ResultRelInfo::ri_RelationDesc, PlanState::state, table_close(), and PartitionDispatchData::tupslot.
Referenced by CopyFrom(), ExecEndModifyTable(), and finish_edata().
Bitmapset * ExecFindMatchingSubPlans | ( | PartitionPruneState * | prunestate, |
bool | initial_prune | ||
) |
Definition at line 2301 of file execPartition.c.
References Assert, bms_add_members(), bms_copy(), PartitionPruneState::do_exec_prune, PartitionedRelPruningData::exec_context, PartitionedRelPruningData::exec_pruning_steps, PartitionPruneContext::exprcontext, find_matching_subplans_recurse(), i, MemoryContextReset(), MemoryContextSwitchTo(), PartitionPruneState::num_partprunedata, PartitionPruneState::other_subplans, PartitionPruneState::partprunedata, PartitionPruningData::partrelprunedata, PartitionPruneState::prune_context, and ResetExprContext.
Referenced by choose_next_subplan_for_leader(), choose_next_subplan_for_worker(), choose_next_subplan_locally(), ExecAppendAsyncBegin(), ExecInitPartitionPruning(), and ExecMergeAppend().
ResultRelInfo * ExecFindPartition | ( | ModifyTableState * | mtstate, |
ResultRelInfo * | rootResultRelInfo, | ||
PartitionTupleRouting * | proute, | ||
TupleTableSlot * | slot, | ||
EState * | estate | ||
) |
Definition at line 262 of file execPartition.c.
References Assert, TupleConversionMap::attrMap, PartitionDescData::boundinfo, CHECK_FOR_INTERRUPTS, CheckValidResultRel(), CMD_INSERT, PartitionBoundInfoData::default_index, ExprContext::ecxt_scantuple, ereport, errcode(), errdetail(), errmsg(), ERROR, errtable(), ExecBuildSlotPartitionKeyDescription(), ExecClearTuple(), ExecGetRootToChildMap(), ExecInitPartitionDispatchInfo(), ExecInitPartitionInfo(), ExecInitRoutingInfo(), ExecLookupResultRelByOid(), ExecPartitionCheck(), execute_attr_map_slot(), FormPartitionKeyDatum(), get_partition_for_tuple(), GetPerTupleExprContext, GetPerTupleMemoryContext, PartitionDispatchData::indexes, PartitionDescData::is_leaf, likely, MemoryContextSwitchTo(), NIL, PartitionTupleRouting::nonleaf_partitions, PartitionDescData::nparts, PartitionTupleRouting::num_dispatch, PartitionTupleRouting::num_partitions, OidIsValid, PartitionDescData::oids, PartitionDispatchData::partdesc, PartitionTupleRouting::partition_dispatch_info, PARTITION_MAX_KEYS, PartitionTupleRouting::partitions, RelationData::rd_rel, RelationGetRelationName, RelationGetRelid, PartitionDispatchData::reldesc, ResultRelInfo::ri_PartitionTupleSlot, ResultRelInfo::ri_RelationDesc, ModifyTableState::rootResultRelInfo, PartitionDispatchData::tupmap, PartitionDispatchData::tupslot, and values.
Referenced by apply_handle_tuple_routing(), CopyFrom(), and ExecPrepareTupleRouting().
PartitionPruneState * ExecInitPartitionPruning | ( | PlanState * | planstate, |
int | n_total_subplans, | ||
PartitionPruneInfo * | pruneinfo, | ||
Bitmapset ** | initially_valid_subplans | ||
) |
Definition at line 1799 of file execPartition.c.
References Assert, bms_add_range(), bms_num_members(), CreatePartitionPruneState(), PartitionPruneState::do_exec_prune, PartitionPruneState::do_initial_prune, ExecAssignExprContext(), ExecFindMatchingSubPlans(), PartitionPruneFixSubPlanMap(), and PlanState::state.
Referenced by ExecInitAppend(), and ExecInitMergeAppend().
PartitionTupleRouting * ExecSetupPartitionTupleRouting | ( | EState * | estate, |
Relation | rel | ||
) |
Definition at line 215 of file execPartition.c.
References CurrentMemoryContext, ExecInitPartitionDispatchInfo(), PartitionTupleRouting::memcxt, palloc0(), PartitionTupleRouting::partition_root, and RelationGetRelid.
Referenced by apply_handle_tuple_routing(), CopyFrom(), ExecCrossPartitionUpdate(), ExecInitMerge(), and ExecInitModifyTable().