Postgres-XL没有按预期工作。
我配置了一个Postgres-XL集群,如下所示:
在node3上运行,GMT_Proxy运行在node2和node1上,协调器和数据节点运行在node2和node1上。
当我尝试做任何直接连接到数据库的操作时,我会得到以下错误,这是预期的。
postgres=# create table test(eno integer);
ERROR: cannot execute CREATE TABLE in a read-only transaction但是当我通过协调器登录时,上面写着以下错误:
postgres=# \l+
ERROR: Could not begin transaction on data node.在postresql.log中,我可以看到以下错误。知道该怎么做吗?
2016-06-26 20:20:29.786 AEST,"postgres","postgres",3880,"192.168.87.130:45479",576fabb5.f28,1,"SET",2016-06-26 20:17:25 AEST,2/31,0,ERROR,22023,"node ""coord1_3878"" does not exist",,,,,,"SET global_session TO coord1_3878;SET parentPGXCPid TO 3878;",,,"pgxc"
2016-06-26 20:20:47.180 AEST,"postgres","postgres",3895,"192.168.87.131:45802",576fac7d.f37,1,"SELECT",2016-06-26 20:20:45 AEST,3/19,0,LOG,00000,"No nodes altered. Returning",,,,,,"SELECT pgxc_pool_reload();",,,"psql"
2016-06-26 20:21:12.147 AEST,"postgres","postgres",3897,"192.168.87.131:45807",576fac98.f39,1,"SET",2016-06-26 20:21:12 AEST,3/22,0,ERROR,22023,"node ""coord1_3741"" does not exist",,,,,,"SET global_session TO coord1_3741;SET parentPGXCPid TO 3741;",,,"pgxc"
PostresXL version - 9.5 r1.1
psql (PGXL 9.5r1.1, based on PG 9.5.3 (Postgres-XL 9.5r1.1))这是蚂蚁的主意?
发布于 2016-07-18 14:44:14
我设法解决了我的问题:
1)使用git存储库XL9_5_STABLE分支( https://git.postgresql.org/gitweb/?p=postgres-xl.git;a=summary)的源代码。他们在http://www.postgres-xl.org/download/提供的源tarball并不适用于我。
2)使用了上述pgxc_ctl。我无法从GTM获得事务ID,因为在添加gtm时,我使用的是localhost而不是ip。
添加gtm主gtm localhost 20001 $dataDirRoot/gtm
而不是
添加gtm主机gtm 10.222.1.49 20001美元dataDirRoot/gtm
发布于 2016-10-06 05:24:50
似乎您还没有很好地配置pgxc_ctl。只需输入
prepare config minimal在pgxc_ctl命令行中,它将生成一个通用pgxc_ctl.conf文件,您可以相应地修改该文件。
您可以按照官方postgres文档从pgxc_ctl命令行添加节点,就像John H建议的那样。
https://stackoverflow.com/questions/38037716
复制相似问题