mirror of https://github.com/citusdata/citus.git
Adds expected test result
parent
8d6d27a241
commit
f8962380a1
|
@ -186,6 +186,9 @@ PreprocessAlterDatabaseStmt(Node *node, const char *queryString,
|
||||||
|
|
||||||
if (strstr(sql, "SET TABLESPACE") != NULL)
|
if (strstr(sql, "SET TABLESPACE") != NULL)
|
||||||
{
|
{
|
||||||
|
/*Set tablespace does not work inside a transaction.Therefore, we close the transaction before set tablespace
|
||||||
|
* and open it again after set tablespace.
|
||||||
|
*/
|
||||||
commands = list_make5(DISABLE_DDL_PROPAGATION,
|
commands = list_make5(DISABLE_DDL_PROPAGATION,
|
||||||
COMMIT_TRANSACTION,
|
COMMIT_TRANSACTION,
|
||||||
sql,
|
sql,
|
||||||
|
|
|
@ -156,17 +156,34 @@ NOTICE: issuing ALTER DATABASE regression2 WITH IS_TEMPLATE false;
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||||
NOTICE: issuing ALTER DATABASE regression2 WITH IS_TEMPLATE false;
|
NOTICE: issuing ALTER DATABASE regression2 WITH IS_TEMPLATE false;
|
||||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||||
alter database regression2 set TABLESPACE pg_default;
|
\set alter_db_tablespace :abs_srcdir '/tmp_check/ts3'
|
||||||
NOTICE: Citus partially supports ALTER DATABASE SET TABLESPACE for distributed databases
|
CREATE TABLESPACE alter_db_tablespace LOCATION :'alter_db_tablespace';
|
||||||
DETAIL: Citus does not propagate ALTER DATABASE SET TABLESPACE command to workers
|
|
||||||
HINT: You can manually alter a tablespace for a database and its extensions on workers.
|
|
||||||
\c - - - :worker_1_port
|
\c - - - :worker_1_port
|
||||||
alter database regression2 set TABLESPACE pg_default;
|
\set alter_db_tablespace :abs_srcdir '/tmp_check/ts4'
|
||||||
|
CREATE TABLESPACE alter_db_tablespace LOCATION :'alter_db_tablespace';
|
||||||
\c - - - :worker_2_port
|
\c - - - :worker_2_port
|
||||||
alter database regression2 set TABLESPACE pg_default;
|
\set alter_db_tablespace :abs_srcdir '/tmp_check/ts5'
|
||||||
|
CREATE TABLESPACE alter_db_tablespace LOCATION :'alter_db_tablespace';
|
||||||
\c - - - :master_port
|
\c - - - :master_port
|
||||||
|
set citus.log_remote_commands = true;
|
||||||
|
set citus.grep_remote_commands = '%ALTER DATABASE%';
|
||||||
|
alter database regression2 set TABLESPACE alter_db_tablespace;
|
||||||
|
NOTICE: issuing ALTER DATABASE regression2 SET TABLESPACE alter_db_tablespace;
|
||||||
|
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||||
|
NOTICE: issuing ALTER DATABASE regression2 SET TABLESPACE alter_db_tablespace;
|
||||||
|
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||||
set citus.enable_create_database_propagation=on;
|
set citus.enable_create_database_propagation=on;
|
||||||
alter database regression2 rename to regression3;
|
alter database regression2 rename to regression3;
|
||||||
|
NOTICE: issuing ALTER DATABASE regression2 RENAME TO regression3
|
||||||
|
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||||
|
NOTICE: issuing ALTER DATABASE regression2 RENAME TO regression3
|
||||||
|
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||||
drop database regression3;
|
drop database regression3;
|
||||||
set citus.log_remote_commands = false;
|
set citus.log_remote_commands = false;
|
||||||
set citus.enable_create_database_propagation=off;
|
set citus.enable_create_database_propagation=off;
|
||||||
|
drop tablespace alter_db_tablespace;
|
||||||
|
\c - - - :worker_1_port
|
||||||
|
drop tablespace alter_db_tablespace;
|
||||||
|
\c - - - :worker_2_port
|
||||||
|
drop tablespace alter_db_tablespace;
|
||||||
|
\c - - - :master_port
|
||||||
|
|
Loading…
Reference in New Issue