Fix connection bug

niupre-reuse-connections-for-logical-ref-fkeys
Nitish Upreti 2022-09-14 15:48:31 -07:00
parent 33a2578342
commit 96c32d571c
1 changed files with 8 additions and 3 deletions

View File

@ -756,10 +756,15 @@ TryDropShardOutsideTransaction(OperationId operationId, char *qualifiedTableName
dropQuery->data);
/* remove the shard from the node */
MultiConnection *connection = GetLocalConnectionForSubtransactionAsUser(
CitusExtensionOwnerName());
int connectionFlags = OUTSIDE_TRANSACTION;
MultiConnection *workerConnection = GetNodeUserDatabaseConnection(connectionFlags,
nodeName, nodePort,
CurrentUserName(),
NULL);
workerConnection->forceCloseAtTransactionEnd = true;
bool success = SendOptionalCommandListToWorkerOutsideTransactionWithConnection(
connection,
workerConnection,
dropCommandList);
return success;