mirror of https://github.com/citusdata/citus.git
dont ensure sequential mode
parent
96343b03fa
commit
9c6897b26c
|
@ -110,8 +110,6 @@ PostprocessViewStmt(Node *node, const char *queryString)
|
|||
return NIL;
|
||||
}
|
||||
|
||||
EnsureSequentialMode(OBJECT_VIEW);
|
||||
|
||||
EnsureDependenciesExistOnAllNodes(&viewAddress);
|
||||
|
||||
const char *sql = DeparseTreeNode((Node *) stmt);
|
||||
|
@ -180,7 +178,6 @@ PreprocessDropViewStmt(Node *node, const char *queryString, ProcessUtilityContex
|
|||
}
|
||||
|
||||
EnsureCoordinator();
|
||||
EnsureSequentialMode(OBJECT_VIEW);
|
||||
|
||||
/*
|
||||
* Swap the list of objects before deparsing and restore the old list after. This
|
||||
|
|
|
@ -362,8 +362,6 @@ WARNING: "view local_regular_view" has dependency to "table local" that is not
|
|||
DETAIL: "view local_regular_view" will be created only locally
|
||||
HINT: Distribute "table local" first to distribute "view local_regular_view"
|
||||
CREATE VIEW dist_regular_view AS SELECT * FROM distributed;
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT count(*) FROM distributed JOIN local_regular_view USING (id);
|
||||
DEBUG: generating subplan XXX_1 for subquery SELECT local.id, local.title FROM local_dist_join_mixed.local
|
||||
DEBUG: Plan XXX query after replacing subqueries and CTEs: SELECT count(*) AS count FROM (local_dist_join_mixed.distributed JOIN (SELECT intermediate_result.id, intermediate_result.title FROM read_intermediate_result('XXX_1'::text, 'binary'::citus_copy_format) intermediate_result(id bigint, title text)) local_regular_view USING (id))
|
||||
|
|
|
@ -1611,8 +1611,6 @@ DEBUG: Creating router plan
|
|||
-- same scenario with a view
|
||||
CREATE VIEW num_db AS
|
||||
SELECT s.datid FROM number1() s LEFT JOIN pg_database d ON s.datid = d.oid;
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT 1 FROM authors_reference r JOIN num_db ON (r.id = num_db.datid) LIMIT 1;
|
||||
DEBUG: found no worker with all shard placements
|
||||
DEBUG: function does not have co-located tables
|
||||
|
|
|
@ -1996,8 +1996,6 @@ DEBUG: Creating router plan
|
|||
-- views internally become subqueries, so not fast-path router query
|
||||
CREATE VIEW test_view AS
|
||||
SELECT * FROM articles_hash WHERE author_id = 1;
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT * FROM test_view;
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: query has a single distribution column value: 1
|
||||
|
|
|
@ -1093,7 +1093,6 @@ SELECT create_distributed_table('table1','tenant_id');
|
|||
(1 row)
|
||||
|
||||
CREATE VIEW table1_view AS SELECT * from table1 where id < 100;
|
||||
DEBUG: switching to sequential query execution mode
|
||||
-- all of the above queries are non-colocated subquery joins
|
||||
-- because the views are replaced with subqueries
|
||||
UPDATE table2 SET id=20 FROM table1_view WHERE table1_view.id=table2.id;
|
||||
|
|
|
@ -978,8 +978,6 @@ DEBUG: Creating router plan
|
|||
SET citus.enable_repartition_joins TO OFF;
|
||||
-- this should be recursively planned
|
||||
CREATE VIEW set_view_recursive AS (SELECT y FROM test) UNION (SELECT y FROM test);
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT * FROM set_view_recursive ORDER BY 1 DESC;
|
||||
DEBUG: Router planner cannot handle multi-shard select queries
|
||||
DEBUG: Router planner cannot handle multi-shard select queries
|
||||
|
@ -998,8 +996,6 @@ DEBUG: Creating router plan
|
|||
|
||||
-- this should be pushed down
|
||||
CREATE VIEW set_view_pushdown AS (SELECT x FROM test) UNION (SELECT x FROM test);
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT * FROM set_view_pushdown ORDER BY 1 DESC;
|
||||
DEBUG: Router planner cannot handle multi-shard select queries
|
||||
x
|
||||
|
@ -1010,8 +1006,6 @@ DEBUG: Router planner cannot handle multi-shard select queries
|
|||
|
||||
-- this should be recursively planned
|
||||
CREATE VIEW set_view_recursive_second AS SELECT u.x, test.y FROM ((SELECT x, y FROM test) UNION (SELECT 1, 1 FROM test)) u JOIN test USING (x) ORDER BY 1,2;
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT * FROM set_view_recursive_second ORDER BY 1,2;
|
||||
DEBUG: Router planner cannot handle multi-shard select queries
|
||||
DEBUG: Router planner cannot handle multi-shard select queries
|
||||
|
|
|
@ -16,8 +16,6 @@ SELECT
|
|||
users_table.user_id = events_table.user_id AND
|
||||
event_type IN (1,2,3,4)
|
||||
ORDER BY 1 DESC;
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
|
@ -44,8 +42,6 @@ SELECT
|
|||
event_type IN (1,2,3,4)
|
||||
ORDER BY 1 DESC
|
||||
LIMIT 5;
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
|
@ -78,8 +74,6 @@ FROM
|
|||
ORDER BY 1 DESC LIMIT 5
|
||||
) as foo
|
||||
ORDER BY 1 DESC;
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT * FROM subquery_limit ORDER BY 1 DESC;
|
||||
DEBUG: push down of limit count: 5
|
||||
DEBUG: generating subplan XXX_1 for subquery SELECT DISTINCT users_table.user_id FROM public.users_table, public.events_table WHERE ((users_table.user_id OPERATOR(pg_catalog.=) events_table.user_id) AND (events_table.event_type OPERATOR(pg_catalog.=) ANY (ARRAY[1, 2, 3, 4]))) ORDER BY users_table.user_id DESC LIMIT 5
|
||||
|
@ -108,8 +102,6 @@ FROM
|
|||
ORDER BY 1
|
||||
) as foo
|
||||
ORDER BY 1 DESC;
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT * FROM subquery_non_p_key_group_by ORDER BY 1 DESC;
|
||||
DEBUG: generating subplan XXX_1 for subquery SELECT DISTINCT users_table.value_1 FROM public.users_table, public.events_table WHERE ((users_table.user_id OPERATOR(pg_catalog.=) events_table.user_id) AND (events_table.event_type OPERATOR(pg_catalog.=) ANY (ARRAY[1, 2, 3, 4]))) ORDER BY users_table.value_1
|
||||
DEBUG: Plan XXX query after replacing subqueries and CTEs: SELECT value_1 FROM (SELECT foo.value_1 FROM (SELECT intermediate_result.value_1 FROM read_intermediate_result('XXX_1'::text, 'binary'::citus_copy_format) intermediate_result(value_1 integer)) foo ORDER BY foo.value_1 DESC) subquery_non_p_key_group_by ORDER BY value_1 DESC
|
||||
|
@ -149,8 +141,6 @@ FROM
|
|||
) as bar
|
||||
WHERE foo.value_2 = bar.value_3
|
||||
ORDER BY 2 DESC, 1;
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT * FROM final_query_router ORDER BY 1;
|
||||
DEBUG: generating subplan XXX_1 for subquery SELECT users_table.value_2 FROM public.users_table, public.events_table WHERE ((users_table.user_id OPERATOR(pg_catalog.=) events_table.user_id) AND (events_table.event_type OPERATOR(pg_catalog.=) ANY (ARRAY[1, 2, 3, 4]))) GROUP BY users_table.value_2 ORDER BY users_table.value_2 DESC
|
||||
DEBUG: generating subplan XXX_2 for subquery SELECT users_table.value_3 FROM public.users_table, public.events_table WHERE ((users_table.user_id OPERATOR(pg_catalog.=) events_table.user_id) AND (events_table.event_type OPERATOR(pg_catalog.=) ANY (ARRAY[5, 6, 7, 8]))) GROUP BY users_table.value_3 ORDER BY users_table.value_3 DESC
|
||||
|
@ -191,8 +181,6 @@ FROM
|
|||
WHERE foo.value_2 = bar.user_id
|
||||
ORDER BY 2 DESC, 1 DESC
|
||||
LIMIT 3;
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT
|
||||
DISTINCT ON (users_table.value_2) users_table.value_2, time, value_3
|
||||
FROM
|
||||
|
@ -218,8 +206,6 @@ SELECT DISTINCT user_id
|
|||
FROM users_table
|
||||
WHERE
|
||||
user_id IN (SELECT DISTINCT value_2 FROM users_table WHERE value_1 >= 1 AND value_1 <= 20 ORDER BY 1 LIMIT 5);
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
|
@ -262,8 +248,6 @@ FROM (
|
|||
) t
|
||||
GROUP BY user_id
|
||||
) q;
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
|
@ -327,8 +311,6 @@ FROM
|
|||
SELECT user_id FROM users_table
|
||||
) as bar
|
||||
WHERE foo.value_2 = bar.user_id;
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
|
@ -529,8 +511,6 @@ FROM
|
|||
) as level_6, users_table WHERE users_table.user_id = level_6.min
|
||||
GROUP BY users_table.value_1
|
||||
) as bar;
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
|
@ -562,8 +542,6 @@ FROM
|
|||
ORDER BY 1 DESC LIMIT 5
|
||||
) as foo
|
||||
ORDER BY 1 DESC;
|
||||
DEBUG: switching to sequential query execution mode
|
||||
DETAIL: A command for a distributed view is run. To make sure subsequent commands see the view correctly we need to make sure to use only one connection for all future commands
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
|
|
Loading…
Reference in New Issue