PostgreSQL Replication - Second Edition

Leverage the power of PostgreSQL replication to make your databases more robust, secure, scalable, and fast

PostgreSQL Replication - Second Edition

This ebook is included in a Mapt subscription
Hans-Jürgen Schönig

1 customer reviews
Leverage the power of PostgreSQL replication to make your databases more robust, secure, scalable, and fast
$0.00
$18.00
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Code Files
Preview in Mapt

Book Details

ISBN 139781783550609
Paperback322 pages

Book Description

PostgreSQL offers a comprehensive set of replication - related features. Unleashing the power of PostgreSQL provides you with countless opportunities and a competitive advantage over other database systems.

This book will guide you through the most important concepts of PostgreSQL replication. It contains all the information you need to design and operate replicated setups.

Beginning by giving you an understanding of replication concepts, the PostgreSQL transaction log, and Point-in-time Recovery, we gradually move on to setting up asynchronous and synchronous replication. Next up, you will learn to monitor a PostgreSQL cluster setup, deal with monitoring tools, and then move on to understanding Linux High Availability. Further, we explore widely-used tools such as Slony, SkyTools, Postgres-XC, and walbouncer, and set up PL/Proxy.

Finally, you'll get acquainted with the new technology of BDR, which allows bidirectional replication in PostgreSQL.

Table of Contents

Chapter 1: Understanding the Concepts of Replication
The CAP theorem and physical limitations of replication
Different types of replication
Using sharding and data distribution
Summary
Chapter 2: Understanding the PostgreSQL Transaction Log
How PostgreSQL writes data
The XLOG and replication
Understanding consistency and data loss
Tuning checkpoints and the XLOG
Experiencing the XLOG in action
Making use of replication slots
Summary
Chapter 3: Understanding Point-in-time Recovery
Understanding the purpose of PITR
Archiving the transaction log
Taking base backups
Replaying the transaction log
Summary
Chapter 4: Setting Up Asynchronous Replication
Setting up streaming replication
Configuring a cascaded replication
Turning slaves into masters
Mixing streaming-based and file-based recovery
Making streaming-only replication more robust
Efficient cleanup and the end of recovery
Conflict management
Dealing with timelines
Delayed replicas
Summary
Chapter 5: Setting Up Synchronous Replication
Synchronous replication setup
Understanding the practical implications and performance
Redundancy and stopping replication
Summary
Chapter 6: Monitoring Your Setup
Checking your archive
Checking pg_stat_replication
Checking for operating system processes
Checking for replication slots
Dealing with monitoring tools
Summary
Chapter 7: Understanding Linux High Availability
Understanding the purpose of High Availability
Measuring availability
Durability and availability
Detecting failures
The split-brain syndrome
Understanding Linux-HA
Setting up a simple HA cluster
Common maintenance tasks
Summary
Chapter 8: Working with PgBouncer
Understanding the fundamental PgBouncer concepts
Installing PgBouncer
Configuring your first PgBouncer setup
Improving performance
Maintaining PgBouncer
Summary
Chapter 9: Working with pgpool
Installing pgpool
Understanding the features of pgpool
Understanding the pgpool architecture
Setting up replication and load balancing
Checking the replication
Running pgpool with streaming replication
Dealing with failovers and High Availability
Summary
Chapter 10: Configuring Slony
Installing Slony
Understanding how Slony works
Replicating your first database
Deploying DDLs
Adding tables to replication and managing problems
Performing failovers
Summary
Chapter 11: Using SkyTools
Installing SkyTools
Dissecting SkyTools
Managing pgq queues
Using Londiste to replicate data
A word about walmgr
Summary
Chapter 12: Working with Postgres-XC
Understanding the Postgres-XC architecture
Installing Postgres-XC
Configuring a simple cluster
Optimizing for performance
Creating tables and issuing queries
Adding nodes
Handling failovers and dropping nodes
Summary
Chapter 13: Scaling with PL/Proxy
Understanding the basic concepts
Setting up PL/Proxy
Extending and handling clusters in a clever way
Summary
Chapter 14: Scaling with BDR
Understanding BDR replication concepts
Installing BDR
Setting up a simple cluster
Understanding sets
Controlling replication
Summary
Chapter 15: Working with Walbouncer
The concepts of walbouncer
Installing walbouncer
Using additional configuration options
Adjusting filtering rules
Summary

