Merge pull request #2157 from citusdata/fix_router_select

Throw an error if placements cannot be found in router executor
pull/2142/head
Hadi Moshayedi 2018-05-08 23:04:45 -04:00 committed by GitHub
commit 4198ad7618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -628,6 +628,13 @@ ExecuteSingleSelectTask(CitusScanState *scanState, Task *task)
placementAccessList = list_make1(placementAccess); placementAccessList = list_make1(placementAccess);
} }
if (placementAccessList == NIL)
{
ereport(ERROR, (errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
errmsg("a placement was moved after the SELECT was "
"planned")));
}
connection = GetPlacementListConnection(connectionFlags, placementAccessList, connection = GetPlacementListConnection(connectionFlags, placementAccessList,
NULL); NULL);