mirror of https://github.com/citusdata/citus.git
Merge pull request #3892 from citusdata/explain_execute
Test we don't support multi-shard EXPLAIN EXECUTEpull/3890/head
commit
8551affc1e
|
@ -116,3 +116,7 @@ s/pg_catalog.citus_extradata_container\([0-9]+/pg_catalog.citus_extradata_contai
|
||||||
/replicating reference table.*$/d
|
/replicating reference table.*$/d
|
||||||
|
|
||||||
s/Citus.*currently supports/Citus currently supports/g
|
s/Citus.*currently supports/Citus currently supports/g
|
||||||
|
|
||||||
|
# Warnings in multi_explain
|
||||||
|
s/prepared transaction with identifier .* does not exist/prepared transaction with identifier "citus_x_yyyyyy_zzz_w" does not exist/g
|
||||||
|
s/failed to roll back prepared transaction '.*'/failed to roll back prepared transaction 'citus_x_yyyyyy_zzz_w'/g
|
||||||
|
|
|
@ -1188,6 +1188,37 @@ Custom Scan (Citus Adaptive) (cost=0.00..0.00 rows=100000 width=18)
|
||||||
Node: host=localhost port=xxxxx dbname=regression
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
-> Index Scan using lineitem_pkey_290000 on lineitem_290000 lineitem (cost=0.28..13.60 rows=4 width=5)
|
-> Index Scan using lineitem_pkey_290000 on lineitem_290000 lineitem (cost=0.28..13.60 rows=4 width=5)
|
||||||
Index Cond: (l_orderkey = 5)
|
Index Cond: (l_orderkey = 5)
|
||||||
|
EXPLAIN (ANALYZE ON, COSTS OFF, TIMING OFF, SUMMARY OFF) EXECUTE router_executor_query_param(5);
|
||||||
|
Custom Scan (Citus Adaptive) (actual rows=3 loops=1)
|
||||||
|
Task Count: 1
|
||||||
|
Tasks Shown: All
|
||||||
|
-> Task
|
||||||
|
Node: host=localhost port=xxxxx dbname=regression
|
||||||
|
-> Index Scan using lineitem_pkey_290000 on lineitem_290000 lineitem (actual rows=3 loops=1)
|
||||||
|
Index Cond: (l_orderkey = 5)
|
||||||
|
\set VERBOSITY TERSE
|
||||||
|
PREPARE multi_shard_query_param(int) AS UPDATE lineitem SET l_quantity = $1;
|
||||||
|
BEGIN;
|
||||||
|
EXPLAIN EXECUTE multi_shard_query_param(5);
|
||||||
|
WARNING: there is no parameter $1
|
||||||
|
WARNING: there is no parameter $1
|
||||||
|
Custom Scan (Citus Adaptive) (cost=0.00..0.00 rows=0 width=0)
|
||||||
|
Task Count: 2
|
||||||
|
Tasks Shown: One of 2
|
||||||
|
-> Task
|
||||||
|
Error: Could not get remote plan.
|
||||||
|
ROLLBACK;
|
||||||
|
BEGIN;
|
||||||
|
EXPLAIN (ANALYZE ON, COSTS OFF, TIMING OFF, SUMMARY OFF) EXECUTE multi_shard_query_param(5);
|
||||||
|
WARNING: there is no parameter $1
|
||||||
|
WARNING: there is no parameter $1
|
||||||
|
Custom Scan (Citus Adaptive) (actual rows=0 loops=1)
|
||||||
|
Task Count: 2
|
||||||
|
Tasks Shown: One of 2
|
||||||
|
-> Task
|
||||||
|
Error: Could not get remote plan.
|
||||||
|
ROLLBACK;
|
||||||
|
\set VERBOSITY DEFAULT
|
||||||
-- test explain in a transaction with alter table to test we use right connections
|
-- test explain in a transaction with alter table to test we use right connections
|
||||||
BEGIN;
|
BEGIN;
|
||||||
CREATE TABLE explain_table(id int);
|
CREATE TABLE explain_table(id int);
|
||||||
|
|
|
@ -517,10 +517,22 @@ PREPARE real_time_executor_query AS
|
||||||
SELECT avg(l_linenumber) FROM lineitem WHERE l_orderkey > 9030;
|
SELECT avg(l_linenumber) FROM lineitem WHERE l_orderkey > 9030;
|
||||||
EXPLAIN (COSTS FALSE) EXECUTE real_time_executor_query;
|
EXPLAIN (COSTS FALSE) EXECUTE real_time_executor_query;
|
||||||
|
|
||||||
|
|
||||||
-- EXPLAIN EXECUTE of parametrized prepared statements is broken, but
|
-- EXPLAIN EXECUTE of parametrized prepared statements is broken, but
|
||||||
-- at least make sure to fail without crashing
|
-- at least make sure to fail without crashing
|
||||||
PREPARE router_executor_query_param(int) AS SELECT l_quantity FROM lineitem WHERE l_orderkey = $1;
|
PREPARE router_executor_query_param(int) AS SELECT l_quantity FROM lineitem WHERE l_orderkey = $1;
|
||||||
EXPLAIN EXECUTE router_executor_query_param(5);
|
EXPLAIN EXECUTE router_executor_query_param(5);
|
||||||
|
EXPLAIN (ANALYZE ON, COSTS OFF, TIMING OFF, SUMMARY OFF) EXECUTE router_executor_query_param(5);
|
||||||
|
|
||||||
|
\set VERBOSITY TERSE
|
||||||
|
PREPARE multi_shard_query_param(int) AS UPDATE lineitem SET l_quantity = $1;
|
||||||
|
BEGIN;
|
||||||
|
EXPLAIN EXECUTE multi_shard_query_param(5);
|
||||||
|
ROLLBACK;
|
||||||
|
BEGIN;
|
||||||
|
EXPLAIN (ANALYZE ON, COSTS OFF, TIMING OFF, SUMMARY OFF) EXECUTE multi_shard_query_param(5);
|
||||||
|
ROLLBACK;
|
||||||
|
\set VERBOSITY DEFAULT
|
||||||
|
|
||||||
-- test explain in a transaction with alter table to test we use right connections
|
-- test explain in a transaction with alter table to test we use right connections
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
|
Loading…
Reference in New Issue