PostgreSQL 12 High Availability Cookbook

Book description

A comprehensive guide to understanding key techniques for architecture and hardware planning, monitoring, replication, backups, and decoupling

Key Features

  • Newly updated edition, covering the latest PostgreSQL 12 features with hands-on industry-driven recipes
  • Create a PostgreSQL cluster that stays online even when disaster strikes
  • Learn how to avoid costly downtime and data loss that can ruin your business

Book Description

Databases are nothing without the data they store. In the event of an outage or technical catastrophe, immediate recovery is essential. This updated edition ensures that you will learn the important concepts related to node architecture design, as well as techniques such as using repmgr for failover automation. From cluster layout and hardware selection to software stacks and horizontal scalability, this PostgreSQL cookbook will help you build a PostgreSQL cluster that will survive crashes, resist data corruption, and grow smoothly with customer demand.

You'll start by understanding how to plan a PostgreSQL database architecture that is resistant to outages and scalable, as it is the scaffolding on which everything rests. With the bedrock established, you'll cover the topics that PostgreSQL database administrators need to know to manage a highly available cluster. This includes configuration, troubleshooting, monitoring and alerting, backups through proxies, failover automation, and other considerations that are essential for a healthy PostgreSQL cluster. Later, you'll learn to use multi-master replication to maximize server availability. Later chapters will guide you through managing major version upgrades without downtime.

By the end of this book, you'll have learned how to build an efficient and adaptive PostgreSQL 12 database cluster.

What you will learn

  • Understand how to protect data with PostgreSQL replication tools
  • Focus on hardware planning to ensure that your database runs efficiently
  • Reduce database resource contention with connection pooling
  • Monitor and visualize cluster activity with Nagios and the TIG (Telegraf, InfluxDB, Grafana) stack
  • Construct a robust software stack that can detect and avert outages
  • Use multi-master to achieve an enduring PostgreSQL cluster

Who this book is for