What You Will Learn

  • Use Point-in-time Recovery to perform data recovery as well as replication
  • Set up synchronous as well as asynchronous streaming replication
  • Get familiarized with the transaction log, the core component of most replication setups and its purpose
  • Improve speed and reliability with an understanding of pgpool and PgBouncer
  • Increase your data security and geographically distribute data
  • Make your systems more available and secure with Linux High Availability
  • Scale out with PL/Proxy and Postgres-XC
  • Detect, investigate, and solve replication-related problems

Authors

Table of Contents

Chapter 1: Understanding the Concepts of Replication
The CAP theorem and physical limitations of replication
Different types of replication
Using sharding and data distribution
Summary
Chapter 2: Understanding the PostgreSQL Transaction Log
How PostgreSQL writes data
The XLOG and replication
Understanding consistency and data loss
Tuning checkpoints and the XLOG
Experiencing the XLOG in action
Making use of replication slots
Summary
Chapter 3: Understanding Point-in-time Recovery
Understanding the purpose of PITR
Archiving the transaction log
Taking base backups
Replaying the transaction log
Summary
Chapter 4: Setting Up Asynchronous Replication
Setting up streaming replication
Configuring a cascaded replication
Turning slaves into masters
Mixing streaming-based and file-based recovery
Making streaming-only replication more robust
Efficient cleanup and the end of recovery
Conflict management
Dealing with timelines
Delayed replicas
Summary
Chapter 5: Setting Up Synchronous Replication
Synchronous replication setup
Understanding the practical implications and performance
Redundancy and stopping replication
Summary
Chapter 6: Monitoring Your Setup
Checking your archive
Checking pg_stat_replication
Checking for operating system processes
Checking for replication slots
Dealing with monitoring tools
Summary
Chapter 7: Understanding Linux High Availability
Understanding the purpose of High Availability
Measuring availability
Durability and availability
Detecting failures
The split-brain syndrome
Understanding Linux-HA
Setting up a simple HA cluster
Common maintenance tasks
Summary
Chapter 8: Working with PgBouncer
Understanding the fundamental PgBouncer concepts
Installing PgBouncer
Configuring your first PgBouncer setup
Improving performance
Maintaining PgBouncer
Summary
Chapter 9: Working with pgpool
Installing pgpool
Understanding the features of pgpool
Understanding the pgpool architecture
Setting up replication and load balancing
Checking the replication
Running pgpool with streaming replication
Dealing with failovers and High Availability
Summary
Chapter 10: Configuring Slony
Installing Slony
Understanding how Slony works
Replicating your first database
Deploying DDLs
Adding tables to replication and managing problems
Performing failovers
Summary
Chapter 11: Using SkyTools
Installing SkyTools
Dissecting SkyTools
Managing pgq queues
Using Londiste to replicate data
A word about walmgr
Summary
Chapter 12: Working with Postgres-XC
Understanding the Postgres-XC architecture
Installing Postgres-XC
Configuring a simple cluster
Optimizing for performance
Creating tables and issuing queries
Adding nodes
Handling failovers and dropping nodes
Summary
Chapter 13: Scaling with PL/Proxy
Understanding the basic concepts
Setting up PL/Proxy
Extending and handling clusters in a clever way
Summary
Chapter 14: Scaling with BDR
Understanding BDR replication concepts
Installing BDR
Setting up a simple cluster
Understanding sets
Controlling replication
Summary
Chapter 15: Working with Walbouncer
The concepts of walbouncer
Installing walbouncer
Using additional configuration options
Adjusting filtering rules
Summary

Book Details

ISBN 139781783550609
Paperback322 pages
Read More
From 1 reviews

Read More Reviews