Trong bài đăng này, tôi đang chia sẻ một tập lệnh để lấy tất cả thông tin liên quan đến Hàng đợi Tài nguyên được định cấu hình của Greenplum.
Khi chúng tôi đặt hàng đợi tài nguyên và mức độ ưu tiên của chúng, thì chúng tôi cũng nên kiểm tra cấu hình RQ thường xuyên để đạt được những thay đổi thường xuyên trong nhóm vai trò người dùng và sở thích của họ.
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; |