0

Postgres-XL not working as expected.

I have configured a Postgres-XL cluster as below:

GTM running on node3 GMT_Proxy running on node2 and node1 Co-ordinators and datanodes running on node2 and node1.

When I try to do any operation connecting to the database directly, I get the below error which is expected anyway.

postgres=# create table test(eno integer);
ERROR:  cannot execute CREATE TABLE in a read-only transaction

But when I login via the co-ordinator, it says the below error:

postgres=# \l+
ERROR:  Could not begin transaction on data node.

In the postresql.log, I can see the below errors. any idea what to be done?

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))

Ant idea for this?

Purvik Dhorajiya
  • 4,662
  • 3
  • 34
  • 43
karthick
  • 11
  • 1

2 Answers2

1

I have managed to fix my issue:

1) Used the source from the git repository, XL9_5_STABLE branch ( https://git.postgresql.org/gitweb/?p=postgres-xl.git;a=summary). The source tarball they provide at http://www.postgres-xl.org/download/ did not work for me

2) Used pgxc_ctl as mentioned above. I was getting Could not obtain a transaction ID from GTM because of the fact that when adding the gtm I was using localhost instead of the ip.

add gtm master gtm localhost 20001 $dataDirRoot/gtm

instead of

add gtm master gtm 10.222.1.49 20001 $dataDirRoot/gtm

Vao Tsun
  • 47,234
  • 13
  • 100
  • 132
John H
  • 11
  • 1
1

Seems like you haven't really configured pgxc_ctl well. Just type in

prepare config minimal

in pgxc_ctl command line which will generate you a general pgxc_ctl.conf file that you can modify accordingly.

And you can follow the official postgres XL documentation to add nodes from the pgxc_ctl command line as John H suggested.

Pragun
  • 1,123
  • 8
  • 20