diff --git a/src/backend/distributed/connection/placement_connection.c b/src/backend/distributed/connection/placement_connection.c index 2a6f59683..f92a93831 100644 --- a/src/backend/distributed/connection/placement_connection.c +++ b/src/backend/distributed/connection/placement_connection.c @@ -593,11 +593,12 @@ FindPlacementListConnection(int flags, List *placementAccessList, const char *us } } else if (accessType == PLACEMENT_ACCESS_SELECT && - placementEntry->hasSecondaryConnections) + placementEntry->hasSecondaryConnections && + !placementConnection->hadDDL && !placementConnection->hadDML) { /* - * Two separate connections have already selected from this placements. - * There is no benefit to using this connection. + * Two separate connections have already selected from this placement + * and it was not modified. There is no benefit to using this connection. */ } else if (CanUseExistingConnection(flags, userName, placementConnection))