diff --git a/src/backend/distributed/commands/role.c b/src/backend/distributed/commands/role.c index a21099d9f..d0b33ccb9 100644 --- a/src/backend/distributed/commands/role.c +++ b/src/backend/distributed/commands/role.c @@ -901,15 +901,7 @@ GenerateGrantRoleStmtsOfRole(Oid roleid) granteeRole->rolename = GetUserNameFromId(membership->member, true); grantRoleStmt->grantee_roles = list_make1(granteeRole); - RoleSpec *grantorRole = makeNode(RoleSpec); - grantorRole->roletype = ROLESPEC_CSTRING; - grantorRole->location = -1; - grantorRole->rolename = GetUserNameFromId(membership->grantor, true); - grantRoleStmt->grantor = grantorRole; - - /*log grantor */ - /*elog(ERROR, "grantor: %s", grantorRole->rolename); */ - + grantRoleStmt->grantor = NULL; #if PG_VERSION_NUM >= PG_VERSION_16 diff --git a/src/test/regress/expected/create_role_propagation.out b/src/test/regress/expected/create_role_propagation.out index abbc64516..48310bdc3 100644 --- a/src/test/regress/expected/create_role_propagation.out +++ b/src/test/regress/expected/create_role_propagation.out @@ -224,7 +224,8 @@ SET citus.enable_create_role_propagation TO ON; SET ROLE dist_role_1; GRANT non_dist_role_1 TO non_dist_role_2; SET citus.enable_create_role_propagation TO OFF; -GRANT dist_role_1 TO dist_role_2 granted by postgres; +SET ROLE non_dist_role_1; +GRANT dist_role_1 TO dist_role_2; RESET ROLE; SET citus.enable_create_role_propagation TO ON; GRANT dist_role_3 TO non_dist_role_3;