在单个节点上,搭建XL环境,一个GTM节点,一个Coordinator节点,两个Datanode节点。
使用pgxc_ctl配置集群节点,pgxc_ctl.conf主要配置如下:
gtmMasterServer=192.168.30.203
gtmMasterPort=20001
gtmMasterDir=$HOME/pg-xl/nodes/gtm
coordMasterDir=$HOME/pg-xl/nodes/coord
coordSlaveDir=$HOME/pg-xl/nodes/coord_slave
coordArchLogDir=$HOME/pg-xl/nodes/coord_archlog
coordNames=(coord1) # Master and slave use the same name
coordPorts=(25432) # Master ports
poolerPorts=(20010) # Master pooler ports
coordPgHbaEntries=(192.168.30.0/24)
coordMasterServers=(192.168.30.203) # none means this master is not available
coordMasterDirs=($coordMasterDir/coord1)
coordMaxWALsernder=0 # max_wal_senders: needed to configure slave. If zero value is specified,
# it is expected to supply this parameter explicitly by external files
# specified in the following. If you dont configure slaves, leave this value to zero.
coordMaxWALSenders=($coordMaxWALsernder)
# max_wal_senders configuration for each coordinator.
使用pgxc_ctl init all初始化集群,输出信息中错误如下:
ALTER NODE coord1 WITH (HOST='192.168.30.203', PORT=25432);
ALTER NODE
CREATE NODE datanode1 WITH (TYPE='datanode', HOST='192.168.30.203', PORT=15432, PREFERRED);
CREATE NODE
CREATE NODE datanode2 WITH (TYPE='datanode', HOST='192.168.30.203', PORT=15433, PREFERRED);
CREATE NODE
SELECT pgxc_pool_reload();
pgxc_pool_reload
t
(1 row)
Done.
EXECUTE DIRECT ON (datanode1) 'CREATE NODE coord1 WITH (TYPE=''coordinator'', HOST=''192.168.30.203'', PORT=25432)';
ERROR: invalid byte sequence for encoding "UTF8": 0xcb
EXECUTE DIRECT ON (datanode1) 'ALTER NODE datanode1 WITH (TYPE=''datanode'', HOST=''192.168.30.203'', PORT=15432, PREFERRED)';
ERROR: invalid byte sequence for encoding "UTF8": 0xcb
EXECUTE DIRECT ON (datanode1) 'CREATE NODE datanode2 WITH (TYPE=''datanode'', HOST=''192.168.30.203'', PORT=15433, PREFERRED)';
ERROR: invalid byte sequence for encoding "UTF8": 0xcb
EXECUTE DIRECT ON (datanode1) 'SELECT pgxc_pool_reload()';
ERROR: Could not begin transaction on data node.
EXECUTE DIRECT ON (datanode2) 'CREATE NODE coord1 WITH (TYPE=''coordinator'', HOST=''192.168.30.203'', PORT=25432)';
ERROR: invalid byte sequence for encoding "UTF8": 0xcb
EXECUTE DIRECT ON (datanode2) 'CREATE NODE datanode1 WITH (TYPE=''datanode'', HOST=''192.168.30.203'', PORT=15432, PREFERRED)';
ERROR: invalid byte sequence for encoding "UTF8": 0xcb
EXECUTE DIRECT ON (datanode2) 'ALTER NODE datanode2 WITH (TYPE=''datanode'', HOST=''192.168.30.203'', PORT=15433, PREFERRED)';
ERROR: invalid byte sequence for encoding "UTF8": 0xcb
EXECUTE DIRECT ON (datanode2) 'SELECT pgxc_pool_reload()';
ERROR: Could not begin transaction on data node.
Done.
最开始,尝试删除XL的安装目录pg-xl,重新安装,解决过问题。但后面再碰到这个问题,重装也无效了。
请教云栖社区的PGer指点一二!谢谢!
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。