If reference tables was read over multiple connections, do not assign connection

pull/3456/head
Marco Slot 2020-01-31 17:25:05 +01:00
parent 508b392304
commit b0fd6aa006
1 changed files with 8 additions and 1 deletions

View File

@ -592,6 +592,14 @@ FindPlacementListConnection(int flags, List *placementAccessList, const char *us
"modified over multiple connections")));
}
}
else if (accessType == PLACEMENT_ACCESS_SELECT &&
placementEntry->hasSecondaryConnections)
{
/*
* Two separate connections have already selected from this placements.
* There is no benefit to using this connection.
*/
}
else if (CanUseExistingConnection(flags, userName, placementConnection))
{
/*
@ -599,7 +607,6 @@ FindPlacementListConnection(int flags, List *placementAccessList, const char *us
*/
Assert(placementConnection != NULL);
chosenConnection = placementConnection->connection;
if (placementConnection->hadDDL || placementConnection->hadDML)