Book Image

PostgreSQL 13 Cookbook

By : Vallarapu Naga Avinash Kumar
Book Image

PostgreSQL 13 Cookbook

By: Vallarapu Naga Avinash Kumar

Overview of this book

PostgreSQL has become the most advanced open source database on the market. This book follows a step-by-step approach, guiding you effectively in deploying PostgreSQL in production environments. The book starts with an introduction to PostgreSQL and its architecture. You’ll cover common and not-so-common challenges faced while designing and managing the database. Next, the book focuses on backup and recovery strategies to ensure your database is steady and achieves optimal performance. Throughout the book, you’ll address key challenges such as maintaining reliability, data integrity, a fault-tolerant environment, a robust feature set, extensibility, consistency, and authentication. Moving ahead, you’ll learn how to manage a PostgreSQL cluster and explore replication features for high availability. Later chapters will assist you in building a secure PostgreSQL server, along with covering recipes for encrypting data in motion and data at rest. Finally, you’ll not only discover how to tune your database for optimal performance but also understand ways to monitor and manage maintenance activities, before learning how to perform PostgreSQL upgrades during downtime. By the end of this book, you’ll be well-versed with the essential PostgreSQL 13 features to build enterprise relational databases.
Table of Contents (14 chapters)
12
About Packt
High Availability and Automatic Failover

The first step toward making a database highly available is setting up replication to another server, which could either be within the same or a different data center. While it is fairly difficult to see such replication methods included for free with some of the commercial databases that are available, you do not have to pay any license fees to set up replication with PostgreSQL. The community PostgreSQL software includes it by default. You may refer to Chapter 4, Advanced Replication Techniques to learn how to set up replication in PostgreSQL.

Now that we have replication set up, how do we ensure that we can avoid downtime for an application by letting a failover happen automatically? Are there any open source tools that can be highly trusted, and how do we configure them the right way? All these questions will be answered in this chapter...