Set application_name to citus_rebalancer when copying reference tables

release-11.0-gokhan
Marco Slot 2022-08-23 23:11:15 +02:00 committed by Marco Slot
parent dbfdaca0f0
commit 9dc6273b88
1 changed files with 10 additions and 0 deletions

View File

@ -244,6 +244,16 @@ EnsureReferenceTablesExistOnAllNodesExtended(char transferMode)
CopyShardPlacementToWorkerNodeQuery(sourceShardPlacement,
newWorkerNode,
transferMode);
/*
* The placement copy command uses distributed execution to create
* indexes. This is allowed when indicating that the backend is a
* rebalancer backend.
*/
ExecuteCriticalRemoteCommand(connection,
"SET LOCAL application_name TO "
CITUS_REBALANCER_NAME);
ExecuteCriticalRemoteCommand(connection, placementCopyCommand->data);
RemoteTransactionCommit(connection);
}