mirror of https://github.com/citusdata/citus.git
Remove never assigned colocatedRelation from CreateDistributedTable (#2479)
parent
2e0860489f
commit
f19feb742c
|
@ -323,8 +323,6 @@ CreateDistributedTable(Oid relationId, Var *distributionColumn, char distributio
|
||||||
Oid colocatedTableId = InvalidOid;
|
Oid colocatedTableId = InvalidOid;
|
||||||
bool localTableEmpty = false;
|
bool localTableEmpty = false;
|
||||||
|
|
||||||
Relation colocatedRelation = NULL;
|
|
||||||
|
|
||||||
replicationModel = AppropriateReplicationModel(distributionMethod, viaDeprecatedAPI);
|
replicationModel = AppropriateReplicationModel(distributionMethod, viaDeprecatedAPI);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -358,13 +356,7 @@ CreateDistributedTable(Oid relationId, Var *distributionColumn, char distributio
|
||||||
*/
|
*/
|
||||||
if (viaDeprecatedAPI)
|
if (viaDeprecatedAPI)
|
||||||
{
|
{
|
||||||
/*
|
Assert(colocateWithTableName == NULL);
|
||||||
* We exit early but there is no need to close colocatedRelation. Because
|
|
||||||
* if viaDeprecatedAPI is true, we never open colocatedRelation in the first
|
|
||||||
* place.
|
|
||||||
*/
|
|
||||||
Assert(colocatedRelation == NULL);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -417,11 +409,6 @@ CreateDistributedTable(Oid relationId, Var *distributionColumn, char distributio
|
||||||
CopyLocalDataIntoShards(relationId);
|
CopyLocalDataIntoShards(relationId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (colocatedRelation != NULL)
|
|
||||||
{
|
|
||||||
relation_close(colocatedRelation, NoLock);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue