汉斯-于尔根·舍尼格:PostgreSQL中的连接管理——reserved_connections
In PostgreSQL 16, a new feature has been added: reserved_connections. What is the idea behind it? Back in the old days, DBA’s and software developers tended to work as a superuser (= postgres...
PostgreSQL 16引入了reserved_connections功能,允许为维护任务提供备用连接。max_connections设置控制总连接数,superuser_reserved_connections限制超级用户的连接数。新的reserved_connections设置允许具有pg_use_reserved_connections角色的非超级用户访问保留连接池。通过创建用户并分配角色来进行配置。增加reserved_connections限制了普通用户的可用连接数。总体而言,保留连接提供了一种在不造成严重损害的情况下进行维护的方式。
