- 显示客户端连接数
SELECT * from pg_stat_activity
- 删除空闲连接数
SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE
state=‘idle’
- 显示设置的最大连接数
show MAX_CONNECTIONS
SELECT * from pg_stat_activity
SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE
state=‘idle’
show MAX_CONNECTIONS