diff --git a/src/test/regress/citus_tests/run_test.py b/src/test/regress/citus_tests/run_test.py index e21d47a45..74c5ed31b 100755 --- a/src/test/regress/citus_tests/run_test.py +++ b/src/test/regress/citus_tests/run_test.py @@ -85,6 +85,7 @@ if __name__ == "__main__": "create_role_propagation": TestDeps(None, ["multi_cluster_management"]), "single_node_enterprise": TestDeps(None), "single_node": TestDeps(None), + "single_node_truncate": TestDeps(None), "multi_extension": TestDeps(None, repeatable=False), "multi_test_helpers": TestDeps(None), "multi_insert_select": TestDeps("base_schedule"), diff --git a/src/test/regress/expected/single_node_truncate.out b/src/test/regress/expected/single_node_truncate.out index 7d94dc744..18883a4df 100644 --- a/src/test/regress/expected/single_node_truncate.out +++ b/src/test/regress/expected/single_node_truncate.out @@ -1,6 +1,7 @@ CREATE SCHEMA single_node_truncate; SET search_path TO single_node_truncate; SET citus.shard_replication_factor TO 1; +SET citus.next_shard_id TO 91630500; -- helper view that prints out local table names and sizes in the schema CREATE VIEW table_sizes AS SELECT @@ -28,12 +29,12 @@ CREATE TABLE citus_local(id int, ref_id int REFERENCES ref(id)); INSERT INTO citus_local SELECT x,x FROM generate_series(1,10000) x; -- verify that shell tables for citus local tables are empty SELECT * FROM table_sizes; - name | has_data + name | has_data --------------------------------------------------------------------- - citus_local | f - citus_local_102049 | t - ref | t - ref_102048 | t + citus_local | f + citus_local_91630501 | t + ref | t + ref_91630500 | t (4 rows) -- verify that this UDF is noop on Citus local tables @@ -44,12 +45,12 @@ SELECT truncate_local_data_after_distributing_table('citus_local'); (1 row) SELECT * FROM table_sizes; - name | has_data + name | has_data --------------------------------------------------------------------- - citus_local | f - citus_local_102049 | t - ref | t - ref_102048 | t + citus_local | f + citus_local_91630501 | t + ref | t + ref_91630500 | t (4 rows) -- test that we allow cascading truncates to citus local tables @@ -62,12 +63,12 @@ NOTICE: truncate cascades to table "citus_local" (1 row) SELECT * FROM table_sizes; - name | has_data + name | has_data --------------------------------------------------------------------- - citus_local | f - citus_local_102049 | t - ref | f - ref_102048 | t + citus_local | f + citus_local_91630501 | t + ref | f + ref_91630500 | t (4 rows) ROLLBACK; @@ -95,17 +96,17 @@ NOTICE: truncate cascades to table "dist" (1 row) SELECT * FROM table_sizes; - name | has_data + name | has_data --------------------------------------------------------------------- - citus_local | f - citus_local_102049 | t - dist | f - dist_102051 | t - dist_102052 | t - dist_102053 | t - dist_102054 | t - ref | f - ref_102048 | t + citus_local | f + citus_local_91630501 | t + dist | f + dist_91630503 | t + dist_91630504 | t + dist_91630505 | t + dist_91630506 | t + ref | f + ref_91630500 | t (9 rows) ROLLBACK; @@ -118,17 +119,17 @@ SELECT truncate_local_data_after_distributing_table('dist'); (1 row) SELECT * FROM table_sizes; - name | has_data + name | has_data --------------------------------------------------------------------- - citus_local | f - citus_local_102049 | t - dist | f - dist_102051 | t - dist_102052 | t - dist_102053 | t - dist_102054 | t - ref | t - ref_102048 | t + citus_local | f + citus_local_91630501 | t + dist | f + dist_91630503 | t + dist_91630504 | t + dist_91630505 | t + dist_91630506 | t + ref | t + ref_91630500 | t (9 rows) ROLLBACK; diff --git a/src/test/regress/sql/single_node_truncate.sql b/src/test/regress/sql/single_node_truncate.sql index 5b555ff91..faaae7858 100644 --- a/src/test/regress/sql/single_node_truncate.sql +++ b/src/test/regress/sql/single_node_truncate.sql @@ -1,6 +1,7 @@ CREATE SCHEMA single_node_truncate; SET search_path TO single_node_truncate; SET citus.shard_replication_factor TO 1; +SET citus.next_shard_id TO 91630500; -- helper view that prints out local table names and sizes in the schema CREATE VIEW table_sizes AS