diff --git a/src/test/regress/expected/pg15.out b/src/test/regress/expected/pg15.out index 5453b4b84..dee485d4c 100644 --- a/src/test/regress/expected/pg15.out +++ b/src/test/regress/expected/pg15.out @@ -1536,20 +1536,6 @@ RESET citus.enable_create_database_propagation; CREATE ROLE local_role_1; ALTER DATABASE local_database_1 REFRESH COLLATION VERSION; NOTICE: version has not changed -SET citus.enable_create_database_propagation TO on; -create database alter_db_from_nonmain_db_pg15; -NOTICE: issuing ALTER DATABASE citus_temp_database_2_0 RENAME TO alter_db_from_nonmain_db_pg15 -NOTICE: issuing ALTER DATABASE citus_temp_database_2_0 RENAME TO alter_db_from_nonmain_db_pg15 -\c alter_db_from_nonmain_db_pg15 -set citus.log_remote_commands = true; -set citus.grep_remote_commands = '%ALTER DATABASE%'; -ALTER DATABASE alter_db_from_nonmain_db_pg15 REFRESH COLLATION VERSION; -NOTICE: issuing SELECT citus_internal.execute_command_on_remote_nodes_as_user('ALTER DATABASE alter_db_from_nonmain_db_pg15 REFRESH COLLATION VERSION;', 'postgres') -NOTICE: version has not changed -reset citus.log_remote_commands; -reset citus.grep_remote_commands; -\c regression -drop database alter_db_from_nonmain_db_pg15; SET citus.enable_create_database_propagation TO OFF; REVOKE CONNECT, TEMPORARY, CREATE ON DATABASE local_database_1 FROM local_role_1; DROP ROLE local_role_1; @@ -1561,3 +1547,18 @@ SET client_min_messages TO ERROR; DROP SCHEMA pg15 CASCADE; DROP ROLE rls_tenant_1; DROP ROLE rls_tenant_2; +-- test refresh collation version on non-main databases +SET citus.enable_create_database_propagation TO on; +create database alter_db_from_nonmain_db_pg15; +\c alter_db_from_nonmain_db_pg15 +set citus.log_remote_commands = true; +set citus.grep_remote_commands = '%ALTER DATABASE%'; +ALTER DATABASE alter_db_from_nonmain_db_pg15 REFRESH COLLATION VERSION; +NOTICE: issuing SELECT citus_internal.execute_command_on_remote_nodes_as_user('ALTER DATABASE alter_db_from_nonmain_db_pg15 REFRESH COLLATION VERSION;', 'postgres') +NOTICE: version has not changed +reset citus.log_remote_commands; +reset citus.grep_remote_commands; +\c regression +SET citus.enable_create_database_propagation TO on; +drop database alter_db_from_nonmain_db_pg15; +reset citus.enable_create_database_propagation; diff --git a/src/test/regress/sql/pg15.sql b/src/test/regress/sql/pg15.sql index fa841a5dd..373bad511 100644 --- a/src/test/regress/sql/pg15.sql +++ b/src/test/regress/sql/pg15.sql @@ -977,19 +977,6 @@ CREATE ROLE local_role_1; ALTER DATABASE local_database_1 REFRESH COLLATION VERSION; -SET citus.enable_create_database_propagation TO on; -create database alter_db_from_nonmain_db_pg15; - -\c alter_db_from_nonmain_db_pg15 -set citus.log_remote_commands = true; -set citus.grep_remote_commands = '%ALTER DATABASE%'; -ALTER DATABASE alter_db_from_nonmain_db_pg15 REFRESH COLLATION VERSION; - -reset citus.log_remote_commands; -reset citus.grep_remote_commands; - -\c regression -drop database alter_db_from_nonmain_db_pg15; SET citus.enable_create_database_propagation TO OFF; @@ -1005,3 +992,20 @@ SET client_min_messages TO ERROR; DROP SCHEMA pg15 CASCADE; DROP ROLE rls_tenant_1; DROP ROLE rls_tenant_2; + +-- test refresh collation version on non-main databases +SET citus.enable_create_database_propagation TO on; +create database alter_db_from_nonmain_db_pg15; + +\c alter_db_from_nonmain_db_pg15 +set citus.log_remote_commands = true; +set citus.grep_remote_commands = '%ALTER DATABASE%'; +ALTER DATABASE alter_db_from_nonmain_db_pg15 REFRESH COLLATION VERSION; + +reset citus.log_remote_commands; +reset citus.grep_remote_commands; + +\c regression +SET citus.enable_create_database_propagation TO on; +drop database alter_db_from_nonmain_db_pg15; +reset citus.enable_create_database_propagation;