This article is half-done without your Comment! *** Please share your thoughts via Comment ***
In this post, I am sharing a script to find Greenplum user role information with their associated Resource Queue. You can also find other details like type of user and its validity.
We can also use this script to prepare an audit on a list of available users/roles of Greenplum.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
SELECT rolname as RoleName ,case when rolsuper = 't' then 'SUPERUSER' else 'NORMAL' end as SuperUser ,case when rolcanlogin = 't' then 'LOGIN' else 'GROUP' end as RoleType ,rolvaliduntil as RoleValidUntill ,rsqname as RQName FROM pg_roles, gp_toolkit.gp_resqueue_status WHERE pg_roles.rolresqueue=gp_toolkit.gp_resqueue_status.queueid order by rolname; |
Leave a Reply