This article is half-done without your Comment! *** Please share your thoughts via Comment ***
In this post, I am sharing a script to get all the information related to configured Resource Queues of Greenplum.
Once we set resource queues and their priorities, then also we should check RQ configuration frequently to achieve the frequent changes in user role group and their preferences.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
SELECT grs.rsqname ,grs.rsqcountlimit ,grs.rsqcountvalue ,grs.rsqcostlimit ,grs.rsqcostvalue ,grs.rsqmemorylimit ,grs.rsqmemoryvalue ,grs.rsqwaiters ,grs.rsqholders ,(select ressetting from pg_resqueue_attributes b where b.rsqname = grs.rsqname and resname='priority') as Priority ,(select ressetting from pg_resqueue_attributes b where grs.rsqname=b.rsqname and resname='cost_overcommit') as CostOvercommit ,(select count(*) from pg_resqueue x,pg_roles y where x.oid=y.rolresqueue and grs.rsqname=x.rsqname) as RQAssignedUsers ,(select count(*) from pg_resqueue x,pg_roles y where x.oid=y.rolresqueue and grs.rsqname=x.rsqname and y.rolcanlogin = 't') as RQLogUsers ,(select count(*) from pg_resqueue x,pg_roles y where x.oid=y.rolresqueue and grs.rsqname=x.rsqname and y.rolcanlogin = 'f') as RQGroupUsers FROM gp_toolkit.gp_resqueue_status grs; |
Leave a Reply