A comprehensive guide to building, managing, and securing scalable and reliable database and data warehousing applications using Postgres 12 and 13
Key Features
Set up your database cluster and monitor, secure, and fine-tune it for optimal performance Learn the fundamentals of database management and implement client- and server-side programming using SQL and PL/pgSQL Explore useful tips to develop efficient PostgreSQL database solutions from scratch
Book DescriptionPostgreSQL is one of the fastest-growing open source object-relational database management systems (DBMS) in the world. As well as being easy to use, its scalable and highly efficient. In this book, youll explore PostgreSQL 12 and 13 and learn how to build database solutions using it. Complete with hands-on tutorials, this guide will teach you how to achieve the right database design required for a reliable environment. You'll learn how to install and configure a PostgreSQL server and even manage users and connections. The book then progresses to key concepts of relational databases, before taking you through the Data Definition Language (DDL) and commonly used DDL commands. To build on your skills, youll understand how to interact with the live cluster, create database objects, and use tools to connect to the live cluster. Youll then get to grips with creating tables, building indexes, and designing your database schema. Later, you'll explore the Data Manipulation Language (DML) and server-side programming capabilities of PostgreSQL using PL/pgSQL, before learning how to monitor, test, and troubleshoot your database application to ensure high-performance and reliability. By the end of this book, you'll be well-versed with the Postgres database and be able to set up your own PostgreSQL instance and use it to build robust solutions.What you will learn
Understand how users and connections are managed by running a PostgreSQL instance Interact with transaction boundaries using server-side programming Identify bottlenecks to maintain your database efficiently Create and manage extensions to add new functionalities to your cluster Choose the best index type for each situation Use online tools to set up a memory configuration that will suit most databases Explore how Postgres can be used in multi-instance environments to provide high-availability, redundancy, and scalability
Who this book is forThis Postgres book is for anyone interested in learning about the PostgreSQL database from scratch. Anyone looking to build robust data warehousing applications and scale the database for high-availability and performance using the latest features of PostgreSQL will also find this book useful. Although prior knowledge of PostgreSQL is not required, familiarity with databases is expected.
Table of Contents
Introduction to PostgreSQL 12
Getting to know your cluster
Managing users and connections
Basic Statements
Advanced Statements
Window Functions
Server Side Programming
Triggers and Rules
Partitioning
Users, Roles, and Database Security
Transactions, MVCC; WALs and Checkpoints
Extending the database: the Extension ecosystem
Indexes and Performance Optimization
Logging and Auditing
Backup and Restore
Configuring and Monitoring
Physical replication
Logical Replication
Useful Tools and Useful Extensions
Towards PostgreSQL 13
Luca Ferrari has been passionate about computer science since the Commodore 64 era, and today holds a master's degree (with honors) and a Ph.D. from the University of Modena and Reggio Emilia. He has written several research papers, technical articles, and book chapters. In 2011, he was named an Adjunct Professor by Nipissing University. An avid Unix user, he is a strong advocate of open source, and in his free time, he collaborates with a few projects. He met PostgreSQL back in release 7.3; he was a founder and former president of the Italian PostgreSQL Community (ITPUG). He also talks regularly at technical conferences and events and delivers professional training. Enrico Pirozzi, EnterpriseDB certified on implementation management and tuning, with a master's in computer science, has been a PostgreSQL DBA since 2003. Based in Italy, he has been providing database advice to clients in industries such as manufacturing and web development for 10 years. He has been training others on PostgreSQL since 2008. Dedicated to open source technology since early in his career, he is a cofounder of the PostgreSQL Italian mailing list, PostgreSQL-it, and of the PostgreSQL Italian community site, PSQL