数据仓库服务 GAUSSDB(DWS)-PG_POOLER_STATUS:应用示例

时间:2024-09-24 17:40:52

应用示例

查看pooler连接池信息:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
select database,user_name,node_name,in_use,count(*) from pg_pooler_status group by 1, 2, 3 ,4 order by 5 desc limit 50;
 database | user_name |  node_name   | in_use | count
----------+-----------+--------------+--------+-------
 mydbdemo | user3     | cn_5001      | f      |     2
 mydbdemo | user3     | dn_6005_6006 | t      |     2
 mydbdemo | user3     | dn_6001_6002 | t      |     2
 mydbdemo | user3     | dn_6003_6004 | f      |     2
 mydbdemo | user3     | dn_6003_6004 | t      |     2
 mydbdemo | user3     | dn_6005_6006 | f      |     2
 mydbdemo | user3     | dn_6001_6002 | f      |     2
 mydbdemo | user3     | cn_5002      | f      |     2
 gaussdb  | user3     | dn_6003_6004 | f      |     1
 mydbdemo | user3     | cn_5001      | t      |     1
 music    | user2     | dn_6003_6004 | f      |     1
 music    | user2     | dn_6005_6006 | f      |     1
 gaussdb  | user1     | dn_6005_6006 | f      |     1
(13 rows)
support.huaweicloud.com/devg-910-dws/dws_04_0740.html