@zhangyy
2021-07-23T03:14:42.000000Z
字数 2154
阅读 386
greenplum系列
下载地址:https://network.pivotal.io/products/vmware-tanzu-greenplum下载:greenplum-db-6.17.0-rhel7-x86_64.rpm

上传新版本的GP 包到 gp的master节点,然后同步所有主机切换到root后执行命令:cd /home/gpadmin/ [全部节点]rpm -Uvh greenplum-db-6.17.0-rhel7-x86_64.rpm


重启一下GP 集群gpstop -agpstart -a



PgBouncer工具管理用于PostgreSQL和Greenplum数据库连接的连接池。Greenplum数据库安装包括PgBouncer连接池软件。下列主题描述了如何对Greenplum数据库设置和使用PgBouncer。有关如何把PgBouncer和PostgreSQL一起使用请见 PgBouncer网站参考:https://gp-docs-cn.github.io/docs/admin_guide/access_db/topics/pgbouncer.htmlpgbouncer的官网http://www.pgbouncer.org/下载 pgbouncer的1.14 版本pgbouncer-1.14.0.tar.gz上传到node06.flyfish.com 主机
安装 pgbounceryum install libevent*yum install gcc gcc-c++ openssl*

tar -zxvf pgbouncer-1.14.0.tar.gz./configure --prefix=/usr/local/pgbouncermakemake installmkdir /usr/local/pgbouncer/configcp -p pgbouncer.ini userlist.txt /usr/local/pgbouncer/config/




useradd pgbouncer && echo pgbouncer |passwd pgbouncer --stdinchown -R pgbouncer:pgbouncer /usr/local/pgbouncer

cd /usr/local/pgbouncer/configcp -p pgbouncer.ini pgbouncer.ini.bakvim pgbouncer.ini[databases]postgres = host=192.168.100.11 port=5432 dbname=postgres auth_user=postgresgpperfmon = host=192.168.100.11 port=5432 dbname=gpperfmon auth_user=postgrestemplate0 = host=192.168.100.11 port=5432 dbname=template0 auth_user=postgrestemplate1 = host=192.168.100.11 port=5432 dbname=template1 auth_user=postgresflyfish_db = host=192.168.100.11 port=5432 dbname=flyfish_db auth_user=postgres[pgbouncer]logfile = /usr/local/pgbouncer/pgbouncer.logpidfile = /usr/local/pgbouncer/pgbouncer.pidlisten_addr = 0.0.0.0listen_port = 6432auth_type = trustauth_file = /usr/local/pgbouncer/config/userlist.txt



cp -p userlist.txt userlist.txt.bakvim userlist.txt"flyfish" "flyfish123""postgres" "postgres123"这两个账号前提是在greenplum 的数据库当中有授权create user flyfish with password 'flyfish123';create user postgres with password 'postgres123';


启动pgbouncercd /usr/local/pgbouncerbin/pgbouncer -d config/pgbouncer.ini


登录测试:psql -h 192.168.100.16 -p 6432 -U flyfishpsql -h 192.168.100.16 -p 6432 -U postgres


