postgresql查看数据库连接数

2015-11-21 02:03:38 · 作者: · 浏览: 7

查看所有连接的用户:

select * from pg_stat_activity;

查看连接总数:

select count(*) from pg_stat_activity;