dn01主管理
初始化
[tbase@VM_0_29_centos ~]# initdb --locale=zh_CN.UTF-8 -U tbase -E utf8 -D /data/tbase/data/pgxz/dn01 --nodename=dn01 --nodetype=datanode --master_gtm_nodename gtm_1 --master_gtm_ip 172.16.0.29 --master_gtm_port 21000
参数配置
[tbase@VM_0_29_centos ~]# vim /data/tbase/data/pgxz/dn01/postgresql.conf
port = 23001
pooler_port=24001
include_if_exists ='/data/tbase/global/postgresql.conf.user'
[tbase@VM_0_29_centos ~]# vim /data/tbase/data/pgxz/dn01/pg_hba.conf
local all all trust
host all all 127.0.0.1/32 trust
host replication all 172.16.0.29/32 trust
host all all 172.16.0.29/32 trust
host replication all 172.16.0.47/32 trust
host all all 172.16.0.47/32 trust
服务管理
[tbase@VM_0_29_centos ~]# pg_ctl -Z datanode -D /data/tbase/data/pgxz/dn01 start
[tbase@VM_0_29_centos ~]# pg_ctl -Z datanode -D /data/tbase/data/pgxz/dn01 stop
[tbase@VM_0_29_centos ~]# pg_ctl -Z datanode -D /data/tbase/data/pgxz/dn01 stop -m f #快速关闭
[tbase@VM_0_29_centos ~]# pg_ctl -Z datanode -D /data/tbase/data/pgxz/dn01 stop -m i #强制关闭
[tbase@VM_0_29_centos ~]# pg_ctl -D /data/tbase/data/pgxz/dn01 reload
[tbase@VM_0_29_centos ~]# pg_ctl -D /data/tbase/data/pgxz/dn01 status