In the chapter, we discussed the problem of building scalable solutions based on PostgreSQL utilizing resources of several servers. There is a natural limitation for such systems--basically, there is always a compromise between performance, reliability, and consistency. It is possible to improve one aspect but others will suffer.
PostgreSQL providers several ways to implement replication that would maintain a copy of the data from a database on another server or servers. This can be used as a backup or a standby solution that would take over in case the main server crashes. Replication can also be used to improve, performance of a software system by making it possible to distribute load on several database servers.
In some cases, the functionality of replication provided by PostgreSQL can be not enough. There are third-party solutions that work around a PostgreSQL providing...