The database used by the company PostgreSQL, has been running smoothly, but the recent Java new management platform, due to more users, concurrency is relatively large. In addition the new system may also have problems with optimization, so PG often crashes, so I began to study how to matter PG's high-performance, high-availability HA db cluster solution. The main idea is to use PostgreSQL's own stream replication function, to realize the dual-machine hot standby, the use of Pgpool to achieve the database load balancing, failure takeover, online reply, eliminate single point of failure, so that no gap without artificial participation of the main standby cycle n switch high availability. Later after detailed reading of other people's blogs and help manuals. The final implementation. Below is the mind map. For configuration parameters, refer to the Help manual and My code comments for the meaning of the parameters during configuration.
Reference blog:
Subauson on the Road (HA): http://dz.sdut.edu.cn/blog/subaochen/?p=451
Guo_guo (Implementation manual): http://blog.csdn.net/sszgg2006/article/details/38684325
Constantin's Blog (PG Installation and configuration): http://www.cnblogs.com/zhoulf/p/4040768.html
Pgpool's Chinese manual: Http://pgpool.projects.pgfoundry.org/pgpool-II/doc/pgpool-zh_cn.html#start
The HA solution for PostgreSQL-Project Overview