diff --git a/src/test/regress/expected/citus_local_tables_queries_mx.out b/src/test/regress/expected/citus_local_tables_queries_mx.out index 52b73e7df..2eff2cd1d 100644 --- a/src/test/regress/expected/citus_local_tables_queries_mx.out +++ b/src/test/regress/expected/citus_local_tables_queries_mx.out @@ -683,11 +683,13 @@ SELECT count(*) FROM distributed_table WHERE b in 0 (1 row) +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW view_2 AS SELECT count(*) FROM citus_local_table JOIN citus_local_table_2 USING (a) JOIN distributed_table USING (a); +RESET citus.enable_ddl_propagation; -- should fail as view contains direct local dist join SELECT count(*) FROM view_2; count @@ -695,11 +697,13 @@ SELECT count(*) FROM view_2; 1 (1 row) +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW view_3 AS SELECT count(*) FROM citus_local_table_2 JOIN reference_table USING (a); +RESET citus.enable_ddl_propagation; -- ok SELECT count(*) FROM view_3; count diff --git a/src/test/regress/expected/local_shard_execution.out b/src/test/regress/expected/local_shard_execution.out index 5d29a4e71..0bb82a08e 100644 --- a/src/test/regress/expected/local_shard_execution.out +++ b/src/test/regress/expected/local_shard_execution.out @@ -398,7 +398,9 @@ INSERT INTO distributed_table VALUES (1, '22', 20); NOTICE: executing the command locally: INSERT INTO local_shard_execution.distributed_table_1470001 (key, value, age) VALUES (1, '22'::text, 20) INSERT INTO second_distributed_table VALUES (1, '1'); NOTICE: executing the command locally: INSERT INTO local_shard_execution.second_distributed_table_1470005 (key, value) VALUES (1, '1'::text) +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW abcd_view AS SELECT * FROM abcd; +RESET citus.enable_ddl_propagation; SELECT * FROM abcd first join abcd second on first.b = second.b ORDER BY 1,2,3,4; b | c | d | b | c | d --------------------------------------------------------------------- @@ -1656,8 +1658,10 @@ NOTICE: executing the command locally: DELETE FROM local_shard_execution.distri ROLLBACK; -- probably not a realistic case since views are not very -- well supported with MX +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW v_local_query_execution AS SELECT * FROM distributed_table WHERE key = 500; +RESET citus.enable_ddl_propagation; SELECT * FROM v_local_query_execution; NOTICE: executing the command locally: SELECT key, value, age FROM (SELECT distributed_table.key, distributed_table.value, distributed_table.age FROM local_shard_execution.distributed_table_1470003 distributed_table WHERE (distributed_table.key OPERATOR(pg_catalog.=) 500)) v_local_query_execution key | value | age @@ -1667,8 +1671,10 @@ NOTICE: executing the command locally: SELECT key, value, age FROM (SELECT dist -- similar test, but this time the view itself is a non-local -- query, but the query on the view is local +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW v_local_query_execution_2 AS SELECT * FROM distributed_table; +RESET citus.enable_ddl_propagation; SELECT * FROM v_local_query_execution_2 WHERE key = 500; NOTICE: executing the command locally: SELECT key, value, age FROM (SELECT distributed_table.key, distributed_table.value, distributed_table.age FROM local_shard_execution.distributed_table_1470003 distributed_table) v_local_query_execution_2 WHERE (key OPERATOR(pg_catalog.=) 500) key | value | age diff --git a/src/test/regress/expected/local_shard_execution_replicated.out b/src/test/regress/expected/local_shard_execution_replicated.out index c297f0a99..200b99872 100644 --- a/src/test/regress/expected/local_shard_execution_replicated.out +++ b/src/test/regress/expected/local_shard_execution_replicated.out @@ -334,7 +334,9 @@ NOTICE: executing the command locally: SELECT key, value FROM local_shard_execu -- Put row back for other tests INSERT INTO distributed_table VALUES (1, '22', 20); NOTICE: executing the command locally: INSERT INTO local_shard_execution_replicated.distributed_table_1500001 (key, value, age) VALUES (1, '22'::text, 20) +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW abcd_view AS SELECT * FROM abcd; +RESET citus.enable_ddl_propagation; SELECT * FROM abcd first join abcd second on first.b = second.b ORDER BY 1,2,3,4; b | c | d | b | c | d --------------------------------------------------------------------- @@ -1650,8 +1652,10 @@ NOTICE: executing the command locally: DELETE FROM local_shard_execution_replic ROLLBACK; -- probably not a realistic case since views are not very -- well supported with MX +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW v_local_query_execution AS SELECT * FROM distributed_table WHERE key = 500; +RESET citus.enable_ddl_propagation; SELECT * FROM v_local_query_execution; NOTICE: executing the command locally: SELECT key, value, age FROM (SELECT distributed_table.key, distributed_table.value, distributed_table.age FROM local_shard_execution_replicated.distributed_table_1500003 distributed_table WHERE (distributed_table.key OPERATOR(pg_catalog.=) 500)) v_local_query_execution key | value | age @@ -1661,8 +1665,10 @@ NOTICE: executing the command locally: SELECT key, value, age FROM (SELECT dist -- similar test, but this time the view itself is a non-local -- query, but the query on the view is local +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW v_local_query_execution_2 AS SELECT * FROM distributed_table; +RESET citus.enable_ddl_propagation; SELECT * FROM v_local_query_execution_2 WHERE key = 500; NOTICE: executing the command locally: SELECT key, value, age FROM (SELECT distributed_table.key, distributed_table.value, distributed_table.age FROM local_shard_execution_replicated.distributed_table_1500003 distributed_table) v_local_query_execution_2 WHERE (key OPERATOR(pg_catalog.=) 500) key | value | age diff --git a/src/test/regress/expected/recursive_dml_queries_mx.out b/src/test/regress/expected/recursive_dml_queries_mx.out index fed88e1f2..b1e29ffb3 100644 --- a/src/test/regress/expected/recursive_dml_queries_mx.out +++ b/src/test/regress/expected/recursive_dml_queries_mx.out @@ -110,6 +110,7 @@ WHERE SET search_path TO recursive_dml_queries_mx, public; CREATE TABLE recursive_dml_queries_mx.local_table (id text, name text); INSERT INTO local_table SELECT i::text, 'user_' || i FROM generate_series (0, 100) i; +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW tenant_ids AS SELECT tenant_id, name @@ -118,6 +119,7 @@ CREATE VIEW tenant_ids AS WHERE distributed_table.dept::text = reference_table.id ORDER BY 2 DESC, 1 DESC; +RESET citus.enable_ddl_propagation; -- we currently do not allow local tables in modification queries UPDATE distributed_table diff --git a/src/test/regress/expected/resync_metadata_with_sequences.out b/src/test/regress/expected/resync_metadata_with_sequences.out index f96651a14..96ee1f2fb 100644 --- a/src/test/regress/expected/resync_metadata_with_sequences.out +++ b/src/test/regress/expected/resync_metadata_with_sequences.out @@ -141,6 +141,8 @@ INSERT INTO sensors_news VALUES (DEFAULT, DEFAULT, '2021-01-01') RETURNING *; \c - - - :master_port SELECT 1 FROM citus_activate_node('localhost', :worker_1_port); +NOTICE: Replicating postgres objects to node localhost:xxxxx +DETAIL: There are 102 objects to replicate, depending on your environment this might take a while ?column? --------------------------------------------------------------------- 1 diff --git a/src/test/regress/expected/start_stop_metadata_sync.out b/src/test/regress/expected/start_stop_metadata_sync.out index 1f82c60cb..d3f961124 100644 --- a/src/test/regress/expected/start_stop_metadata_sync.out +++ b/src/test/regress/expected/start_stop_metadata_sync.out @@ -141,7 +141,6 @@ SELECT * FROM distributed_table_1; --------------------------------------------------------------------- (0 rows) -CREATE VIEW test_view AS SELECT COUNT(*) FROM distributed_table_3; CREATE MATERIALIZED VIEW test_matview AS SELECT COUNT(*) FROM distributed_table_3; SELECT * FROM test_view; count diff --git a/src/test/regress/sql/citus_local_tables_queries_mx.sql b/src/test/regress/sql/citus_local_tables_queries_mx.sql index ddcc95d84..cad6a0386 100644 --- a/src/test/regress/sql/citus_local_tables_queries_mx.sql +++ b/src/test/regress/sql/citus_local_tables_queries_mx.sql @@ -445,20 +445,24 @@ SELECT count(*) FROM mat_view_4; SELECT count(*) FROM distributed_table WHERE b in (SELECT count FROM mat_view_4); +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW view_2 AS SELECT count(*) FROM citus_local_table JOIN citus_local_table_2 USING (a) JOIN distributed_table USING (a); +RESET citus.enable_ddl_propagation; -- should fail as view contains direct local dist join SELECT count(*) FROM view_2; +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW view_3 AS SELECT count(*) FROM citus_local_table_2 JOIN reference_table USING (a); +RESET citus.enable_ddl_propagation; -- ok SELECT count(*) FROM view_3; diff --git a/src/test/regress/sql/local_shard_execution.sql b/src/test/regress/sql/local_shard_execution.sql index b68863a7f..b74966227 100644 --- a/src/test/regress/sql/local_shard_execution.sql +++ b/src/test/regress/sql/local_shard_execution.sql @@ -230,7 +230,9 @@ SELECT * FROM second_distributed_table WHERE key = 1 ORDER BY 1,2; INSERT INTO distributed_table VALUES (1, '22', 20); INSERT INTO second_distributed_table VALUES (1, '1'); +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW abcd_view AS SELECT * FROM abcd; +RESET citus.enable_ddl_propagation; SELECT * FROM abcd first join abcd second on first.b = second.b ORDER BY 1,2,3,4; @@ -765,15 +767,19 @@ ROLLBACK; -- probably not a realistic case since views are not very -- well supported with MX +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW v_local_query_execution AS SELECT * FROM distributed_table WHERE key = 500; +RESET citus.enable_ddl_propagation; SELECT * FROM v_local_query_execution; -- similar test, but this time the view itself is a non-local -- query, but the query on the view is local +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW v_local_query_execution_2 AS SELECT * FROM distributed_table; +RESET citus.enable_ddl_propagation; SELECT * FROM v_local_query_execution_2 WHERE key = 500; diff --git a/src/test/regress/sql/local_shard_execution_replicated.sql b/src/test/regress/sql/local_shard_execution_replicated.sql index 81b47cfc8..a8fe72b98 100644 --- a/src/test/regress/sql/local_shard_execution_replicated.sql +++ b/src/test/regress/sql/local_shard_execution_replicated.sql @@ -194,7 +194,9 @@ SELECT * FROM second_distributed_table WHERE key = 1 ORDER BY 1,2; -- Put row back for other tests INSERT INTO distributed_table VALUES (1, '22', 20); +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW abcd_view AS SELECT * FROM abcd; +RESET citus.enable_ddl_propagation; SELECT * FROM abcd first join abcd second on first.b = second.b ORDER BY 1,2,3,4; @@ -729,15 +731,19 @@ ROLLBACK; -- probably not a realistic case since views are not very -- well supported with MX +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW v_local_query_execution AS SELECT * FROM distributed_table WHERE key = 500; +RESET citus.enable_ddl_propagation; SELECT * FROM v_local_query_execution; -- similar test, but this time the view itself is a non-local -- query, but the query on the view is local +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW v_local_query_execution_2 AS SELECT * FROM distributed_table; +RESET citus.enable_ddl_propagation; SELECT * FROM v_local_query_execution_2 WHERE key = 500; diff --git a/src/test/regress/sql/recursive_dml_queries_mx.sql b/src/test/regress/sql/recursive_dml_queries_mx.sql index 88b21e0b4..426fbc8ae 100644 --- a/src/test/regress/sql/recursive_dml_queries_mx.sql +++ b/src/test/regress/sql/recursive_dml_queries_mx.sql @@ -104,6 +104,7 @@ SET search_path TO recursive_dml_queries_mx, public; CREATE TABLE recursive_dml_queries_mx.local_table (id text, name text); INSERT INTO local_table SELECT i::text, 'user_' || i FROM generate_series (0, 100) i; +SET citus.enable_ddl_propagation TO OFF; CREATE VIEW tenant_ids AS SELECT tenant_id, name @@ -112,6 +113,7 @@ CREATE VIEW tenant_ids AS WHERE distributed_table.dept::text = reference_table.id ORDER BY 2 DESC, 1 DESC; +RESET citus.enable_ddl_propagation; -- we currently do not allow local tables in modification queries UPDATE diff --git a/src/test/regress/sql/start_stop_metadata_sync.sql b/src/test/regress/sql/start_stop_metadata_sync.sql index a23eba415..4e30cef1c 100644 --- a/src/test/regress/sql/start_stop_metadata_sync.sql +++ b/src/test/regress/sql/start_stop_metadata_sync.sql @@ -103,7 +103,6 @@ SELECT start_metadata_sync_to_node('localhost', :worker_1_port); \c - - - :worker_1_port SET search_path TO "start_stop_metadata_sync"; SELECT * FROM distributed_table_1; -CREATE VIEW test_view AS SELECT COUNT(*) FROM distributed_table_3; CREATE MATERIALIZED VIEW test_matview AS SELECT COUNT(*) FROM distributed_table_3; SELECT * FROM test_view; SELECT * FROM test_matview;