单机环境搭建Postgres-XC开发测试环境(续)

昨天还有个后续步骤忘记写上, 注册节点

$ psql -p 7004 postgres
# create node coord2 with (type = 'coordinator', host = 'localhost', port = 7005);
# create node datanode1 with (type = 'datanode', host = 'localhost', port = 7006);
# create node datanode2 with (type = 'datanode', host = 'localhost', port = 7007);
# \q
$
$ psql -p 7005 postgres
# create node coord1 with (type = 'coordinator', host = 'localhost', port = 7004);
# create node datanode1 with (type = 'datanode', host = 'localhost', port = 7006);
# create node datanode2 with (type = 'datanode', host = 'localhost', port = 7007);
# \q
$

关机

首先关闭内部连接:

/usr/local/xc-pgsql/bin/psql -p 7004 -c 'CLEAN CONNECTION TO ALL FOR DATABASE postgres' postgres
/usr/local/xc-pgsql/bin/psql -p 7005 -c 'CLEAN CONNECTION TO ALL FOR DATABASE postgres' postgres

然后按照协调器、数据节点、GTM的顺序依次关闭:

/usr/local/xc-pgsql/bin/pg_ctl stop -Z coordinator -D /home/quanzl/xc/coord1
/usr/local/xc-pgsql/bin/pg_ctl stop -Z coordinator -D /home/quanzl/xc/coord2
/usr/local/xc-pgsql/bin/pg_ctl stop -Z datanode -D /home/quanzl/xc/datanode1
/usr/local/xc-pgsql/bin/pg_ctl stop -Z datanode -D /home/quanzl/xc/datanode2
/usr/local/xc-pgsql/bin/gtm_ctl stop -Z gtm -D /home/quanzl/xc/gtm


然后连接测试,遇到了“ERROR:  Failed to get pooled connections”,网上有人说是防火墙或者HBA的设置问题,我是在本地运行,并且都是以localhost连接,可以排除HBA。重新编译源代码,打开debug开关(--enable-debug),重新安装运行,查看详细的日志输出。

欲知后事如何,请听下回分解。
我还没折腾到底,一边尝试一边记录,解决不了的可能性也是很大的,请耐心等待。





转载于:https://my.oschina.net/quanzl/blog/424584

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值