Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix drop database issue after MVU to PG17 (#474)
After performing MVU to PG17, we weren't able to drop the existing database because a new dependency was getting added between the dbo system role and physical babelfish database. This dependency is getting introduced when running the TSQL upgrade script babelfishpg_tsql--3.4.0--4.0.0.sql, which grants permissions to the bbf_role_admin role. The new dependency is expected and is a result of a community change 514a3de. However, even though there is a function RemoveRoleFromInitPriv() to clean up these dependencies when executing DROP OWNED BY commands, it is not working correctly for system roles. This is because the function assumes the grantor of rights is always the same as the owner, which is not the case for system roles, where the grantor should be sysadmin. This commit made changes to use sysadmin as grantor when generating ACLs for physical babelfish database while removing role from initial privileges. Related Task: BABEL-5410 Signed-off-by: Sumit Jaiswal [email protected]
- Loading branch information