mirror of https://github.com/citusdata/citus.git
Check the relation itself, if no fkey is found
parent
7e8185b3ce
commit
8f5bc36b38
|
|
@ -153,6 +153,13 @@ ShouldUndistributeCitusLocalTable(Oid relationId)
|
||||||
InvalidateForeignKeyGraph();
|
InvalidateForeignKeyGraph();
|
||||||
|
|
||||||
List *fkeyConnectedRelations = GetForeignKeyConnectedRelationIdList(relationId);
|
List *fkeyConnectedRelations = GetForeignKeyConnectedRelationIdList(relationId);
|
||||||
|
|
||||||
|
if (fkeyConnectedRelations == NIL)
|
||||||
|
{
|
||||||
|
/* if no fkey connection is found, we should only check the relation itself */
|
||||||
|
fkeyConnectedRelations = lappend_oid(fkeyConnectedRelations, relationId);
|
||||||
|
}
|
||||||
|
|
||||||
Oid relationOid = InvalidOid;
|
Oid relationOid = InvalidOid;
|
||||||
foreach_oid(relationOid, fkeyConnectedRelations)
|
foreach_oid(relationOid, fkeyConnectedRelations)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue