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

What this book covers

Chapter 1, Cluster Management Fundamentals, starts by showing how to install PostgreSQL 13 and initializing a data directory. We will then discuss pg_ctl and how it can be used to start and stop a PostgreSQL cluster.

Chapter 2, Cluster Management Techniques, helps you get familiar with some of the important routine tasks in PostgreSQL.

Chapter 3, Backup and Recovery, shows you several methods available to back up and restore a PostgreSQL database.

Chapter 4, Advanced Replication Techniques, teaches you how to configure both streaming and logical replication, and you'll learn about some more crucial tasks in a production database environment.

Chapter 5, High Availability and Automatic Failover, discusses one of the most heavily adopted open source high-availability tools available, called Patroni. It can be used to set up automatic failover. We shall learn how it can be configured and will also discuss the advantages and disadvantages of using it for high availability.

Chapter 6, Connection Pooling and Load Balancing, discusses pgBouncer, which is a widely implemented, lightweight external pooler.

Chapter 7, Securing through Authentication, teaches you how to secure PostgreSQL encryption through authentication, authorization, and auditing. You will also see how to encrypt connections over the wire and also at rest using SSL. We will also look at some extensions for performing auditing in PostgreSQL

Chapter 8, Logging and Analyzing PostgreSQL Servers, has been designed to let admins know of the available options in PostgreSQL to enable the logging of certain important activities and to help admins/developers get familiar with some views, extensions, and tools to analyze live and historic activity in Postgres catalogs and log files.

Chapter 9, Critical Services Monitoring, shows how we can set up the monitoring of servers using Grafana and Prometheus.

Chapter 10, Extensions and Performance Tuning, shows us what extensions are and examines some of the most commonly used extensions for routine maintenance activities. We will also discuss some of the extensions that are helpful in many of the more important activities performed by an administrator or developer.

Chapter 11, Upgrades and Patches, shows us the various upgrade paths for PostgreSQL and how to implement them.