mirror of https://github.com/citusdata/citus.git
Fixes review notes
parent
75f1e691c1
commit
328e34969d
|
@ -214,20 +214,20 @@ PreprocessAlterDatabaseStmt(Node *node, const char *queryString,
|
|||
/*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,
|
||||
COMMIT_TRANSACTION,
|
||||
commands = list_make3(DISABLE_DDL_PROPAGATION,
|
||||
sql,
|
||||
BEGIN_TRANSACTION,
|
||||
ENABLE_DDL_PROPAGATION);
|
||||
return NontransactionalNodeDDLTask(NON_COORDINATOR_NODES, commands);
|
||||
}
|
||||
else
|
||||
{
|
||||
commands = list_make3(DISABLE_DDL_PROPAGATION,
|
||||
(void *) sql,
|
||||
ENABLE_DDL_PROPAGATION);
|
||||
return NodeDDLTaskList(NON_COORDINATOR_NODES, commands);
|
||||
}
|
||||
|
||||
return NodeDDLTaskList(NON_COORDINATOR_NODES, commands);
|
||||
return NIL;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ const struct option_format create_database_option_formats[] = {
|
|||
const struct option_format alter_database_option_formats[] = {
|
||||
{ "is_template", " IS_TEMPLATE %s", OPTION_FORMAT_BOOLEAN },
|
||||
{ "allow_connections", " ALLOW_CONNECTIONS %s", OPTION_FORMAT_BOOLEAN },
|
||||
{ "connection_limit", " CONNECTION_LIMIT %d", OPTION_FORMAT_INTEGER },
|
||||
{ "connection_limit", " CONNECTION LIMIT %d", OPTION_FORMAT_INTEGER },
|
||||
};
|
||||
|
||||
char *
|
||||
|
@ -119,7 +119,7 @@ AppendBasicAlterDatabaseOptions(StringInfo buf, DefElem *def, bool
|
|||
{
|
||||
if (!prefix_appended_for_basic_options)
|
||||
{
|
||||
appendStringInfo(buf, "ALTER DATABASE %s WITH ", quote_identifier(dbname));
|
||||
appendStringInfo(buf, "ALTER DATABASE %s WITH", quote_identifier(dbname));
|
||||
prefix_appended_for_basic_options = true;
|
||||
}
|
||||
optionToStatement(buf, def, alter_database_option_formats, lengthof(
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
set citus.log_remote_commands = true;
|
||||
set citus.grep_remote_commands = '%ALTER DATABASE%';
|
||||
alter database regression with CONNECTION LIMIT 100;
|
||||
NOTICE: issuing ALTER DATABASE regression WITH CONNECTION_LIMIT 100;
|
||||
NOTICE: issuing ALTER DATABASE regression WITH CONNECTION LIMIT 100;
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing ALTER DATABASE regression WITH CONNECTION_LIMIT 100;
|
||||
NOTICE: issuing ALTER DATABASE regression WITH CONNECTION LIMIT 100;
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
alter database regression with IS_TEMPLATE true CONNECTION LIMIT 50;
|
||||
NOTICE: issuing ALTER DATABASE regression WITH IS_TEMPLATE true CONNECTION_LIMIT 50;
|
||||
NOTICE: issuing ALTER DATABASE regression WITH IS_TEMPLATE true CONNECTION LIMIT 50;
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing ALTER DATABASE regression WITH IS_TEMPLATE true CONNECTION_LIMIT 50;
|
||||
NOTICE: issuing ALTER DATABASE regression WITH IS_TEMPLATE true CONNECTION LIMIT 50;
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
alter database regression with CONNECTION LIMIT -1;
|
||||
NOTICE: issuing ALTER DATABASE regression WITH CONNECTION_LIMIT -1;
|
||||
NOTICE: issuing ALTER DATABASE regression WITH CONNECTION LIMIT -1;
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing ALTER DATABASE regression WITH CONNECTION_LIMIT -1;
|
||||
NOTICE: issuing ALTER DATABASE regression WITH CONNECTION LIMIT -1;
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
alter database regression with IS_TEMPLATE true;
|
||||
NOTICE: issuing ALTER DATABASE regression WITH IS_TEMPLATE true;
|
||||
|
@ -142,14 +142,14 @@ DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
|||
set citus.enable_create_database_propagation=on;
|
||||
create database regression2;
|
||||
alter database regression2 with CONNECTION LIMIT 100;
|
||||
NOTICE: issuing ALTER DATABASE regression2 WITH CONNECTION_LIMIT 100;
|
||||
NOTICE: issuing ALTER DATABASE regression2 WITH CONNECTION LIMIT 100;
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing ALTER DATABASE regression2 WITH CONNECTION_LIMIT 100;
|
||||
NOTICE: issuing ALTER DATABASE regression2 WITH CONNECTION LIMIT 100;
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
alter database regression2 with IS_TEMPLATE true CONNECTION LIMIT 50;
|
||||
NOTICE: issuing ALTER DATABASE regression2 WITH IS_TEMPLATE true CONNECTION_LIMIT 50;
|
||||
NOTICE: issuing ALTER DATABASE regression2 WITH IS_TEMPLATE true CONNECTION LIMIT 50;
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
NOTICE: issuing ALTER DATABASE regression2 WITH IS_TEMPLATE true CONNECTION_LIMIT 50;
|
||||
NOTICE: issuing ALTER DATABASE regression2 WITH IS_TEMPLATE true CONNECTION LIMIT 50;
|
||||
DETAIL: on server postgres@localhost:xxxxx connectionId: xxxxxxx
|
||||
alter database regression2 with IS_TEMPLATE false;
|
||||
NOTICE: issuing ALTER DATABASE regression2 WITH IS_TEMPLATE false;
|
||||
|
|
|
@ -58,7 +58,6 @@ test: alter_database_propagation
|
|||
|
||||
test: citus_shards
|
||||
|
||||
|
||||
# ----------
|
||||
# multi_citus_tools tests utility functions written for citus tools
|
||||
# ----------
|
||||
|
|
Loading…
Reference in New Issue