Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/backend/executor/execUtils.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
static bool tlist_matches_tupdesc(PlanState *ps, List *tlist, Index varno, TupleDesc tupdesc);
static void ShutdownExprContext(ExprContext *econtext, bool isCommit);
static List *flatten_logic_exprs(Node *node);
ProcessDispatchResult_hook_type ProcessDispatchResult_hook = NULL;


/* ----------------------------------------------------------------
Expand Down Expand Up @@ -2052,6 +2053,9 @@ void mppExecutorFinishup(QueryDesc *queryDesc)
ReThrowError(qeError);
}

if (ProcessDispatchResult_hook)
ProcessDispatchResult_hook(ds);

/* collect pgstat from QEs for current transaction level */
pgstat_combine_from_qe(pr, primaryWriterSliceIndex);

Expand Down
4 changes: 2 additions & 2 deletions src/backend/executor/nodeModifyTable.c
Original file line number Diff line number Diff line change
Expand Up @@ -2662,7 +2662,7 @@ ExecModifyTable(PlanState *pstate)
* making the update plan is consistent whether it generated by pg optimizer
* or ORCA optimizer in the future.
*/
if (operation == CMD_UPDATE && RelationIsAppendOptimized(resultRelInfo->ri_RelationDesc) &&
if (operation == CMD_UPDATE && !RelationIsHeap(resultRelInfo->ri_RelationDesc) &&
AttributeNumberIsValid(resultRelInfo->ri_WholeRowNo))
{
/* ri_WholeRowNo refers to a wholerow attribute */
Expand Down Expand Up @@ -3132,7 +3132,7 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
elog(ERROR, "could not find junk ctid column");

/* extra GPDB junk columns for update AO table */
if (operation == CMD_UPDATE && RelationIsAppendOptimized(resultRelInfo->ri_RelationDesc))
if (operation == CMD_UPDATE && !RelationIsHeap(resultRelInfo->ri_RelationDesc))
{
resultRelInfo->ri_WholeRowNo =
ExecFindJunkAttributeInTlist(subplan->targetlist, "wholerow");
Expand Down
2 changes: 1 addition & 1 deletion src/backend/optimizer/util/appendinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ add_row_identity_columns(PlannerInfo *root, Index rtindex,
* format or making the update plan is consistent whether it generated by pg optimizer
* or ORCA optimizer.
*/
if (commandType == CMD_UPDATE && RelationIsAppendOptimized(target_relation))
if (commandType == CMD_UPDATE && !RelationIsHeap(target_relation))
{
var = makeVar(rtindex,
InvalidAttrNumber,
Expand Down
2 changes: 2 additions & 0 deletions src/include/cdb/cdbdispatchresult.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,5 +316,7 @@ cdbdisp_makeDispatchResults(struct CdbDispatcherState *ds,

void
cdbdisp_clearCdbPgResults(CdbPgResults* cdb_pgresults);
typedef void (*ProcessDispatchResult_hook_type) (CdbDispatcherState*);
extern PGDLLIMPORT ProcessDispatchResult_hook_type ProcessDispatchResult_hook;

#endif /* CDBDISPATCHRESULT_H */