diff --git a/src/backend/distributed/metadata/node_metadata.c b/src/backend/distributed/metadata/node_metadata.c index f9ab89522..848990332 100644 --- a/src/backend/distributed/metadata/node_metadata.c +++ b/src/backend/distributed/metadata/node_metadata.c @@ -746,17 +746,17 @@ SyncObjectDependenciesCommandList(WorkerNode *workerNode) { List *commandList = NIL; + /* + * Propagate node wide objects. It includes only roles for now. + */ + commandList = list_concat(commandList, PropagateNodeWideObjectsCommandList()); + /* * Detach partitions and remove shell tables first. */ commandList = list_concat(commandList, DetachPartitionCommandList()); commandList = lappend(commandList, REMOVE_ALL_SHELL_TABLES_COMMAND); - /* - * Propagate node wide objects. It includes only roles for now. - */ - commandList = list_concat(commandList, PropagateNodeWideObjectsCommandList()); - /* * Replicate all objects of the pg_dist_object to the remote node. */