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); dropQuery->data);
/* remove the shard from the node */ /* remove the shard from the node */
MultiConnection *connection = GetLocalConnectionForSubtransactionAsUser( int connectionFlags = OUTSIDE_TRANSACTION;
CitusExtensionOwnerName()); MultiConnection *workerConnection = GetNodeUserDatabaseConnection(connectionFlags,
nodeName, nodePort,
CurrentUserName(),
NULL);
workerConnection->forceCloseAtTransactionEnd = true;
bool success = SendOptionalCommandListToWorkerOutsideTransactionWithConnection( bool success = SendOptionalCommandListToWorkerOutsideTransactionWithConnection(
connection, workerConnection,
dropCommandList); dropCommandList);
return success; return success;