-- init each instances
initgtm -Z gtm -D /var/lib/pgxl/9.2/data_gtm
initdb -D /var/lib/pgxl/9.2/coord01 --nodename coord01
initdb -D /var/lib/pgxl/9.2/data01 --nodename data01
initdb -D /var/lib/pgxl/9.2/data02 --nodename data02
-- start each instances
gtm_ctl -Z gtm start -D /var/lib/pgxl/9.2/data_gtm
pg_ctl start -D /var/lib/pgxl/9.2/data01 -Z datanode -l logfile
pg_ctl start -D /var/lib/pgxl/9.2/data02 -Z datanode -l logfile
pg_ctl start -D /var/lib/pgxl/9.2/coord01 -Z coordinator -l logfile
-- referred to http://files.postgres-xl.org/documentation/index.html
DEBUG
-- if there are running to single, modify this.
port = 5432 ~ X
pooler_port = 6668 ~ Y
-- define the relation of each instances ( There are missed on manual. )
psql -c "EXECUTE DIRECT ON (coord01) 'CREATE NODE data01 WITH (TYPE = ''datanode'', HOST = ''localhost'', PORT = 5433)'" postgres
psql -c "EXECUTE DIRECT ON (coord01) 'CREATE NODE data02 WITH (TYPE = ''datanode'', HOST = ''localhost'', PORT = 5434)'" postgres
psql -c "EXECUTE DIRECT ON (data01) 'ALTER NODE data01 WITH (TYPE = ''datanode'', HOST = ''localhost'', PORT = 5433)'" postgres
psql -c "EXECUTE DIRECT ON (data01) 'CREATE NODE data02 WITH (TYPE = ''datanode'', HOST = ''localhost'', PORT = 5434)'" postgres
psql -c "EXECUTE DIRECT ON (data01) 'SELECT pgxc_pool_reload()'" postgres
psql -c "EXECUTE DIRECT ON (data02) 'CREATE NODE data01 WITH (TYPE = ''datanode'', HOST = ''localhost'', PORT = 5433)'" postgres
psql -c "EXECUTE DIRECT ON (data02) 'ALTER NODE data02 WITH (TYPE = ''datanode'', HOST = ''localhost'', PORT = 5434)'" postgres
psql -c "EXECUTE DIRECT ON (data02) 'SELECT pgxc_pool_reload()'" postgres
-- referred to http://sourceforge.net/p/postgres-xl/tickets/18/
0 개의 댓글:
댓글 쓰기