如何调整PostgreSQL的连接数?
- By : Will
- Category : PostgreSQL
PostgreSQL
1 前言
一个问题,一篇文章,一出故事。
最近有用户反馈遇到如下错误,
[2026-02-02 15:12:26] [53300] FATAL: remaining connection slots are reserved for non-replication superuser connections
从以上分析,猜测是用户的连接数没有正确释放或者其他原因用完了,于是想着调整下连接的数量。
2 最佳实践
2.1 测试环境
2.2 调整步骤
2.2.1 修改参数
vim /etc/pgsql/postgresql.conf
修改如下配置,
max_connections = 200
2.2.2 重启服务使配置生效
systemctl restart postgresql systemctl status postgresql
没有评论