linux下postgresql的连接数配置

1、查询当前连接数:

select count(*) from pg_stat_activity;

 2、查询最大连接数

show max_connections;

3、修改最大连接数

SHOW config_file:查看postgresql.conf配置文件位置

然后修改配置文件中max_connections=1024

4、重启服务

service postgresql restart

或者:pg_ctl restart

原文地址:https://www.cnblogs.com/tiandi/p/9859418.html