From 4bf4110266cffbd0d5730ca4551df096caa24b1a Mon Sep 17 00:00:00 2001 From: l00584793 Date: Thu, 17 Sep 2020 16:05:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3explain=E8=AF=AD=E5=8F=A5?= =?UTF-8?q?=E4=B8=AD=E6=B7=BB=E5=8A=A0nodes=E3=80=81num=5Fnodes=E6=97=B6?= =?UTF-8?q?=E4=B8=8E=E9=A2=84=E6=9C=9F=E4=B8=8D=E7=AC=A6=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/optimizer/commands/explain.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gausskernel/optimizer/commands/explain.cpp b/src/gausskernel/optimizer/commands/explain.cpp index 1b78fd1e6..3deed2d02 100755 --- a/src/gausskernel/optimizer/commands/explain.cpp +++ b/src/gausskernel/optimizer/commands/explain.cpp @@ -340,12 +340,12 @@ void ExplainQuery( es.costs = defGetBoolean(opt); else if (strcmp(opt->defname, "buffers") == 0) es.buffers = defGetBoolean(opt); -#ifdef PGXC +#if defined(USE_ASSERT_CHECKING) || defined(ENABLE_MULTIPLE_NODES) else if (strcmp(opt->defname, "nodes") == 0) es.nodes = defGetBoolean(opt); else if (strcmp(opt->defname, "num_nodes") == 0) es.num_nodes = defGetBoolean(opt); -#endif /* PGXC */ +#endif else if (strcmp(opt->defname, "timing") == 0) { timing_set = true; es.timing = defGetBoolean(opt); @@ -384,10 +384,13 @@ void ExplainQuery( es.costs = true; es.cpu = true; es.detail = true; -#ifdef PGXC +#if defined(USE_ASSERT_CHECKING) || defined(ENABLE_MULTIPLE_NODES) es.nodes = true; es.num_nodes = true; -#endif /* PGXC */ +#else + es.nodes = false; + es.num_nodes = false; +#endif es.timing = true; es.verbose = true; }