dn01备管理

生成备节点

  1. [tbase@VM_0_47_centos ~]# pg_basebackup -p 23001 -h 172.16.0.29 -U tbase -D /data/tbase/data/pgxz/dn01 -X f -P -v

参数配置

  1. [tbase@VM_0_47_centos ~]# vim /data/tbase/data/pgxz/dn01/recovery.conf
  2. standby_mode = on
  3. primary_conninfo = 'host = 172.16.0.29 port = 23001 user = tbase application_name = s1'

服务管理

  • 启动服务
  1. [tbase@VM_0_47_centos ~]# pg_ctl -Z datanode -D /data/tbase/data/pgxz/dn01 start
  • 关闭服务
  1. [tbase@VM_0_47_centos ~]# pg_ctl -Z datanode -D /data/tbase/data/pgxz/dn01 stop
  2. [tbase@VM_0_47_centos ~]# pg_ctl -Z datanode -D /data/tbase/data/pgxz/dn01 stop -m f #快速关闭
  3. [tbase@VM_0_47_centos ~]# pg_ctl -Z datanode -D /data/tbase/data/pgxz/dn01 stop -m i #强制关闭
  • 重载参数
  1. [tbase@VM_0_47_centos ~]# pg_ctl -D /data/tbase/data/pgxz/dn01 reload
  • 查询状态
  1. [tbase@VM_0_47_centos ~]# pg_ctl -D /data/tbase/data/pgxz/dn01 status