diff --git a/src/backend/distributed/commands/role.c b/src/backend/distributed/commands/role.c index 56059b35c..6e0aa0ba0 100644 --- a/src/backend/distributed/commands/role.c +++ b/src/backend/distributed/commands/role.c @@ -884,13 +884,12 @@ GenerateGrantRoleStmtsOfRole(Oid roleid) while (HeapTupleIsValid(tuple = systable_getnext(scan))) { - Form_pg_auth_members membership = (Form_pg_auth_members) GETSTRUCT(tuple); ObjectAddress *roleAddress = palloc0(sizeof(ObjectAddress)); ObjectAddressSet(*roleAddress, AuthIdRelationId, membership->grantor); - if (!IsAnyObjectDistributed(list_make1(roleAddress))){ - + if (!IsAnyObjectDistributed(list_make1(roleAddress))) + { /* we only need to propagate the grant if the grantor is distributed */ continue; }