From a3c74c5d49a4dcf8ca0b160c7a10009aa7a5c940 Mon Sep 17 00:00:00 2001 From: james Date: Fri, 1 Dec 2023 07:39:39 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: james --- src/common/backend/nodes/outfuncs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/backend/nodes/outfuncs.cpp b/src/common/backend/nodes/outfuncs.cpp index 5991c615b2..83c0310136 100755 --- a/src/common/backend/nodes/outfuncs.cpp +++ b/src/common/backend/nodes/outfuncs.cpp @@ -578,7 +578,7 @@ static void _outPlannedStmt(StringInfo str, PlannedStmt* node) WRITE_INT_FIELD(gather_count); WRITE_INT_FIELD(num_nodes); - if (t_thrd.proc->workingVersionNum < 92097 || node->num_streams > 0) { + if (IS_PGXC_COORDINATOR && (t_thrd.proc->workingVersionNum < 92097 || node->num_streams > 0)) { for (int i = 0; i < node->num_nodes; i++) { /* Write the field name only one time and just append the value of each field */ appendStringInfo(str, " :nodesDefinition[%d]", i); -- Gitee From d359fad0dc419e728be86a11a2a744a74336cecf Mon Sep 17 00:00:00 2001 From: james Date: Tue, 26 Nov 2024 11:07:58 +0800 Subject: [PATCH 2/2] add fix1 --- src/common/backend/nodes/outfuncs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/backend/nodes/outfuncs.cpp b/src/common/backend/nodes/outfuncs.cpp index 83c0310136..4c9522f598 100755 --- a/src/common/backend/nodes/outfuncs.cpp +++ b/src/common/backend/nodes/outfuncs.cpp @@ -578,7 +578,7 @@ static void _outPlannedStmt(StringInfo str, PlannedStmt* node) WRITE_INT_FIELD(gather_count); WRITE_INT_FIELD(num_nodes); - if (IS_PGXC_COORDINATOR && (t_thrd.proc->workingVersionNum < 92097 || node->num_streams > 0)) { + if ((t_thrd.proc->workingVersionNum < 92097 || node->num_streams > 0) && node->nodesDefinition != NULL) { for (int i = 0; i < node->num_nodes; i++) { /* Write the field name only one time and just append the value of each field */ appendStringInfo(str, " :nodesDefinition[%d]", i); -- Gitee