From 1b39051aefdf2fb0db49e91cbeab463856162c3a Mon Sep 17 00:00:00 2001 From: Ahmet Gedemenli Date: Tue, 24 May 2022 17:54:09 +0300 Subject: [PATCH] Move supported obj check --- src/backend/distributed/metadata/distobject.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/backend/distributed/metadata/distobject.c b/src/backend/distributed/metadata/distobject.c index cd6ededdd..615efd28d 100644 --- a/src/backend/distributed/metadata/distobject.c +++ b/src/backend/distributed/metadata/distobject.c @@ -241,13 +241,8 @@ ShouldMarkRelationDistributed(Oid relationId) ObjectAddress relationAddress = { 0 }; ObjectAddressSet(relationAddress, RelationRelationId, relationId); - /* check if the relation itself is supported or not */ - if (!SupportedDependencyByCitus(&relationAddress)) - { - return false; - } - bool pgObject = (relationId < FirstNormalObjectId); + bool isObjectSupported = SupportedDependencyByCitus(&relationAddress); bool ownedByExtension = IsTableOwnedByExtension(relationId); bool alreadyDistributed = IsObjectDistributed(&relationAddress); bool hasUnsupportedDependency = @@ -262,7 +257,7 @@ ShouldMarkRelationDistributed(Oid relationId) * hasUnsupportedDependency: Citus doesn't know how to distribute its dependencies * hasCircularDependency: Citus cannot handle circular dependencies */ - if (pgObject || ownedByExtension || alreadyDistributed || + if (pgObject || !isObjectSupported || ownedByExtension || alreadyDistributed || hasUnsupportedDependency || hasCircularDependency) { return false;