@

Restoration


(1)Problem detection of Cluster DB, and restoration of data base

When replication serve detect a problem in Cluster DB, it separates the Cluster DB from those system .
At this time, a replication server does additional record of the status of Cluster DB into a log file.
Replication server creates a log file (the file name is 'pgreplicate.log') under the directory specified by '-D' option at the time of starting.
When you find the Cluster DB whose status is 'error' in this log file, please stop and repair the Cluster DB.
After completing repair of the Cluster DB, you can restart the Cluster DB with '-R' option .
When you restart the Cluster DB with a '-R' option, after Cluster DB synchronizes with the data of Master DB, it will be restored to those systems

The restoration of Cluster DB with "-R" option is using the rsync command. Please set up rsync in advance.

(example of Cluster DB restoration)
-------------------------------------------
# su -l postgres
$ cd /usr/local/pgsql
$ bin/pg_ctl start -o "-R"
After restoration, since the status of Cluster DB is also recorded into a log file, you can check the state of Cluster DB at any time.

(2)Addition of Cluster DB .

When you want to add the new Cluster DB, you can add it by the same method as the above-mentioned 'restoration of DB'.
Access from the outside to Master DB is forbidden until Cluster DB addition processing is completed, since the additional Cluster DB synchronizes with the data of Master DB.
When you want to accept a query during Cluster DB addition, please prepare three or more Cluster DBs.
The query received while locking Master DB is saved in a replication server, and execute those queries to the Master DB and the Cluster DB after data synchronous processing end.

(3) Addition of replication server and load balancer

A replication server can add dynamically, without stopping other servers, such as Cluster DB.