Postgres-XC Wiki
Advertisement

(Draft)

Overview of Datanode HA configuration

Because table rows can be distributed among multiple datanodes, they need to be configured with their backups. In this page, we use synchronous replication of PostgreSQL 9.1. Asynchronous replication has a chance to loose updates, which may lead to data inconsistency among the datanodes.

Now, we start wil the situation where datanodes are running on node01 and node02. We configure each slave on node02 and node01 respectively and then kill one of the datanode and failover to its slave.

Configuration Outline

We configure datanode slaves as follows:

Slave of the Datanode on node01 (datanode1)

  1. Slave runs on node02.
  2. Slave's working directory is /home/postgresxc/pgxc/datanode1_slave on node02.
  3. We need WAL archive transfered to node02's /home/postgresxc/pgxc/datanode1_arclog
  4. Slave will run in hot-standby mode.
  5. hot-standby will use the port 20010.

Slave of the Datanode on node02 (datanode2)

  1. Slave runs on node01.
  2. Slave's working directory is /home/postgresxc/pgxc/datanode2_slave on node01.
  3. We need WAL archive transfered to node01's /home/postgresxc/pgxc/datanode2_arclog
  4. Slave will run in hot-standby mode.
  5. hot-standby will use the port 20010.

Configure datanode1's slave

Advertisement