postgres modify the maximum number of connections

The current total number of connections in use

 select count(1) from pg_stat_activity;

The system displays the maximum number of connections allowed

 show max_connections;

The number of users display system reserved

 show superuser_reserved_connections ;

View according to user group

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

Modify the maximum number of connections

alter system set max_connections= 数量

Guess you like

Origin www.cnblogs.com/zhangweijie01/p/12097549.html