當前總共正在使用的連接數
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= 數量