热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Greenplum数据库修改默认的最大连接数问题

一、最大连接数的查看gpconfig-smax_connections二、官方文档说明要修改最大连接数max_connections的值前,先查看官方文档的介绍
一、最大连接数的查看

gpconfig -s max_connections
二、官方文档说明

要修改最大连接数max_connections的值前,先查看官方文档的介绍:

  • max_connections

官方参数说明:https://gpdb.docs.pivotal.io/6-8/ref_guide/config_params/guc-list.html#max_connections

In a Greenplum Database system, user client connections go through the Greenplum master instance only. Segment instances should allow 5-10 times the amount as the master. When you increase this parameter,  max_prepared_transactions must be increased as well. 

Value RangeDefaultSet Classifications
10 - 8388607250 on master

750 on segments

local

system

restart


  • max_prepared_transactions

官方参数说明:https://gpdb.docs.pivotal.io/6-8/ref_guide/config_params/guc-list.html#max_prepared_transactions

Sets the maximum number of transactions that can be in the prepared state simultaneously. Greenplum uses prepared transactions internally to ensure data integrity across the segments. This value must be at least as large as the value of max_connections on the master. Segment instances should be set to the same value as the master.

Value RangeDefaultSet Classifications
integer250 on master

250 on segments

local

system

restart


四、最大连接数的修改

官方要求修改max_connections的同时,同步修改max_prepared_transactions,为此 :

(1)修改命令为:

gpconfig -c max_connections -v 1500 -m 500
gpconfig -c max_prepared_transactions -v 500

(2)修改完参数后记得重启数据库生效

gpstop -M fast
gpstart

或者:

gpstop -u

(3)最后谨慎的检测下参数是否成功修改:

[gpadmin@mdw ~]$ gpconfig -s max_connections
Values on all segments are consistent
GUC : max_connections
Master value: 500
Segment value: 1500
[gpadmin@mdw ~]$ gpconfig -s max_prepared_transactions
Values on all segments are consistent
GUC : max_prepared_transactions
Master value: 500
Segment value: 500
[gpadmin@mdw ~]$

 


推荐阅读
author-avatar
昵称这种东西真的好难取好吗
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有