From: seikath <se...@gm...> - 2013-03-26 14:16:53
|
Hello all, I have an XC setup of 4 AWS instances: ============================= instance: prod-xc-coord1 coordinator config at prod-xc-coord1 listen_addresses = '*' port = 5432 max_connections = 100 shared_buffers = 120MB max_prepared_transactions = 100 datestyle = 'iso, mdy' lc_messages = 'en_US.UTF-8' lc_monetary = 'en_US.UTF-8' lc_numeric = 'en_US.UTF-8' lc_time = 'en_US.UTF-8' default_text_search_config = 'pg_catalog.english' pooler_port = 6667 min_pool_size = 1 max_pool_size = 100 max_coordinators = 16 max_datanodes = 16 gtm_host = '10.196.154.85' gtm_port = 6543 pgxc_node_name = 'coord1' enforce_two_phase_commit = on enable_fast_query_shipping = on enable_remotejoin = on enable_remotegroup = on datanode config at prod-xc-coord1 listen_addresses = '*' port = 6543 max_connections = 100 shared_buffers = 320MB max_prepared_transactions = 100 datestyle = 'iso, mdy' lc_messages = 'en_US.UTF-8' lc_monetary = 'en_US.UTF-8' lc_numeric = 'en_US.UTF-8' lc_time = 'en_US.UTF-8' default_text_search_config = 'pg_catalog.english' max_coordinators = 16 max_datanodes = 16 gtm_host = '10.196.154.85' gtm_port = 6543 pgxc_node_name = 'datanode1' enforce_two_phase_commit = on enable_fast_query_shipping = on enable_remotejoin = on enable_remotegroup = on ============================= instance : prod-xc-coord2 coordinator config at prod-xc-coord2 listen_addresses = '*' port = 5432 max_connections = 100 superuser_reserved_connections = 3 shared_buffers = 120MB max_prepared_transactions = 100 datestyle = 'iso, mdy' lc_messages = 'en_US.UTF-8' lc_monetary = 'en_US.UTF-8' lc_numeric = 'en_US.UTF-8' lc_time = 'en_US.UTF-8' default_text_search_config = 'pg_catalog.english' pooler_port = 6667 min_pool_size = 1 max_pool_size = 100 max_coordinators = 16 max_datanodes = 16 gtm_host = '10.196.154.85' gtm_port = 6543 pgxc_node_name = 'coord2' enforce_two_phase_commit = on enable_fast_query_shipping = on enable_remotejoin = on enable_remotegroup = on datanode config at prod-xc-coord2 listen_addresses = '*' port = 6543 max_connections = 100 shared_buffers = 320MB max_prepared_transactions = 100 datestyle = 'iso, mdy' lc_messages = 'en_US.UTF-8' lc_monetary = 'en_US.UTF-8' lc_numeric = 'en_US.UTF-8' lc_time = 'en_US.UTF-8' default_text_search_config = 'pg_catalog.english' max_coordinators = 16 max_datanodes = 16 gtm_host = '10.196.154.85' gtm_port = 6543 pgxc_node_name = 'datanode2' enforce_two_phase_commit = on enable_fast_query_shipping = on enable_remotejoin = on enable_remotegroup = on ============================= instance prod-xc-gtm-proxy : IP 10.196.154.85 proxy config: nodename = 'one' listen_addresses = '*' port = 6543 gtm_host = '10.244.158.120' gtm_port = 5432 ============================= instance prod-xc-gtm : IP 10.244.158.120 gtm config nodename = 'one' listen_addresses = '*' port = 5432 ============================= the pg_hba,conf of both coordinator and data nodes at both prod-xc-coord1 and prod-xc-coord2 allows the other node to connect: ================================================= pg_hba,conf at prod-xc-coord01 IP 10.245.114.8 local all all trust host all all 127.0.0.1/32 trust host all all ::1/128 trust host all all 10.101.51.38/32 trust pg_hba,conf at prod-xc-coord02 IP 10.101.51.38 local all all trust host all all 127.0.0.1/32 trust host all all ::1/128 trust host all all 10.245.114.8/32 trust the connectivity is tested and confirmed. ================================================= initial nodes setup: prod-xc-coord01 postgres=# select * from pgxc_node; node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id -----------+-----------+-----------+--------------+----------------+------------------+------------ coord1 | C | 5432 | localhost | f | f | 1885696643 datanode1 | D | 6543 | localhost | t | t | 888802358 datanode2 | D | 6543 | 10.101.51.38 | f | f | -905831925 prod-xc-coord02 postgres=# select * from pgxc_node; node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id -----------+-----------+-----------+--------------+----------------+------------------+------------- coord2 | C | 5432 | localhost | f | f | -1197102633 datanode1 | D | 6543 | 10.245.114.8 | t | f | 888802358 datanode2 | D | 6543 | localhost | f | t | -905831925 after that setup I was able to create tabases from the both coordinator nodes, but each coordinator does not see the database created by the other coordinator. then tested and the node setup with one only primary node: prod-xc-coord02 postgres=# alter node datanode1 with (type = 'datanode', host = '10.245.114.8', port = 6543, primary=false,preferred=false); ALTER NODE postgres=# select pgxc_pool_reload(); pgxc_pool_reload ------------------ t (1 row) postgres=# select * from pgxc_node; node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id -----------+-----------+-----------+--------------+----------------+------------------+------------- coord2 | C | 5432 | localhost | f | f | -1197102633 datanode2 | D | 6543 | localhost | f | t | -905831925 datanode1 | D | 6543 | 10.245.114.8 | f | f | 888802358 (3 rows) the result is the same. I know I am missing something simple as a config or open port, but at the moment I cant figure out whats missing in the setup. In general our plan is to use loadbalancer in frond of several instances hosting one coordinator and one datanode. I apologize for the ugly paste, but I am not sure if that mail list support html formatting. Kind regards, Ivan |