mirror of https://github.com/citusdata/citus.git
Move supported obj check
parent
1e79469e9a
commit
1b39051aef
|
@ -241,13 +241,8 @@ ShouldMarkRelationDistributed(Oid relationId)
|
||||||
ObjectAddress relationAddress = { 0 };
|
ObjectAddress relationAddress = { 0 };
|
||||||
ObjectAddressSet(relationAddress, RelationRelationId, relationId);
|
ObjectAddressSet(relationAddress, RelationRelationId, relationId);
|
||||||
|
|
||||||
/* check if the relation itself is supported or not */
|
|
||||||
if (!SupportedDependencyByCitus(&relationAddress))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool pgObject = (relationId < FirstNormalObjectId);
|
bool pgObject = (relationId < FirstNormalObjectId);
|
||||||
|
bool isObjectSupported = SupportedDependencyByCitus(&relationAddress);
|
||||||
bool ownedByExtension = IsTableOwnedByExtension(relationId);
|
bool ownedByExtension = IsTableOwnedByExtension(relationId);
|
||||||
bool alreadyDistributed = IsObjectDistributed(&relationAddress);
|
bool alreadyDistributed = IsObjectDistributed(&relationAddress);
|
||||||
bool hasUnsupportedDependency =
|
bool hasUnsupportedDependency =
|
||||||
|
@ -262,7 +257,7 @@ ShouldMarkRelationDistributed(Oid relationId)
|
||||||
* hasUnsupportedDependency: Citus doesn't know how to distribute its dependencies
|
* hasUnsupportedDependency: Citus doesn't know how to distribute its dependencies
|
||||||
* hasCircularDependency: Citus cannot handle circular dependencies
|
* hasCircularDependency: Citus cannot handle circular dependencies
|
||||||
*/
|
*/
|
||||||
if (pgObject || ownedByExtension || alreadyDistributed ||
|
if (pgObject || !isObjectSupported || ownedByExtension || alreadyDistributed ||
|
||||||
hasUnsupportedDependency || hasCircularDependency)
|
hasUnsupportedDependency || hasCircularDependency)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue