Summary
In this chapter, we covered very important concepts of scaling, failover, backup, and recovery. We also covered scalability options at the database layer. We shortlisted one of the options (horizontal scaling with primary/secondary setup and read/write separation) and covered the most basic setup possible with pgpool-II. We also briefly touched upon backup and recovery scenarios and covered what is a mandatory step before making a major release in production: baselining the database state. We saw how to recover this baseline.
In the next chapter, we will look at troubleshooting PostgreSQL issues. Connection issues, queries not responding and similar problems will be covered.