赞
踩
27.2.3.
pg_stat_activity
The
pg_stat_activity
view will have one row per server process, showing information related to the current activity of that process.pg_stat_activity 视图将为每个服务器进程显示一行,显示与该进程当前活动相关的信息。
官方文档引用地址:
PostgreSQL: Documentation: 13: 27.2. The Statistics Collector
show max_connections;
select count(*) as connect_sum, usename from pg_stat_activity group by usename order by connect_sum DESC;
select pg_terminate_backend(pid) from pg_stat_activity where usename='kill-name';
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。