mirror of https://github.com/citusdata/citus.git
parent
a30b9b93a4
commit
e6e5f63d9d
|
@ -188,6 +188,18 @@ multi_ProcessUtility(Node *parsetree,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!CitusHasBeenLoaded())
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Ensure that utility commands do not behave any differently until CREATE
|
||||||
|
* EXTENSION is invoked.
|
||||||
|
*/
|
||||||
|
standard_ProcessUtility(parsetree, queryString, context,
|
||||||
|
params, dest, completionTag);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TRANSMIT used to be separate command, but to avoid patching the grammar
|
* TRANSMIT used to be separate command, but to avoid patching the grammar
|
||||||
* it's no overlaid onto COPY, but with FORMAT = 'transmit' instead of the
|
* it's no overlaid onto COPY, but with FORMAT = 'transmit' instead of the
|
||||||
|
@ -301,7 +313,7 @@ multi_ProcessUtility(Node *parsetree,
|
||||||
* AlterTableMoveAllStmt. At the moment we do not support this functionality in
|
* AlterTableMoveAllStmt. At the moment we do not support this functionality in
|
||||||
* the distributed environment. We warn out here.
|
* the distributed environment. We warn out here.
|
||||||
*/
|
*/
|
||||||
if (IsA(parsetree, AlterTableMoveAllStmt) && CitusHasBeenLoaded())
|
if (IsA(parsetree, AlterTableMoveAllStmt))
|
||||||
{
|
{
|
||||||
ereport(WARNING, (errmsg("not propagating ALTER TABLE ALL IN TABLESPACE "
|
ereport(WARNING, (errmsg("not propagating ALTER TABLE ALL IN TABLESPACE "
|
||||||
"commands to worker nodes"),
|
"commands to worker nodes"),
|
||||||
|
@ -339,14 +351,8 @@ multi_ProcessUtility(Node *parsetree,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* inform the user about potential caveats */
|
||||||
* Inform the user about potential caveats.
|
if (IsA(parsetree, CreatedbStmt))
|
||||||
*
|
|
||||||
* To prevent failures in aborted transactions, CitusHasBeenLoaded() needs
|
|
||||||
* to be the second condition. See RelationIdGetRelation() which is called
|
|
||||||
* by CitusHasBeenLoaded().
|
|
||||||
*/
|
|
||||||
if (IsA(parsetree, CreatedbStmt) && CitusHasBeenLoaded())
|
|
||||||
{
|
{
|
||||||
ereport(NOTICE, (errmsg("Citus partially supports CREATE DATABASE for "
|
ereport(NOTICE, (errmsg("Citus partially supports CREATE DATABASE for "
|
||||||
"distributed databases"),
|
"distributed databases"),
|
||||||
|
@ -355,7 +361,7 @@ multi_ProcessUtility(Node *parsetree,
|
||||||
errhint("You can manually create a database and its "
|
errhint("You can manually create a database and its "
|
||||||
"extensions on workers.")));
|
"extensions on workers.")));
|
||||||
}
|
}
|
||||||
else if (IsA(parsetree, CreateRoleStmt) && CitusHasBeenLoaded())
|
else if (IsA(parsetree, CreateRoleStmt))
|
||||||
{
|
{
|
||||||
ereport(NOTICE, (errmsg("not propagating CREATE ROLE/USER commands to worker"
|
ereport(NOTICE, (errmsg("not propagating CREATE ROLE/USER commands to worker"
|
||||||
" nodes"),
|
" nodes"),
|
||||||
|
|
Loading…
Reference in New Issue