diff --git a/src/test/regress/expected/multi_follower_dml.out b/src/test/regress/expected/multi_follower_dml.out index bd3811864..6fdb91e71 100644 --- a/src/test/regress/expected/multi_follower_dml.out +++ b/src/test/regress/expected/multi_follower_dml.out @@ -90,6 +90,12 @@ SELECT * FROM the_table ORDER BY a; -- we should still disallow writes to local tables INSERT INTO local VALUES (1, 1); ERROR: cannot execute INSERT in a read-only transaction +INSERT INTO local SELECT a, b FROM the_table; +ERROR: cannot INSERT rows from a distributed query into a local table +HINT: Consider using CREATE TEMPORARY TABLE tmp AS SELECT ... and inserting from the temporary table. +-- we shouldn't be able to create local tables +CREATE TEMP TABLE local_copy_of_the_table AS SELECT * FROM the_table; +ERROR: cannot execute CREATE TABLE AS in a read-only transaction \c "port=9070 dbname=regression options='-c\ citus.use_secondary_nodes=always\ -c\ citus.cluster_name=second-cluster'" -- separate follower formations currently cannot do writes SET citus.writable_standby_coordinator TO on; diff --git a/src/test/regress/sql/multi_follower_dml.sql b/src/test/regress/sql/multi_follower_dml.sql index f002f10ab..5438457fb 100644 --- a/src/test/regress/sql/multi_follower_dml.sql +++ b/src/test/regress/sql/multi_follower_dml.sql @@ -64,6 +64,10 @@ SELECT * FROM the_table ORDER BY a; -- we should still disallow writes to local tables INSERT INTO local VALUES (1, 1); +INSERT INTO local SELECT a, b FROM the_table; + +-- we shouldn't be able to create local tables +CREATE TEMP TABLE local_copy_of_the_table AS SELECT * FROM the_table; \c "port=9070 dbname=regression options='-c\ citus.use_secondary_nodes=always\ -c\ citus.cluster_name=second-cluster'"