设为首页 加入收藏

TOP

PostgreSQL-XL安装部署(四)
2015-12-01 16:02:57 来源: 作者: 【 】 浏览:17
Tags:PostgreSQL-XL 安装 部署
xy_main.c:805
[pgxl@localhost bin]$ ./pg_ctl start -Z datanode -D ../data/datanode1/
[pgxl@localhost bin]$ LOG:? database system was shut down at 2015-06-08 22:35:18 PDT
LOG:? autovacuum launcher started
LOG:? database system is ready to accept connections
?
[pgxl@localhost bin]$ ./pg_ctl start -Z coordinator -D ../data/coordinator1/
[pgxl@localhost bin]$ LOG:? database system was shut down at 2015-06-08 22:34:46 PDT
LOG:? autovacuum launcher started
LOG:? database system is ready to accept connections


node2节点:


[pgxl@localhost bin]$ export PGHOME=/opt/pgxl/
[pgxl@localhost bin]$ export PATH=$PGHOME/bin:$PATH
[pgxl@localhost bin]$ ./gtm_ctl start -Z gtm_proxy -D ../data/gtm_proxy2/
server starting
[pgxl@localhost bin]$ tail ../data/gtm_proxy2/gtm_proxy.log
1:47078985160944:2015-06-08 23:27:22.567 PDT -LOG:? Starting GTM proxy at (*:6662)
LOCATION:? main, proxy_main.c:805
[pgxl@localhost bin]$ ./pg_ctl start -Z datanode -D ../data/datanode2/
[pgxl@localhost bin]$ LOG:? database system was shut down at 2015-06-08 22:35:18 PDT
LOG:? autovacuum launcher started
LOG:? database system is ready to accept connections
?
[pgxl@localhost bin]$ ./pg_ctl start -Z coordinator -D ../data/coordinator2/
[pgxl@localhost bin]$ LOG:? database system was shut down at 2015-06-08 22:34:46 PDT
LOG:? autovacuum launcher started
LOG:? database system is ready to accept connections


注册:


node1:


协调节点:


[pgxl@localhost bin]$ ./psql -p 5432 -d postgres
psql (PGXL 9.2.0, based on PG 9.2.4 (Postgres-XL 9.2.0))
Type "help" for help.
?
postgres=# CREATE NODE coordinator2 WITH (TYPE='coordinator',HOST='192.168.100.202',PORT=5432);
CREATE NODE
postgres=# CREATE NODE datanode1 WITH (TYPE='datanode',HOST='192.168.100.201',PORT=15432);
CREATE NODE
postgres=# CREATE NODE datanode2 WITH (TYPE='datanode',HOST='192.168.100.202',PORT=15432);
CREATE NODE
?
postgres=# select * from pgxc_node;
? node_name? | node_type | node_port |? ? node_host? ? | nodeis_primary | nodeis_preferred |? node_id?
--------------+-----------+-----------+-----------------+----------------+------------------+-------------
?coordinator1 | C? ? ? ? |? ? ? 5432 | localhost? ? ? | f? ? ? ? ? ? ? | f? ? ? ? ? ? ? ? |? 1938253334
?coordinator2 | C? ? ? ? |? ? ? 5432 | 192.168.100.202 | f? ? ? ? ? ? ? | f? ? ? ? ? ? ? ? | -2089598990
?datanode1? ? | D? ? ? ? |? ? 15432 | 192.168.100.201 | f? ? ? ? ? ? ? | f? ? ? ? ? ? ? ? |? 888802358
?datanode2? ? | D? ? ? ? |? ? 15432 | 192.168.100.202 | f? ? ? ? ? ? ? | f? ? ? ? ? ? ? ? |? -905831925
?
select pgxc_pool_reload();
?pgxc_pool_reload
------------------
?t
(1 row)
?
[pgxl@localhost bin]$


数据节点:


[pgxl@localhost bin]$ ./psql -p 15432 -d postgres
psql (PGXL 9.2.0, based on PG 9.2.4 (Postgres-XL 9.2.0))
Type "help" for help.
?
postgres=# CREATE NODE coordinator1 WITH (TYPE='coordinator',HOST='192.168.100.201',PORT=5432);
CREATE NODE
postgres=# CREATE NODE coordinator2 WITH (TYPE='coordinator',HOST='192.168.100.202',PORT=5432);
CREATE NODE
postgres=# ALTER NODE datanode1 WITH (TYPE='datanode',HOST='localhost',PORT=15432);
ALTER NODE
postgres=# CREATE NODE datanode2 WITH (TYPE='datanode',HOST='192.168.100.202',PORT=15432);
CREATE NODE
?
postgres=# select * from pgxc_node;
? node_name? | node_type | node_port |? ? node_host? ? | nodeis_primary | nodeis_preferred |? node_id?
--------------+-----------+-----------+-----------------+----------------+------------------+-------------
?coordinator1 | C? ? ? ? |? ? ? 5432 | 192.168.100.201 | f? ? ? ?

首页 上一页 1 2 3 4 5 下一页 尾页 4/5/5
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇PostgreSQL用C完成存储过程实例 下一篇使用Cygwin中的AWK工具进行mysql ..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: