Fixes test errors

alter_database_nonmain
gurkanindibay 2024-03-15 18:17:42 +03:00
parent 8bc2623687
commit 3c3477efec
4 changed files with 31 additions and 5 deletions

View File

@ -30,10 +30,6 @@ set citus.grep_remote_commands = "%ALTER DATABASE%";
set citus.enable_create_database_propagation=on;
alter database altered_database owner to test_owner_non_main_db;
alter database altered_database owner to CURRENT_USER;
ALTER DATABASE altered_database REFRESH COLLATION VERSION;
NOTICE: issuing SELECT citus_internal.execute_command_on_remote_nodes_as_user('ALTER DATABASE altered_database REFRESH COLLATION VERSION;', 'postgres')
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
NOTICE: version has not changed
alter database altered_database set default_transaction_read_only = true;
NOTICE: issuing SELECT citus_internal.execute_command_on_remote_nodes_as_user('ALTER DATABASE altered_database SET default_transaction_read_only = ''true''', 'postgres')
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx

View File

@ -1536,6 +1536,21 @@ 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;
NOTICE: issuing ALTER DATABASE citus_temp_database_2_0 RENAME TO alter_db_from_nonmain_db
NOTICE: issuing ALTER DATABASE citus_temp_database_2_0 RENAME TO alter_db_from_nonmain_db
\c alter_db_from_nonmain_db
set citus.log_remote_commands = true;
set citus.grep_remote_commands = '%ALTER DATABASE%';
ALTER DATABASE alter_db_from_nonmain_db REFRESH COLLATION VERSION;
NOTICE: issuing SELECT citus_internal.execute_command_on_remote_nodes_as_user('ALTER DATABASE alter_db_from_nonmain_db 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;
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;
DROP DATABASE local_database_1;

View File

@ -28,7 +28,6 @@ set citus.grep_remote_commands = "%ALTER DATABASE%";
set citus.enable_create_database_propagation=on;
alter database altered_database owner to test_owner_non_main_db;
alter database altered_database owner to CURRENT_USER;
ALTER DATABASE altered_database REFRESH COLLATION VERSION;
alter database altered_database set default_transaction_read_only = true;
set default_transaction_read_only = false;
alter database altered_database set default_transaction_read_only from current;

View File

@ -977,6 +977,22 @@ 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;
\c alter_db_from_nonmain_db
set citus.log_remote_commands = true;
set citus.grep_remote_commands = '%ALTER DATABASE%';
ALTER DATABASE alter_db_from_nonmain_db REFRESH COLLATION VERSION;
reset citus.log_remote_commands;
reset citus.grep_remote_commands;
\c regression
drop database alter_db_from_nonmain_db;
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;
DROP DATABASE local_database_1;