Logo

Signup For Update

How to check postgresql connections?

Postgressql

Below sql will help you to find max connections allowed, connections used, superuser/normal reserved connections:

select max_conn,used,res_for_super,max_conn-used-res_for_super res_for_normal
from
(select count(*) used from pg_stat_activity) t1,
(select setting::int res_for_super from pg_settings where name=$$superuser_reserved_connections$$) t2,
(select setting::int max_conn from pg_settings where name=$$max_connections$$) t3

Logo

About

CodeSapient Technologies is founded by a group of young and energetic entrepreneurs focused on leveraging its customer with state of the art Technology by offering innovative, contemporary and cost-effective technology solutions.

Contact Us

E-260, 5th Floor, Industrial Area, Sector 74, Sahibzada Ajit Singh Nagar, Punjab 160055
Phone 01724607602, +918699791540