From: Michael P. <mic...@gm...> - 2010-08-16 07:00:02
|
Hi, 1) The page 5 of the install manual, I found that the > "gtm_coordinator_id=n+1" of datanode 1, and the datanode n is > "gtm_coordinator_id=2n", what is mean, it means datanode 2 > "gtm_coordinator_id=4" and datanode 3 "gtm_coordinator_id=6", right? Is the > parameter gtm_coord_id same as gtm_coordinator_id, right? > Datanode and Coordinator both communicate with GTM, so you have to set a different value of gtm_coord_id for all the components of the cluster so as to make sure that they are identified uniquely by GTM . For example, imagine that you have a cluster made with j coordinators and k datanode, the install manual advices you to set gtm_coord_id from 1 to j for coordinators, and from (j+1) to (j+k) for Datanodes. Of course nothing is imposed, so feel free to set the id of each compoenent freely. > 2) If my data node server's data_node_user have no password, then I can set > the parameter data_node_password='' or I do not need to set it, just ignore > it? > A libpq protocol is used to connect from Datanode to Coordinators, I suppose it is OK to let it empty if your user has no password. > > 3) How does DB data Synchronization work? Does it need to set up the rsync? > Data Synchronization on Datanode is SQL-based. There are two types of tables that you can set: replicated and distributed. If you send to Coordinator a SQL query so as to update a tuple of a replicated table, the same SQL will be sent to all the Datanodes. If you update a tuple of a distributed table, the SQL will be sent to a targetted node. > 4) I setup the coordinator starup with pooler_port=6667, it seems start > successful, but when I use "netstat -tunlp" command to check the server port > status, it seems the port 6667 do not open, it is correct? > The port opened with pooler on coodinator won't appear with netstat. It is not the case for me. > > 5) I follow the install manual, configure the system like that: > Datanode 1 configuration: > postgresql.conf > gtm_coordinator_id = 2 > > #--------------------------------------------------------------------------# > Coordinator 1 configuration: > postgresql.conf > gtm_coordinator_id = 2 > I saw two configuration files (one of the Coordinators 1 and one of the Datanodes 1) using a same value 2 for gtm_coordinator_id. gtm_coordinator_id needs to be different for each component of the cluster, either Datanode or Coordinator. If some components share the same id, GTM is not able to differentiate each component of the cluster correctly. > > num_data_nodes = 4 > > > Then I start gtm server: su -c "/usr/local/pgsql/bin/gtm -x 628 -l > /disk/dbase/gtm/gtm.log -p 6666 -D /disk/dbase/gtm &" - dbuser > Start coordinator server: su -c "/usr/local/pgsql/bin/postgres -C -i -D > /disk/dbase/dbase-coord &" - dbuser > Start data node server: su -c "/usr/local/pgsql/bin/postgres -X -i -D > /disk/dbase/dbase &" - dbuser > > Seems all servers started successful, then I try to create database in one > the coordinator server: > # su -c "/usr/local/pgsql/bin/createuser -p 2000 -a -d messenger" - dbuser > # su -c "/usr/local/pgsql/bin/createdb -p 2000 -E UNICODE data1" - dbuser > # su -c "/usr/local/pgsql/bin/createlang -p 2000 plpgsql data1" - dbuser > > Then I check other coordinator server, seems no database replicate, check > the gtm.log: > ########## cut here ########## > 3022:1086060864:2010-08-14 14:12:33.719 HKT -LOG: unexpected EOF on client > connection > LOCATION: ReadCommand, main.c:867 > 3023:1086060864:2010-08-14 14:12:33.719 HKT -LOG: Cleaning up thread state > LOCATION: GTM_ThreadCleanup, gtm_thread.c:265 > 3024:1086060864:2010-08-14 14:12:37.360 HKT -LOG: Sending transaction id > 19914 > LOCATION: ProcessBeginTransactionGetGXIDCommand, gtm_txn.c:916 > 3025:1086060864:2010-08-14 14:12:37.377 HKT -LOG: unexpected EOF on client > connection > LOCATION: ReadCommand, main.c:867 > 3026:1086060864:2010-08-14 14:12:37.378 HKT -LOG: Cleaning up thread state > LOCATION: GTM_ThreadCleanup, gtm_thread.c:265 > 3027:1086060864:2010-08-14 14:12:38.563 HKT -LOG: Sending transaction id > 19915 > LOCATION: ProcessBeginTransactionGetGXIDCommand, gtm_txn.c:916 > 3028:1086060864:2010-08-14 14:12:38.582 HKT -LOG: unexpected EOF on client > connection > LOCATION: ReadCommand, main.c:867 > 3029:1086060864:2010-08-14 14:12:38.582 HKT -LOG: Cleaning up thread state > LOCATION: GTM_ThreadCleanup, gtm_thread.c:265 > 3030:1086060864:2010-08-14 14:12:47.692 HKT -LOG: Sending transaction id > 19916 > LOCATION: ProcessBeginTransactionGetGXIDCommand, gtm_txn.c:916 > ########## cut here ######### > > > I suppose this is your GTM log file, no? I think you should first check how gtm_coordinator_id is set for each Coordinator and Datanode. Except that you configuration looks correct. The way you are launching applications looks also OK. You have also to know that when you modify a catalog table of a Coordinator by launching DDL on it (user creation, database creation), the catalog table modification of this coordinator is not visible on other coordinators. After launching a DDL on a Coordinator, you have to synchronize catalog tables from the Coordinator whose catalog tables have been updated to other coordinators. You can use the utility pgxc_ddl for this purpose. DDL Hot synchronization is planned to be implemented in a next release. Thanks, -- Michael Paquier |