diff --git a/src/gausskernel/process/tcop/postgres.cpp b/src/gausskernel/process/tcop/postgres.cpp index 3d8dfc9ef..69b498efa 100755 --- a/src/gausskernel/process/tcop/postgres.cpp +++ b/src/gausskernel/process/tcop/postgres.cpp @@ -2964,6 +2964,9 @@ static void exec_simple_query(const char* query_string, MessageType messageType, if (opFusionObj != NULL) { ((OpFusion*)opFusionObj)->setCurrentOpFusionObj((OpFusion*)opFusionObj); if (OpFusion::process(FUSION_EXECUTE, NULL, completionTag, isTopLevel, NULL)) { + if (!u_sess->attr.attr_sql.enable_opfusion_reuse) { + OpFusion::tearDown((OpFusion*)opFusionObj); + } CommandCounterIncrement(); finish_xact_command(); EndCommand(completionTag, dest);