summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/tcop/utility.c4
-rw-r--r--src/test/regress/expected/create_am.out43
2 files changed, 28 insertions, 19 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index a7c0543201..0f42512466 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -2473,6 +2473,10 @@ ProcessUtilitySlow(Node *parsetree,
case T_CreateAmStmt:
address = CreateAccessMethod((CreateAmStmt *) parsetree);
+#ifdef PGXC
+ if (IS_PGXC_LOCAL_COORDINATOR)
+ ExecUtilityStmtOnNodes(queryString, NULL, sentToRemote, false, EXEC_ON_ALL_NODES, false);
+#endif
break;
default:
diff --git a/src/test/regress/expected/create_am.out b/src/test/regress/expected/create_am.out
index 1b464aae2d..2e5d1154f3 100644
--- a/src/test/regress/expected/create_am.out
+++ b/src/test/regress/expected/create_am.out
@@ -45,13 +45,14 @@ EXPLAIN (COSTS OFF)
SELECT * FROM fast_emp4000
WHERE home_base @ '(200,200),(2000,1000)'::box
ORDER BY (home_base[0])[0];
- QUERY PLAN
-----------------------------------------------------------------
- Sort
- Sort Key: ((home_base[0])[0])
- -> Index Only Scan using grect2ind2 on fast_emp4000
- Index Cond: (home_base @ '(2000,1000),(200,200)'::box)
-(4 rows)
+ QUERY PLAN
+----------------------------------------------------------------------
+ Remote Subquery Scan on all (datanode_1,datanode_2)
+ -> Sort
+ Sort Key: ((home_base[0])[0])
+ -> Index Only Scan using grect2ind2 on fast_emp4000
+ Index Cond: (home_base @ '(2000,1000),(200,200)'::box)
+(5 rows)
SELECT * FROM fast_emp4000
WHERE home_base @ '(200,200),(2000,1000)'::box
@@ -64,12 +65,14 @@ SELECT * FROM fast_emp4000
EXPLAIN (COSTS OFF)
SELECT count(*) FROM fast_emp4000 WHERE home_base && '(1000,1000,0,0)'::box;
- QUERY PLAN
--------------------------------------------------------------
- Aggregate
- -> Index Only Scan using grect2ind2 on fast_emp4000
- Index Cond: (home_base && '(1000,1000),(0,0)'::box)
-(3 rows)
+ QUERY PLAN
+-------------------------------------------------------------------------
+ Finalize Aggregate
+ -> Remote Subquery Scan on all (datanode_1,datanode_2)
+ -> Partial Aggregate
+ -> Index Only Scan using grect2ind2 on fast_emp4000
+ Index Cond: (home_base && '(1000,1000),(0,0)'::box)
+(5 rows)
SELECT count(*) FROM fast_emp4000 WHERE home_base && '(1000,1000,0,0)'::box;
count
@@ -79,12 +82,14 @@ SELECT count(*) FROM fast_emp4000 WHERE home_base && '(1000,1000,0,0)'::box;
EXPLAIN (COSTS OFF)
SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL;
- QUERY PLAN
---------------------------------------------------------
- Aggregate
- -> Index Only Scan using grect2ind2 on fast_emp4000
- Index Cond: (home_base IS NULL)
-(3 rows)
+ QUERY PLAN
+--------------------------------------------------------------------
+ Finalize Aggregate
+ -> Remote Subquery Scan on all (datanode_1,datanode_2)
+ -> Partial Aggregate
+ -> Index Only Scan using grect2ind2 on fast_emp4000
+ Index Cond: (home_base IS NULL)
+(5 rows)
SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL;
count