This book is for Postgres administrators and developers who are looking to build and maintain a highly reliable PostgreSQL cluster. Although knowledge of the new features of PostgreSQL 12 is not required, a basic understanding of PostgreSQL administration is expected.

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. PostgreSQL 12 High Availability Cookbook Third Edition
  3. About Packt
    1. Why subscribe?
  4. Contributors
    1. About the author
    2. About the reviewers
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the color images
      2. Conventions used
    4. Sections
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There's more…
      5. See also
    5. Get in touch
      1. Reviews
  6. Architectural Considerations
    1. Setting expectations with RPO
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    2. Defining timetables through RTO
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. This may seem familiar
        2. Node counts
    3. Picking redundant copies
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Selecting locations
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Having enough backups
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    6. Considering quorum
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Introducing indirection
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    8. Preventing split brain
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    9. Incorporating multi-master
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    10. Leveraging multi-master
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
  7. Hardware Planning
    1. Planning for redundancy
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    2. Having enough IOPS
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. A working example
        2. Making concessions
    3. Sizing storage
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Real-world example
        2. Adjusting the numbers
        3. Incorporating the spreadsheet
    4. Investing in a RAID
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Picking a processor
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Simultaneous multithreading 
        2. Clock boosting
        3. Power usage
      5. See also
    6. Allocating enough memory
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Exploring nimble networking
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. A networking example
        2. Remember redundancy
        3. Saving the research
    8. Managing motherboards
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Selecting a chassis
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    10. Saddling up to a SAN
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    11. Tallying up
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    12. Protecting your eggs
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  8. Minimizing Downtime
    1. Determining acceptable losses
      1. Getting ready
      2. How to do it...
      3. How it works...
    2. Configuration – getting it right the first time
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Configuration – managing scary settings
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Distinct settings
        2. More information
      5. See also
    4. Identifying important tables
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Reset stats
        2. Using pgstattuple
      5. See also
    5. Defusing cache poisoning
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    6. Terminating rogue connections
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Reducing contention with concurrent indexes
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. No transactions
        2. One at a time
        3. Dangers of OLTP use
      5. See also
    8. Managing system migrations
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Managing software upgrades
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    10. Mitigating the impact of hardware failure
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Copying WAL files more easily
        2. Built-in delay
        3. Adding compression
        4. Secondary delay
      5. See also
    11. Applying bonus kernel tweaks
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Some additional background
        2. Be wary of THP
  9. Proxy and Pooling Resources
    1. Exploring the magic of virtual IPs
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    2. Obtaining and installing HAProxy
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    3. Configuring HAProxy to load balance PostgreSQL
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more
    4. Determining connection costs and limits
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Installing PgBouncer
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    6. Configuring PgBouncer safely
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. What about pool_mode?
        2. Problems with prepared statements
      5. See also
    7. Connecting to PgBouncer
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    8. Listing PgBouncer server connections
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Listing PgBouncer client connections
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    10. Evaluating PgBouncer pool health
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    11. Changing PgBouncer connections while online
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    12. Enhancing PgBouncer authentication
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
  10. Troubleshooting
    1. Performing triage
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    2. Installing common statistics packages
      1. How to do it...
      2. How it works...
    3. Evaluating the current disk performance with iostat
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    4. Tracking I/O-heavy processes with iotop
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Viewing past performance with sar
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    6. Correlating performance with dstat
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    7. Interpreting /proc/meminfo
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    8. Examining /proc/net/bonding/bond0
      1. Getting ready
      2. How to do it...
      3. How it works...
    9. Checking the pg_stat_activity view
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    10. Checking the pg_stat_statements view
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Reset the status
        2. Catch more queries
      5. See also
    11. Deciphering database locks
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    12. Debugging with strace
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    13. Logging checkpoints properly
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
  11. Monitoring
    1. Figuring out what to monitor
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    2. Installing and configuring Nagios
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Configuring Nagios to monitor a database host
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    4. Enhancing Nagios with Check_MK
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Getting to know check_postgres
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    6. Installing and configuring Telegraf
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    7. Adding a custom PostgreSQL monitor to Telegraf
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    8. Installing and configuring InfluxDB
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Installing and configuring Grafana
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    10. Building a graph in Grafana
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    11. Customizing a Grafana graph
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    12. Using InfluxDB tags in Grafana
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
  12. PostgreSQL Replication
    1. Deciding what to copy
      1. Getting ready
      2. How to do it...
      3. How it works...
    2. Securing the WAL stream
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Setting up a hot standby
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    4. Upgrading to asynchronous replication
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Cascading replication
        2. Using replication slots
        3. Viewing replication status on a replica
      5. See also
    5. Bulletproofing with synchronous replication
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Being less strict
        2. Being more strict
        3. Enabling extreme durability
      5. See also
    6. Faking replication with pg_receivewal
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    7. Setting up Slony
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    8. Copying a few tables with Slony
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Setting up Bucardo
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    10. Copying a few tables with Bucardo
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    11. Setting up pglogical
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    12. Copying a few tables with pglogical
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    13. Copying a few tables with native logical replication
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. No sequences
        2. Tool integration
        3. Keys required for UPDATE and DELETE
      5. See also
  13. Backup Management
    1. Deciding when to use third-party tools
      1. Getting ready
      2. How to do it...
      3. How it works...
    2. Installing and configuring Barman
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    3. Backing up a database with Barman
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Retention policies
        2. Parallel backup
      5. See also
    4. Restoring a database with Barman
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Streaming replicas
        2. RPO zero
      5. See also
    5. Obtaining Barman diagnostics and information
      1. Getting ready
      2. How to do it...
      3. How it works...
    6. Sending Barman backups to a remote location
      1. Getting ready
      2. How to do it...
      3. How it works...
    7. Installing and configuring pgBackRest
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    8. Backing up a database with pgBackRest
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. More backup types
        2. Use full regularly
      5. See also
    9. Restoring a database with pgBackRest
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    10. Installing and configuring WAL-E
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    11. Managing WAL files with WAL-E
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Recovering WAL files
        2. Backing up the database
        3. Removing old files
      5. See also
  14. High Availability with repmgr
    1. Preparing systems for repmgr
      1. Getting ready
      2. How to do it...
      3. How it works...
    2. Installing and configuring repmgr
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    3. Cloning a database with repmgr
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Viewing the cluster
        2. Cloning from Barman
      5. See also
    4. Incorporating a repmgr witness
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    5. Performing a managed failover
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Always watching
        2. Testing the waters
        3. Useful shortcuts
      5. See also
    6. Customizing the failover process
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    7. Using an outage to test availability
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    8. Returning a node to the cluster
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Integrating primary fencing
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    10. Performing online maintenance and upgrades
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
  15. High Availability with Patroni
    1. Understanding more about Patroni and its components
      1. Why HAProxy?
      2. Why etcd?
      3. Why Patroni?
      4. The stack
    2. Preparing systems for the stack
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    3. Installing and configuring etcd
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    4. Installing and configuring Patroni
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Cluster status
        2. Better service management
      5. See also
    5. Installing and configuring HAProxy
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    6. Performing a managed switchover
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Using an outage to test availability
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    8. Returning a node to the cluster
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    9. Adding additional nodes to the mix
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    10. Replacing etcd with ZooKeeper
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    11. Replacing etcd with Consul
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    12. Upgrading while staying online
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  16. Low-Level Server Mirroring
    1. Understanding our chosen filesystem components
      1. Why DRBD?
      2. Why LVM?
      3. Why XFS?
      4. The stack
    2. Preparing systems for volume mirroring
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Getting started with the LVM
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    4. Adding block-level replication
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    5. Incorporating the second LVM layer
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    6. Verifying a DRBD filesystem
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    7. Correcting a DRBD split brain
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    8. Formatting an XFS filesystem
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    9. Tweaking XFS performance
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    10. Maintaining an XFS filesystem
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    11. Using LVM snapshots
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    12. Switching live stack systems
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    13. Detaching a problematic node
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
  17. High Availability via Pacemaker
    1. Before we begin...
    2. Installing the components
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Configuring Corosync
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    4. Preparing start up services
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Starting with base options
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    6. Adding DRBD to cluster management
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    7. Adding LVM to cluster management
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    8. Adding XFS to cluster management
      1. Getting ready
      2. How to do it...
      3. How it works...
    9. Adding PostgreSQL to cluster management
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    10. Adding a virtual IP to proxy the cluster
      1. Getting ready
      2. How to do it...
      3. How it works...
    11. Adding an email alert
      1. Getting ready
      2. How to do it...
      3. How it works...
    12. Grouping associated resources
      1. Getting ready
      2. How to do it...
      3. How it works...
    13. Combining and ordering related actions
      1. Getting ready
      2. How to do it...
      3. How it works...
    14. Performing a managed resource migration
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    15. Using an outage to test migration
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  18. High Availability with Multi-Master Replication
    1. Overview of multi-master
    2. Deciding whether multi-master is right for you
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    3. Obtaining and installing BDR
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Starting with a single BDR node
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Creating an additional BDR node
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Testing DDL replication on each node
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Using sequences safely
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Global allocation sequences
        2. Timeshard introspection
      5. See also
    8. Configuring HAProxy for the multi-master approach
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Combining PgBouncer with HAProxy
      1. Getting ready
      2. How to do it...
      3. How it works...
    10. Performing a managed node switchover
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    11. Improving failover speed
      1. Getting ready
      2. How to do it...
      3. How it works...
    12. Performing a major version upgrade online
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  19. Data Distribution
    1. Identifying horizontal candidates
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    2. Setting up a foreign PostgreSQL server
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Altering foreign servers
        2. Dropping foreign servers
      5. See also
    3. Mapping a remote user
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    4. Creating a foreign table
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Creating all tables for a foreign schema
        2. Dropping foreign tables
      5. See also
    5. Using a foreign table in a query
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Explaining strange planner decisions
        2. Improvements in PostgreSQL 9.6
        3. Improvements in PostgreSQL 10
        4. Improvements in PostgreSQL 11
    6. Optimizing foreign table access
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Transforming foreign tables into local tables
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    8. Creating a scalable nextval replacement
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    9. Building a sharding API
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. shard_manager extension
        2. Citus
        3. Postgres-XL
        4. BDR AutoScale
      5. See also
    10. Talking to the correct shard
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
        1. Keeping things fast by creating a cache
        2. Choosing an application data to map logical shard 
    11. Moving a shard to another server
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  20. Zero-downtime Upgrades
    1. Preparing upgrade requirements
      1. Getting ready
      2. How to do it…
      3. How it works…
    2. Remembering PgBouncer and pglogical
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There's more…
      5. See also
    3. Creating a publication set
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There's more…
    4. Handling sequences
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There's more…
    5. Bootstrapping the target cluster
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There's more…
    6. Starting the subscription
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There's more…
    7. Monitoring progress
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There's more…
      5. See also
    8. Switching targets
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There's more…
    9. Cleaning everything up
      1. Getting ready
      2. How to do it…
      3. How it works…
  21. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: PostgreSQL 12 High Availability Cookbook
  • Author(s): Shaun Thomas
  • Release date: February 2020
  • Publisher(s): Packt Publishing
  • ISBN: 9781838984854