Use FinishConnectionListEstablishment() instead of manually iterating.

pull/1104/head
Andres Freund 2017-01-06 09:16:01 -08:00
parent d256f3fca9
commit 6291998ae1
1 changed files with 1 additions and 7 deletions

View File

@ -44,7 +44,6 @@ OpenTransactionsToAllShardPlacements(List *shardIntervalList, char *userName)
{
ListCell *shardIntervalCell = NULL;
List *newConnectionList = NIL;
ListCell *connectionCell = NULL;
if (shardConnectionHash == NULL)
{
@ -121,12 +120,7 @@ OpenTransactionsToAllShardPlacements(List *shardIntervalList, char *userName)
}
/* finish connection establishment newly opened connections */
foreach(connectionCell, newConnectionList)
{
MultiConnection *connection = (MultiConnection *) lfirst(connectionCell);
FinishConnectionEstablishment(connection);
}
FinishConnectionListEstablishment(newConnectionList);
/* the special BARE mode (for e.g. VACUUM/ANALYZE) skips BEGIN */
if (MultiShardCommitProtocol > COMMIT_PROTOCOL_BARE)