diff --git a/contrib/ndpplugin/ndpam.cpp b/contrib/ndpplugin/ndpam.cpp index ba36abfa8..ad7b9bffa 100644 --- a/contrib/ndpplugin/ndpam.cpp +++ b/contrib/ndpplugin/ndpam.cpp @@ -267,21 +267,17 @@ NdpRetCode NdpIoSlot::GetResp(NdpPageHeader& pages, int& pageNum, BlockNumber& s pageNum = 0; if (respRet != NdpRetCode::NDP_OK) { - ereport(WARNING, (errmsg("rpc response status is illegal %d, RPC status %d", - static_cast(respRet), static_cast(rpcStatus)))); return respRet; } auto rpcResp = reinterpret_cast(respMsg.data); if (rpcResp == nullptr) { - ereport(WARNING, (errmsg("rpc response is null."))); return NdpRetCode::NDP_RETURN_FAILED; } #ifdef ENABLE_SSL resp = reinterpret_cast(respMsg.data); #endif if (rpcResp->status != 0) { - ereport(WARNING, (errmsg("backend handle IO failed, status is %u.", resp->status))); return NdpRetCode::NDP_RETURN_STATUS_ERROR; } diff --git a/src/gausskernel/optimizer/commands/explain.cpp b/src/gausskernel/optimizer/commands/explain.cpp index 8356ae563..1c75ebb56 100755 --- a/src/gausskernel/optimizer/commands/explain.cpp +++ b/src/gausskernel/optimizer/commands/explain.cpp @@ -270,7 +270,7 @@ static bool show_scan_distributekey(const Plan* plan) } #endif /* ENABLE_MULTIPLE_NODES */ static void show_unique_check_info(PlanState *planstate, ExplainState *es); -static void show_ndpplugin_statistic(ExplainState *es, PlanState* planstate); +static void show_ndpplugin_statistic(ExplainState *es, PlanState* planstate, StringInfo str, bool is_pretty); /* * ExplainQuery - @@ -2396,6 +2396,11 @@ static void ExplainNode( appendStringInfo(tmpName, " stream_level:%d ", stream_plan->stream_level); } + /* explain ndpplugin activities */ + if (ndp_pushdown_hook) { + show_ndpplugin_statistic(es, planstate, tmpName, is_pretty); + } + if (is_pretty) { StringInfoData pretty_plan_name; @@ -2498,11 +2503,6 @@ static void ExplainNode( } } - /* explain ndpplugin activities */ - if (ndp_pushdown_hook) { - show_ndpplugin_statistic(es, planstate); - } - /* * We have to forcibly clean up the instrumentation state because we * haven't done ExecutorEnd yet. This is pretty grotty ... @@ -10955,7 +10955,7 @@ static void show_unique_check_info(PlanState *planstate, ExplainState *es) } } -static void show_ndpplugin_statistic(ExplainState *es, PlanState* planstate) +static void show_ndpplugin_statistic(ExplainState *es, PlanState* planstate, StringInfo str, bool is_pretty) { Plan* plan = planstate->plan; if (!plan->ndp_pushdown_optimized && @@ -10968,7 +10968,12 @@ static void show_ndpplugin_statistic(ExplainState *es, PlanState* planstate) if (desc && !desc->ndp_pushdown_optimized) { return; } - appendStringInfo(es->str, " NDPpushdown"); + + if (is_pretty) { + appendStringInfo(str, " NDPpushdown"); + } else { + appendStringInfo(es->str, " NDPpushdown"); + } if (!es->analyze) { return;