From 28e5bf7f6778e4eb19a4330180102d5481f024d8 Mon Sep 17 00:00:00 2001 From: gurkanindibay Date: Fri, 9 Feb 2024 12:04:58 +0300 Subject: [PATCH] Adds grantor into metadata_sync --- src/backend/distributed/commands/role.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backend/distributed/commands/role.c b/src/backend/distributed/commands/role.c index 20f21902e..662560ee5 100644 --- a/src/backend/distributed/commands/role.c +++ b/src/backend/distributed/commands/role.c @@ -901,7 +901,11 @@ GenerateGrantRoleStmtsOfRole(Oid roleid) granteeRole->rolename = GetUserNameFromId(membership->member, true); grantRoleStmt->grantee_roles = list_make1(granteeRole); - grantRoleStmt->grantor = NULL; + RoleSpec *grantorRole = makeNode(RoleSpec); + grantorRole->roletype = ROLESPEC_CSTRING; + grantorRole->location = -1; + grantorRole->rolename = GetUserNameFromId(membership->grantor, true); + grantRoleStmt->grantor = grantorRole; #if PG_VERSION_NUM >= PG_VERSION_16