当前总共正在使用的连接数

 select count(1) from pg_stat_activity;

显示系统允许的最大连接数

 show max_connections;

显示系统保留的用户数

 show superuser_reserved_connections ;

按照用户分组查看

select usename, count(*) from pg_stat_activity group by usename order by count(*) desc;

修改最大连接数

alter system set max_connections= 数量

相关文章:

  • 2021-10-04
  • 2021-07-29
  • 2021-10-20
  • 2021-07-06
  • 2022-12-23
  • 2021-12-07
猜你喜欢
  • 2022-01-24
  • 2022-01-10
  • 2021-10-06
  • 2021-05-06
  • 2021-09-06
  • 2021-08-10
相关资源
相似解决方案