max_connections

确定数据库服务器最大连接数的服务器参数

max_connections 是一个 配置参数,用于确定数据库服务器的最大并发连接数。

max_connectionsPostgreSQL 7.1 中添加。

默认值

max_connections 的默认值为:100

用法

在备库上,max_connections 必须设置为与主库相同或更高的值。

max_connections 的当前值是记录在 pg_control 中的 GUC 参数之一。

按 PostgreSQL 版本详细信息

max_connections (PostgreSQL 19)

设置 100
单位  
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 262143
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/19/postgresql.conf
源行 65
需要重启 false

文档max_connections

max_connections (PostgreSQL 18)

设置 100
单位  
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 262143
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/18/postgresql.conf
源行 65
需要重启 false

文档max_connections

max_connections (PostgreSQL 17)

设置 100
单位  
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 262143
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/17/postgresql.conf
源行 65
需要重启 false

文档max_connections

max_connections (PostgreSQL 16)

设置 100
单位  
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 262143
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/16/postgresql.conf
源行 65
需要重启 false

文档max_connections

max_connections (PostgreSQL 15)

设置 100
单位  
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 262143
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/15/postgresql.conf
源行 65
需要重启 false

文档max_connections

max_connections (PostgreSQL 14)

设置 100
单位  
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 262143
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/14/postgresql.conf
源行 65
需要重启 false

文档max_connections

max_connections (PostgreSQL 13)

设置 100
单位  
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 262143
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/13/postgresql.conf
源行 65
需要重启 false

文档max_connections

max_connections (PostgreSQL 12)

设置 100
单位  
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 262143
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/12/postgresql.conf
源行 65
需要重启 false

文档max_connections

max_connections (PostgreSQL 11)

设置 100
单位  
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 262143
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/11/postgresql.conf
源行 64
需要重启 false

文档max_connections

max_connections (PostgreSQL 10)

设置 100
单位  
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 262143
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/10/postgresql.conf
源行 64
需要重启 false

文档max_connections

max_connections (PostgreSQL 9.6)

设置 100
单位  
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 262143
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/96/postgresql.conf
源行 64
需要重启 false

文档max_connections

max_connections (PostgreSQL 9.5)

设置 100
单位  
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 8388607
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/95/postgresql.conf
源行 64
需要重启 false

文档max_connections

max_connections (PostgreSQL 9.4)

设置 100
单位
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 8388607
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/94/postgresql.conf
源行 64

文档max_connections

max_connections (PostgreSQL 9.3)

设置 100
单位
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 8388607
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/93/postgresql.conf
源行 64

文档max_connections

max_connections (PostgreSQL 9.2)

设置 100
单位
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 8388607
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/92/postgresql.conf
源行 64

文档max_connections

max_connections (PostgreSQL 9.1)

设置 100
单位
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 8388607
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/91/postgresql.conf
源行 64

文档max_connections

max_connections (PostgreSQL 9.0)

设置 100
单位
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 536870911
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/90/postgresql.conf
源行 64

文档max_connections

max_connections (PostgreSQL 8.4)

设置 100
单位
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 536870911
枚举值  
启动值 100
重置值 100
源文件 /home/barwick/devel/postgres/data/84/postgresql.conf
源行 64

文档max_connections

max_connections (PostgreSQL 8.3)

设置  
单位
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 536870911

文档max_connections

max_connections (PostgreSQL 8.2)

设置  
单位
类别 连接和身份验证 / 连接设置
简短描述 设置最大并发连接数。
扩展描述  
上下文 postmaster
变量类型 整数
来源 配置文件
最小值 1
最大值 536870911

文档max_connections

变更历史

分类

连接管理, 关键备库配置项, GUC 配置项

另请参阅

superuser_reserved_connections, reserved_connections

反馈

提交关于“max_connections”的任何评论、建议或更正,请点击 这里