This is an automated email from the ASF dual-hosted git repository.

chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/cbdb-postgres-merge by this 
push:
     new ed7149afb4e Fix panic in explain
ed7149afb4e is described below

commit ed7149afb4eee317aedd09ff23c793b48e9ab9fd
Author: Jinbao Chen <[email protected]>
AuthorDate: Tue Dec 2 00:20:37 2025 +0800

    Fix panic in explain
---
 src/backend/commands/explain.c      | 2 +-
 src/backend/postmaster/postmaster.c | 2 +-
 src/backend/utils/misc/guc_tables.c | 2 +-
 src/include/parser/analyze.h        | 2 +-
 src/test/regress/serial_schedule    | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index be21ca00012..33259c839af 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -306,7 +306,7 @@ ExplainQuery(ParseState *pstate, ExplainStmt *stmt,
 
        query = castNode(Query, stmt->query);
        if (IsQueryIdEnabled())
-               jstate = JumbleQuery(query);
+               jstate = JumbleQuery(query, pstate->p_sourcetext);
 
        if (post_parse_analyze_hook)
                (*post_parse_analyze_hook) (pstate, query, jstate);
diff --git a/src/backend/postmaster/postmaster.c 
b/src/backend/postmaster/postmaster.c
index 0fbdb7199b7..b621be97063 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -112,7 +112,6 @@
 #include "libpq/libpq.h"
 #include "libpq/pqformat.h"
 #include "libpq/pqsignal.h"
-#include "nodes/queryjumble.h"
 #include "pg_getopt.h"
 #include "pgstat.h"
 #include "port/pg_bswap.h"
@@ -146,6 +145,7 @@
 #include "utils/memutils.h"
 #include "utils/pidfile.h"
 #include "utils/ps_status.h"
+#include "utils/queryjumble.h"
 #include "utils/timeout.h"
 #include "utils/timestamp.h"
 #include "utils/varlena.h"
diff --git a/src/backend/utils/misc/guc_tables.c 
b/src/backend/utils/misc/guc_tables.c
index b3a7912cd9c..43c68db92cc 100644
--- a/src/backend/utils/misc/guc_tables.c
+++ b/src/backend/utils/misc/guc_tables.c
@@ -49,7 +49,6 @@
 #include "libpq/auth.h"
 #include "libpq/libpq.h"
 #include "libpq/scram.h"
-#include "nodes/queryjumble.h"
 #include "optimizer/cost.h"
 #include "optimizer/geqo.h"
 #include "optimizer/optimizer.h"
@@ -85,6 +84,7 @@
 #include "utils/pg_locale.h"
 #include "utils/portal.h"
 #include "utils/ps_status.h"
+#include "utils/queryjumble.h"
 #include "utils/inval.h"
 #include "utils/xml.h"
 
diff --git a/src/include/parser/analyze.h b/src/include/parser/analyze.h
index 63c4776d4a6..c7478e9ac78 100644
--- a/src/include/parser/analyze.h
+++ b/src/include/parser/analyze.h
@@ -15,8 +15,8 @@
 #define ANALYZE_H
 
 #include "nodes/params.h"
-#include "nodes/queryjumble.h"
 #include "parser/parse_node.h"
+#include "utils/queryjumble.h"
 
 /* GUC parameter */
 extern PGDLLIMPORT bool enableLockOptimization;
diff --git a/src/test/regress/serial_schedule b/src/test/regress/serial_schedule
index 85922ac3fb5..c69b976f5a3 100644
--- a/src/test/regress/serial_schedule
+++ b/src/test/regress/serial_schedule
@@ -199,7 +199,7 @@ test: indexing
 test: partition_aggregate
 test: partition_info
 test: tuplesort
-# test: explain
+test: explain
 test: event_trigger
 test: fast_default
 #test: stats


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to