greenplum 数据库的max_connections 参数疑惑

滴水穿石 2011-10-03 03:59:11
我的gp数据库配置如下

gmaster 安装master 节点


gseg1 安装2个instance

gseg2 安装2个instance


简单说就是1个主机节点,4个segment,没有配置mirror


当设置

GUC : max_connections
Master value: 10
Segment value: 100


只允许3个客户端连接(我在每个SecureCRT上打开一个psql 进行连接)


GUC : max_connections
Master value: 11
Segment value: 110

只允许4个客户端连接(我在每个SecureCRT上打开一个psql 进行连接)


当设置

Master value: 11
Segment value: 110

我用如下命令得到的结果是

[gpadmin@gmaster gpseg-1]$ ps -ef | grep post
gpadmin 4172 1 0 15:39 ? 00:00:00 /usr/local/greenplum-db-4.1.1.1/bin/postgres -D /data/master/gpseg-1 -E -i -M master -p 5432 -b 1 -x 0 -C -1 -z 4 --silent-mode=true
gpadmin 4173 4172 0 15:39 ? 00:00:00 postgres: port 5432, master logger process
gpadmin 4176 4172 0 15:39 ? 00:00:00 postgres: port 5432, stats collector process
gpadmin 4177 4172 0 15:39 ? 00:00:00 postgres: port 5432, writer process
gpadmin 4178 4172 0 15:39 ? 00:00:00 postgres: port 5432, checkpoint process
gpadmin 4179 4172 0 15:39 ? 00:00:00 postgres: port 5432, seqserver process
gpadmin 4180 4172 0 15:39 ? 00:00:00 postgres: port 5432, WAL Send Server process
gpadmin 4181 4172 0 15:39 ? 00:00:00 postgres: port 5432, ftsprobe process
gpadmin 4182 4172 0 15:39 ? 00:00:00 postgres: port 5432, sweeper process
gpadmin 4203 4172 0 15:39 ? 00:00:00 postgres: port 5432, dba1 postgres 136.5.66.45(18678) con8 136.5.66.45(18678) idle
gpadmin 4207 4172 0 15:39 ? 00:00:00 postgres: port 5432, web1 postgres 136.5.66.45(18680) con9 136.5.66.45(18680) idle
gpadmin 4211 4172 0 15:39 ? 00:00:00 postgres: port 5432, web2 postgres 136.5.66.45(18682) con10 136.5.66.45(18682) idle
gpadmin 4214 4172 0 15:40 ? 00:00:00 postgres: port 5432, web2 postgres 136.5.66.45(18684) con11 136.5.66.45(18684) idle



我就搞不懂,明明我设置的max_connections 为 11 为什么只能连接4个客户端,如果内部要占用连接,我数了一下上面有12个进程。这个是怎回事呀。


希望得到解答。
...全文
427 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
滴水穿石 2011-10-19
  • 打赏
  • 举报
回复
我只是测试,看看这个参数的具体作用。
lmx66768 2011-10-13
  • 打赏
  • 举报
回复
默认最大连接应该是25个。

连接不上应该是其他问题,没有报错吗?
滴水穿石 2011-10-13
  • 打赏
  • 举报
回复
我装的是4.1.1 为了测试,我自己改的参数。
zhuxu1234 2011-10-11
  • 打赏
  • 举报
回复
你装的是什么版本的gp?我记得4.0的默认最大连接数是50啊

7,394

社区成员

发帖
与我相关
我的任务
社区描述
其他数据库开发 数据仓库
社区管理员
  • 数据仓库
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