Book description
Leverage the power of PostgreSQL replication to make your databases more robust, secure, scalable, and fast
In Detail
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.
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
Table of contents
-
PostgreSQL Replication Second Edition
- Table of Contents
- PostgreSQL Replication Second Edition
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Preface
- 1. Understanding the Concepts of Replication
-
2. Understanding the PostgreSQL Transaction Log
-
How PostgreSQL writes data
-
The PostgreSQL disk layout
- Looking into the data directory
- PG_VERSION – the PostgreSQL version number
- base – the actual data directory
- global – the global data
- pg_clog – the commit log
- pg_dynshmem – shared memory
- pg_hba.conf – host-based network configuration
- pg_ident.conf – ident authentication
- pg_logical – logical decoding
- pg_multixact – multitransaction status data
- pg_notify – LISTEN/NOTIFY data
- pg_replslot – replication slots
- pg_serial – information about committed serializable transactions
- pg_snapshot – exported snapshots
- pg_stat – permanent statistics
- pg_stat_tmp – temporary statistics data
- pg_subtrans – subtransaction data
- pg_tblspc – symbolic links to tablespaces
- pg_twophase – information about prepared statements
- pg_xlog – the PostgreSQL transaction log (WAL)
- postgresql.conf – the central PostgreSQL configuration file
- Writing one row of data
- Read consistency
- The format of the XLOG
-
The PostgreSQL disk layout
- 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
-
How PostgreSQL writes data
- 3. Understanding Point-in-time Recovery
- 4. Setting Up Asynchronous Replication
-
5. Setting Up Synchronous Replication
- Synchronous replication setup
- Understanding the practical implications and performance
- Redundancy and stopping replication
- Summary
- 6. Monitoring Your Setup
- 7. Understanding Linux High Availability
- 8. Working with PgBouncer
- 9. Working with pgpool
- 10. Configuring Slony
- 11. Using SkyTools
- 12. Working with Postgres-XC
- 13. Scaling with PL/Proxy
- 14. Scaling with BDR
- 15. Working with Walbouncer
- Index
Product information
- Title: PostgreSQL Replication - Second Edition
- Author(s):
- Release date: July 2015
- Publisher(s): Packt Publishing
- ISBN: 9781783550609
You might also like
book
Mastering PostgreSQL 11 - Second Edition
Master the capabilities of PostgreSQL 11 to efficiently manage and maintain your database Key Features Master …
book
PostgreSQL High Availability Cookbook - Second Edition
Master over 100 recipes to design and implement a highly available server with the advanced features …
book
PostgreSQL 10 High Performance
Leverage the power of PostgreSQL 10 to design, administer and maintain a high-performance database solution About …
book
PostgreSQL 10 Administration Cookbook
A practical guide to administer, monitor and replicate your PostgreSQL 10 databaseAbout This Book Get to …