mirror of https://github.com/citusdata/citus.git
Fixes worker pg_dist_object removal issue
parent
690276c516
commit
2d009d46d3
|
@ -365,6 +365,20 @@ GetUnmarkDatabaseDistributedSql(char *dbName)
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
UnmarkObjectDistributedForDropDb(const ObjectAddress *distAddress, char *dbName)
|
||||
{
|
||||
UnmarkObjectDistributed(distAddress);
|
||||
|
||||
if (EnableMetadataSync)
|
||||
{
|
||||
char *workerPgDistObjectUpdateCommand =
|
||||
GetUnmarkDatabaseDistributedSql(dbName);
|
||||
SendCommandToWorkersWithMetadata(workerPgDistObjectUpdateCommand);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
List *
|
||||
PreprocessDropDatabaseStmt(Node *node, const char *queryString,
|
||||
ProcessUtilityContext processUtilityContext)
|
||||
|
@ -394,7 +408,7 @@ PreprocessDropDatabaseStmt(Node *node, const char *queryString,
|
|||
return NIL;
|
||||
}
|
||||
|
||||
UnmarkObjectDistributed(&dbAddress);
|
||||
UnmarkObjectDistributedForDropDb(&dbAddress, stmt->dbname);
|
||||
char *unmarkDatabaseDistributedSql = GetUnmarkDatabaseDistributedSql(stmt->dbname);
|
||||
|
||||
char *dropDatabaseCommand = DeparseTreeNode(node);
|
||||
|
|
Loading…
Reference in New Issue