I. Deployment notes
1.1 Implementation Environment
The experimental environment for this document is as follows:
Pgsql Host: 192.168.1.45
Pgsql Standby Machine: 192.168.1.50
Software and system versions
Pgsql version: Pgsql 9.2.4
Linux version: Redhat 5.8
1.2 Document Description
This document details the dual-machine extension of PG, so that the Pgsql database is equipped with dual-machine hot-standby-stream replication function. Note that there is a master-slave relationship in the hot standby of the two machines, so as to guarantee the data's persistence, the host can operate, but the slave can only be used as a query. So the meaning of hot spare is to share the host's query pressure, backup host data, when the host problem, from the machine a little modification can become the host.
In order to reduce unnecessary trouble, this series of experiments, the communication between each host is set to no password access, but for the actual production, need to configure the password according to actual needs, enhance the security of the cluster.
Two. Configuration steps
Before you configure Pgsql, you must first set up two servers so that Postgres users can access each other without a password.
The HA solution for PostgreSQL-1 master-slave and back-up (Master/slave and backup)