@ -253,7 +253,9 @@ void standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
|
||||
t_thrd.utils_cxt.mctx_sequent_count = 0;
|
||||
|
||||
/* Initialize the memory tracking information */
|
||||
MemoryTrackingInit();
|
||||
if (u_sess->attr.attr_memory.memory_tracking_mode > MEMORY_TRACKING_NONE) {
|
||||
MemoryTrackingInit();
|
||||
}
|
||||
|
||||
/*
|
||||
* Build EState, switch into per-query memory context for startup.
|
||||
@ -262,11 +264,13 @@ void standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
|
||||
queryDesc->estate = estate;
|
||||
|
||||
/* record the init memory track of the executor engine */
|
||||
if (u_sess->attr.attr_memory.memory_tracking_mode > MEMORY_TRACKING_NONE) {
|
||||
#ifndef ENABLE_MEMORY_CHECK
|
||||
t_thrd.utils_cxt.ExecutorMemoryTrack = ((AllocSet)(estate->es_query_cxt))->track;
|
||||
t_thrd.utils_cxt.ExecutorMemoryTrack = ((AllocSet)(estate->es_query_cxt))->track;
|
||||
#else
|
||||
t_thrd.utils_cxt.ExecutorMemoryTrack = ((AsanSet)(estate->es_query_cxt))->track;
|
||||
t_thrd.utils_cxt.ExecutorMemoryTrack = ((AsanSet)(estate->es_query_cxt))->track;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef ENABLE_MULTIPLE_NODES
|
||||
(void)InitStreamObject(queryDesc->plannedstmt);
|
||||
@ -286,7 +290,7 @@ void standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
|
||||
}
|
||||
|
||||
/* CN of the compute pool. */
|
||||
if (StreamTopConsumerAmI() && queryDesc->instrument_options != 0 && IS_PGXC_COORDINATOR &&
|
||||
if (IS_PGXC_COORDINATOR && StreamTopConsumerAmI() && queryDesc->instrument_options != 0 &&
|
||||
queryDesc->plannedstmt->in_compute_pool) {
|
||||
const int dop = 1;
|
||||
|
||||
@ -1323,74 +1327,75 @@ void InitPlan(QueryDesc *queryDesc, int eflags)
|
||||
* While we are at it, build the ExecRowMark list.
|
||||
*/
|
||||
estate->es_rowMarks = NIL;
|
||||
uint64 plan_start_time = time(NULL);
|
||||
foreach (l, plannedstmt->rowMarks) {
|
||||
PlanRowMark *rc = (PlanRowMark *)lfirst(l);
|
||||
Oid relid;
|
||||
Relation relation = NULL;
|
||||
ExecRowMark *erm = NULL;
|
||||
if (plannedstmt->rowMarks) {
|
||||
uint64 plan_start_time = time(NULL);
|
||||
foreach (l, plannedstmt->rowMarks) {
|
||||
PlanRowMark *rc = (PlanRowMark *)lfirst(l);
|
||||
Oid relid;
|
||||
Relation relation = NULL;
|
||||
ExecRowMark *erm = NULL;
|
||||
|
||||
/* ignore "parent" rowmarks; they are irrelevant at runtime */
|
||||
if (rc->isParent) {
|
||||
continue;
|
||||
/* ignore "parent" rowmarks; they are irrelevant at runtime */
|
||||
if (rc->isParent) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* If you change the conditions under which rel locks are acquired
|
||||
* here, be sure to adjust ExecOpenScanRelation to match.
|
||||
*/
|
||||
switch (rc->markType) {
|
||||
case ROW_MARK_EXCLUSIVE:
|
||||
case ROW_MARK_NOKEYEXCLUSIVE:
|
||||
case ROW_MARK_SHARE:
|
||||
case ROW_MARK_KEYSHARE:
|
||||
if (IS_PGXC_COORDINATOR || u_sess->pgxc_cxt.PGXCNodeId < 0 ||
|
||||
bms_is_member(u_sess->pgxc_cxt.PGXCNodeId, rc->bms_nodeids)) {
|
||||
relid = getrelid(rc->rti, rangeTable);
|
||||
relation = heap_open(relid, RowShareLock);
|
||||
}
|
||||
break;
|
||||
case ROW_MARK_REFERENCE:
|
||||
if (IS_PGXC_COORDINATOR || u_sess->pgxc_cxt.PGXCNodeId < 0 ||
|
||||
bms_is_member(u_sess->pgxc_cxt.PGXCNodeId, rc->bms_nodeids)) {
|
||||
relid = getrelid(rc->rti, rangeTable);
|
||||
relation = heap_open(relid, AccessShareLock);
|
||||
}
|
||||
break;
|
||||
case ROW_MARK_COPY:
|
||||
case ROW_MARK_COPY_DATUM:
|
||||
/* there's no real table here ... */
|
||||
break;
|
||||
default:
|
||||
ereport(ERROR, (errcode(ERRCODE_UNRECOGNIZED_NODE_TYPE),
|
||||
errmsg("unrecognized markType: %d when initializing query plan.", rc->markType)));
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check that relation is a legal target for marking */
|
||||
if (relation != NULL) {
|
||||
CheckValidRowMarkRel(relation, rc->markType);
|
||||
}
|
||||
|
||||
erm = (ExecRowMark *)palloc(sizeof(ExecRowMark));
|
||||
erm->relation = relation;
|
||||
erm->rti = rc->rti;
|
||||
erm->prti = rc->prti;
|
||||
erm->rowmarkId = rc->rowmarkId;
|
||||
erm->markType = rc->markType;
|
||||
erm->waitPolicy = rc->waitPolicy;
|
||||
erm->waitSec = rc->waitSec;
|
||||
erm->numAttrs = rc->numAttrs;
|
||||
ItemPointerSetInvalid(&(erm->curCtid));
|
||||
estate->es_rowMarks = lappend(estate->es_rowMarks, erm);
|
||||
}
|
||||
|
||||
/*
|
||||
* If you change the conditions under which rel locks are acquired
|
||||
* here, be sure to adjust ExecOpenScanRelation to match.
|
||||
*/
|
||||
switch (rc->markType) {
|
||||
case ROW_MARK_EXCLUSIVE:
|
||||
case ROW_MARK_NOKEYEXCLUSIVE:
|
||||
case ROW_MARK_SHARE:
|
||||
case ROW_MARK_KEYSHARE:
|
||||
if (IS_PGXC_COORDINATOR || u_sess->pgxc_cxt.PGXCNodeId < 0 ||
|
||||
bms_is_member(u_sess->pgxc_cxt.PGXCNodeId, rc->bms_nodeids)) {
|
||||
relid = getrelid(rc->rti, rangeTable);
|
||||
relation = heap_open(relid, RowShareLock);
|
||||
}
|
||||
break;
|
||||
case ROW_MARK_REFERENCE:
|
||||
if (IS_PGXC_COORDINATOR || u_sess->pgxc_cxt.PGXCNodeId < 0 ||
|
||||
bms_is_member(u_sess->pgxc_cxt.PGXCNodeId, rc->bms_nodeids)) {
|
||||
relid = getrelid(rc->rti, rangeTable);
|
||||
relation = heap_open(relid, AccessShareLock);
|
||||
}
|
||||
break;
|
||||
case ROW_MARK_COPY:
|
||||
case ROW_MARK_COPY_DATUM:
|
||||
/* there's no real table here ... */
|
||||
break;
|
||||
default:
|
||||
ereport(ERROR, (errcode(ERRCODE_UNRECOGNIZED_NODE_TYPE),
|
||||
errmsg("unrecognized markType: %d when initializing query plan.", rc->markType)));
|
||||
break;
|
||||
uint64 plan_end_time = time(NULL);
|
||||
if ((plan_end_time - plan_start_time) > THREAD_INTSERVAL_60S) {
|
||||
ereport(WARNING,
|
||||
(errmsg("InitPlan foreach plannedstmt->rowMarks takes %lus, plan_start_time:%lus, plan_end_time:%lus.",
|
||||
plan_end_time - plan_start_time, plan_start_time, plan_end_time)));
|
||||
}
|
||||
|
||||
/* Check that relation is a legal target for marking */
|
||||
if (relation != NULL) {
|
||||
CheckValidRowMarkRel(relation, rc->markType);
|
||||
}
|
||||
|
||||
erm = (ExecRowMark *)palloc(sizeof(ExecRowMark));
|
||||
erm->relation = relation;
|
||||
erm->rti = rc->rti;
|
||||
erm->prti = rc->prti;
|
||||
erm->rowmarkId = rc->rowmarkId;
|
||||
erm->markType = rc->markType;
|
||||
erm->waitPolicy = rc->waitPolicy;
|
||||
erm->waitSec = rc->waitSec;
|
||||
erm->numAttrs = rc->numAttrs;
|
||||
ItemPointerSetInvalid(&(erm->curCtid));
|
||||
estate->es_rowMarks = lappend(estate->es_rowMarks, erm);
|
||||
}
|
||||
uint64 plan_end_time = time(NULL);
|
||||
if ((plan_end_time - plan_start_time) > THREAD_INTSERVAL_60S) {
|
||||
ereport(WARNING,
|
||||
(errmsg("InitPlan foreach plannedstmt->rowMarks takes %lus, plan_start_time:%lus, plan_end_time:%lus.",
|
||||
plan_end_time - plan_start_time, plan_start_time, plan_end_time)));
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize the executor's tuple table to empty.
|
||||
*/
|
||||
|
||||
@ -89,7 +89,6 @@
|
||||
#include "gs_ledger/userchain.h"
|
||||
|
||||
#ifdef PGXC
|
||||
static TupleTableSlot* fill_slot_with_oldvals(TupleTableSlot* slot, HeapTupleHeader oldtuphd, Bitmapset* modifiedCols);
|
||||
static void RecoredGeneratedExpr(ResultRelInfo *resultRelInfo, EState *estate, CmdType cmdtype);
|
||||
|
||||
/* Copied from trigger.c */
|
||||
@ -111,6 +110,7 @@ extern void HeapDeleteCStore(Relation relation, ItemPointer tid, Oid tableOid, S
|
||||
extern Oid pg_get_serial_sequence_oid(text* tablename, text* columnname);
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
extern void HeapInsertTsStore(Relation relation, ResultRelInfo* resultRelInfo, HeapTuple tup, int option);
|
||||
static TupleTableSlot* fill_slot_with_oldvals(TupleTableSlot* slot, HeapTupleHeader oldtuphd, Bitmapset* modifiedCols);
|
||||
#endif /* ENABLE_MULTIPLE_NODES */
|
||||
|
||||
/* check if set_dummy_tlist_references has set the dummy targetlist */
|
||||
@ -1085,7 +1085,7 @@ TupleTableSlot* ExecInsertT(ModifyTableState* state, TupleTableSlot* slot, Tuple
|
||||
*/
|
||||
tuple = tableam_tslot_get_tuple_from_slot(result_rel_info->ri_RelationDesc, slot);
|
||||
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NDOES
|
||||
result_remote_rel = (RemoteQueryState*)estate->es_result_remoterel;
|
||||
#endif
|
||||
/*
|
||||
@ -1661,7 +1661,7 @@ TupleTableSlot* ExecDelete(ItemPointer tupleid, Oid deletePartitionOid, int2 buc
|
||||
*/
|
||||
result_rel_info = estate->es_result_relation_info;
|
||||
result_relation_desc = result_rel_info->ri_RelationDesc;
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
result_remote_rel = (RemoteQueryState*)estate->es_result_remoterel;
|
||||
#endif
|
||||
|
||||
@ -2078,7 +2078,7 @@ TupleTableSlot* ExecUpdate(ItemPointer tupleid,
|
||||
(errcode(ERRCODE_E_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED), errmsg("cannot UPDATE during bootstrap"))));
|
||||
}
|
||||
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
result_remote_rel = (RemoteQueryState*)estate->es_result_remoterel;
|
||||
|
||||
/*
|
||||
@ -3377,7 +3377,7 @@ static TupleTableSlot* ExecModifyTable(PlanState* state)
|
||||
ResultRelInfo* result_rel_info = NULL;
|
||||
PlanState* subPlanState = NULL;
|
||||
char* partExprKeyStr = NULL;
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
PlanState* remote_rel_state = NULL;
|
||||
PlanState* insert_remote_rel_state = NULL;
|
||||
PlanState* update_remote_rel_state = NULL;
|
||||
@ -3442,7 +3442,7 @@ static TupleTableSlot* ExecModifyTable(PlanState* state)
|
||||
/* Preload local variables */
|
||||
result_rel_info = node->resultRelInfo + estate->result_rel_index;
|
||||
subPlanState = node->mt_plans[node->mt_whichplan];
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
/* Initialize remote plan state */
|
||||
remote_rel_state = node->mt_remoterels[node->mt_whichplan];
|
||||
insert_remote_rel_state = node->mt_insert_remoterels[node->mt_whichplan];
|
||||
@ -3457,12 +3457,12 @@ static TupleTableSlot* ExecModifyTable(PlanState* state)
|
||||
* CTE). So we have to save and restore the caller's value.
|
||||
*/
|
||||
saved_result_rel_info = estate->es_result_relation_info;
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
saved_result_remote_rel = estate->es_result_remoterel;
|
||||
#endif
|
||||
|
||||
estate->es_result_relation_info = result_rel_info;
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
estate->es_result_remoterel = remote_rel_state;
|
||||
estate->es_result_insert_remoterel = insert_remote_rel_state;
|
||||
estate->es_result_update_remoterel = update_remote_rel_state;
|
||||
@ -3536,7 +3536,7 @@ static TupleTableSlot* ExecModifyTable(PlanState* state)
|
||||
Assert(estate->result_rel_index == 0);
|
||||
if (node->mt_whichplan < node->mt_nplans) {
|
||||
subPlanState = node->mt_plans[node->mt_whichplan];
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
/* Move to next remote plan */
|
||||
estate->es_result_remoterel = node->mt_remoterels[node->mt_whichplan];
|
||||
remote_rel_state = node->mt_remoterels[node->mt_whichplan];
|
||||
@ -3695,7 +3695,7 @@ static TupleTableSlot* ExecModifyTable(PlanState* state)
|
||||
slot = ExecFilterJunk(junk_filter, slot);
|
||||
}
|
||||
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
estate->es_result_remoterel = remote_rel_state;
|
||||
estate->es_result_insert_remoterel = insert_remote_rel_state;
|
||||
estate->es_result_update_remoterel = update_remote_rel_state;
|
||||
@ -3749,7 +3749,7 @@ static TupleTableSlot* ExecModifyTable(PlanState* state)
|
||||
*/
|
||||
if (slot != NULL) {
|
||||
estate->es_result_relation_info = saved_result_rel_info;
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
estate->es_result_remoterel = saved_result_remote_rel;
|
||||
#endif
|
||||
return slot;
|
||||
@ -3761,7 +3761,7 @@ static TupleTableSlot* ExecModifyTable(PlanState* state)
|
||||
|
||||
/* Restore es_result_relation_info before exiting */
|
||||
estate->es_result_relation_info = saved_result_rel_info;
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
estate->es_result_remoterel = saved_result_remote_rel;
|
||||
#endif
|
||||
|
||||
@ -3894,7 +3894,7 @@ ModifyTableState* ExecInitModifyTable(ModifyTable* node, EState* estate, int efl
|
||||
mt_state->mt_done = false;
|
||||
|
||||
mt_state->mt_plans = (PlanState**)palloc0(sizeof(PlanState*) * nplans);
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NDOES
|
||||
mt_state->mt_remoterels = (PlanState**)palloc0(sizeof(PlanState*) * nplans);
|
||||
mt_state->mt_insert_remoterels = (PlanState**)palloc0(sizeof(PlanState*) * nplans);
|
||||
mt_state->mt_update_remoterels = (PlanState**)palloc0(sizeof(PlanState*) * nplans);
|
||||
@ -3925,7 +3925,7 @@ ModifyTableState* ExecInitModifyTable(ModifyTable* node, EState* estate, int efl
|
||||
* sub-plan; ExecContextForcesOids depends on that!
|
||||
*/
|
||||
saved_result_rel_info = estate->es_result_relation_info;
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NDOES
|
||||
saved_remote_rel_info = estate->es_result_remoterel;
|
||||
#endif
|
||||
|
||||
@ -4033,7 +4033,7 @@ ModifyTableState* ExecInitModifyTable(ModifyTable* node, EState* estate, int efl
|
||||
i++;
|
||||
}
|
||||
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NDOES
|
||||
i = 0;
|
||||
foreach (l, node->plans) {
|
||||
|
||||
@ -4064,7 +4064,7 @@ ModifyTableState* ExecInitModifyTable(ModifyTable* node, EState* estate, int efl
|
||||
EvalPlanQualInit(&mt_state->mt_epqstate, estate, NULL, NIL, node->epqParam);
|
||||
|
||||
estate->es_result_relation_info = saved_result_rel_info;
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NDOES
|
||||
estate->es_result_remoterel = saved_remote_rel_info;
|
||||
#endif
|
||||
|
||||
@ -4454,7 +4454,7 @@ void ExecEndModifyTable(ModifyTableState* node)
|
||||
*/
|
||||
for (i = 0; i < node->mt_nplans; i++) {
|
||||
ExecEndNode(node->mt_plans[i]);
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NDOES
|
||||
ExecEndNode(node->mt_remoterels[i]);
|
||||
#endif
|
||||
}
|
||||
@ -4471,7 +4471,7 @@ void ExecReScanModifyTable(ModifyTableState* node)
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("ExecReScanModifyTable is not implemented"))));
|
||||
}
|
||||
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NDOES
|
||||
|
||||
/*
|
||||
* fill_slot_with_oldvals:
|
||||
|
||||
@ -142,14 +142,15 @@ void IndexScanFusion::Init(long max_rows)
|
||||
*m_direction = NoMovementScanDirection;
|
||||
}
|
||||
|
||||
ScanState* scanstate = makeNode(ScanState); // need release
|
||||
|
||||
scanstate->ps.plan = (Plan *)m_node;
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
/*
|
||||
* for hash bucket pruning with Global Plan cache, we should build a temp EState object
|
||||
* to passing param info which is used to cal buckets in further hbkt_idx_beginscan.
|
||||
*/
|
||||
if (ENABLE_GPC && RELATION_CREATE_BUCKET(m_rel)) {
|
||||
ScanState* scanstate = makeNode(ScanState); // need release
|
||||
|
||||
scanstate->ps.plan = (Plan *)m_node;
|
||||
EState tmpstate;
|
||||
tmpstate.es_param_list_info = m_params;
|
||||
scanstate->ps.state = &tmpstate;
|
||||
@ -158,10 +159,12 @@ void IndexScanFusion::Init(long max_rows)
|
||||
m_scandesc = scan_handler_idx_beginscan(m_rel, m_index, GetActiveSnapshot(), m_keyNum, 0, scanstate);
|
||||
scanstate->ps.state = NULL;
|
||||
} else {
|
||||
#endif
|
||||
/* add scanstate pointer ? */
|
||||
m_scandesc = scan_handler_idx_beginscan(m_rel, m_index, GetActiveSnapshot(), m_keyNum, 0, scanstate);
|
||||
m_scandesc = scan_handler_idx_beginscan(m_rel, m_index, GetActiveSnapshot(), m_keyNum, 0, NULL);
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
}
|
||||
|
||||
#endif
|
||||
if (m_scandesc) {
|
||||
scan_handler_idx_rescan_local(m_scandesc,
|
||||
m_keyNum > 0 ? m_scanKeys : NULL, m_keyNum, NULL, 0);
|
||||
|
||||
@ -598,7 +598,7 @@ bool UpdateFusion::execute(long max_rows, char *completionTag)
|
||||
|
||||
Relation rel = ((m_local.m_scan->m_parentRel) == NULL ? m_local.m_scan->m_rel :
|
||||
m_local.m_scan->m_parentRel);
|
||||
ResultRelInfo *result_rel_info = makeNode(ResultRelInfo);
|
||||
ResultRelInfo *result_rel_info = makeNodeFast(ResultRelInfo);
|
||||
InitResultRelInfo(result_rel_info, rel, 1, 0);
|
||||
m_c_local.m_estate->es_result_relation_info = result_rel_info;
|
||||
m_c_local.m_estate->es_output_cid = GetCurrentCommandId(true);
|
||||
|
||||
@ -176,8 +176,10 @@ void ExecVecMerge(VecModifyTableState* mtstate)
|
||||
result_rel_info = mtstate->resultRelInfo + mtstate->mt_whichplan;
|
||||
sub_plan_state = mtstate->mt_plans[mtstate->mt_whichplan];
|
||||
|
||||
#ifdef ENABLE_MULTIPLE_NDOES
|
||||
/* Initialize remote plan state */
|
||||
remote_rel_state = mtstate->mt_remoterels[mtstate->mt_whichplan];
|
||||
#endif
|
||||
|
||||
junkfilter = result_rel_info->ri_junkFilter;
|
||||
result_relation_desc = result_rel_info->ri_RelationDesc;
|
||||
|
||||
@ -469,7 +469,7 @@ VectorBatch* ExecVecModifyTable(VecModifyTableState* node)
|
||||
Relation result_rel_desc;
|
||||
bool is_partitioned = false;
|
||||
PlanState* sub_plan_stat = NULL;
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
PlanState* remote_rel_stat = NULL;
|
||||
PlanState* saved_result_remote_rel = NULL;
|
||||
#endif
|
||||
@ -525,7 +525,7 @@ VectorBatch* ExecVecModifyTable(VecModifyTableState* node)
|
||||
/* Preload local variables */
|
||||
result_rel_info = node->resultRelInfo + node->mt_whichplan;
|
||||
sub_plan_stat = node->mt_plans[node->mt_whichplan];
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
/* Initialize remote plan state */
|
||||
remote_rel_stat = node->mt_remoterels[node->mt_whichplan];
|
||||
#endif
|
||||
@ -543,12 +543,12 @@ VectorBatch* ExecVecModifyTable(VecModifyTableState* node)
|
||||
* CTE). So we have to save and restore the caller's value.
|
||||
*/
|
||||
saved_result_rel_info = estate->es_result_relation_info;
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
saved_result_remote_rel = estate->es_result_remoterel;
|
||||
#endif
|
||||
|
||||
estate->es_result_relation_info = result_rel_info;
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
estate->es_result_remoterel = remote_rel_stat;
|
||||
#endif
|
||||
|
||||
@ -605,7 +605,7 @@ VectorBatch* ExecVecModifyTable(VecModifyTableState* node)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
estate->es_result_remoterel = remote_rel_stat;
|
||||
#endif
|
||||
switch (operation) {
|
||||
@ -686,7 +686,7 @@ VectorBatch* ExecVecModifyTable(VecModifyTableState* node)
|
||||
*/
|
||||
if (batch != NULL) {
|
||||
estate->es_result_relation_info = saved_result_rel_info;
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
estate->es_result_remoterel = saved_result_remote_rel;
|
||||
#endif
|
||||
return batch;
|
||||
@ -757,7 +757,7 @@ VectorBatch* ExecVecModifyTable(VecModifyTableState* node)
|
||||
|
||||
/* Restore es_result_relation_info before exiting */
|
||||
estate->es_result_relation_info = saved_result_rel_info;
|
||||
#ifdef PGXC
|
||||
#ifdef ENABLE_MULTIPLE_NODES
|
||||
estate->es_result_remoterel = saved_result_remote_rel;
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user