PostgreSQL 9 High Availability Cookbook
Table of Contents
PostgreSQL 9 High Availability Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Hardware Planning
Introduction
Planning for redundancy
Getting ready
How to do it...
How it works...
There's more...
See also
Having enough IOPS
Getting ready
How to do it...
How it works...
There's more...
A working example
Making concessions
Sizing storage
Getting ready
How to do it...
How it works...
There's more...
Real-world example
Adjusting the numbers
Incorporate the spreadsheet
Investing in a RAID
Getting ready
How to do it...
How it works...
There's more...
See also
Picking a processor
Getting ready
How to do it...
How it works...
There's more...
Hyperthreading
Turbo Boost
Power usage
See also
Making the most of memory
Getting ready
How to do it...
How it works...
There's more...
Exploring nimble networking
Getting ready
How to do it...
How it works...
There's more...
A networking example
Remember redundancy
Save the research
See also
Managing motherboards
Getting ready
How to do it...
How it works...
There's more...
See also
Selecting a chassis
Getting ready
How to do it...
How it works...
There's more...
Saddling up to a SAN
Getting ready
How to do it...
How it works...
There's more...
See also
Tallying up
Getting ready
How to do it...
How it works...
There's more...
Protecting your eggs
Getting ready
How to do it...
How it works...
There's more...
2. Handling and Avoiding Downtime
Introduction
Determining acceptable losses
Getting ready
How to do it...
How it works...
Configuration – getting it right the first time
Getting ready
How to do it...
How it works...
There's more...
See also
Configuration – managing scary settings
Getting ready
How to do it...
How it works...
There's more...
Distinct settings
More information
See also
Identifying important tables
Getting ready
How to do it...
How it works...
There's more...
Reset stats
Use pgstattuple
See also
Defusing cache poisoning
Getting ready
How to do it...
How it works...
See also
Exploring the magic of virtual IPs
Getting ready
How to do it...
How it works...
There's more...
Terminating rogue connections
Getting ready
How to do it...
How it works...
There's more...
Reducing contention with concurrent indexes
Getting ready
How to do it...
How it works...
There's more...
No transactions
One at a time
Danger with OLTP use
See also
Managing system migrations
Getting ready
How to do it...
How it works...
There's more...
See also
Managing software upgrades
Getting ready
How to do it...
How it works...
There's more...
See also
Mitigating the impact of hardware failure
Getting ready
How to do it...
How it works...
There's more...
Copy WAL files more easily
Add compression
Secondary delay
See also
Applying bonus kernel tweaks
Getting ready
How to do it...
How it works...
There's more...
3. Pooling Resources
Introduction
Determining connection costs and limits
Getting ready
How to do it...
How it works...
There's more...
Installing PgBouncer
Getting ready
How to do it...
How it works...
There's more...
See also
Configuring PgBouncer safely
Getting ready
How to do it...
How it works...
There's more...
What about pool_mode?
Problems with prepared statements
See also
Connecting to PgBouncer
Getting ready
How to do it...
How it works...
See also
Listing PgBouncer server connections
Getting ready
How to do it...
How it works...
There's more...
See also
Listing PgBouncer client connections
Getting ready
How to do it...
How it works...
There's more...
See also
Evaluating PgBouncer pool health
Getting ready
How to do it...
How it works...
There's more...
See also
Installing pgpool
Getting ready
How to do it...
How it works...
There's more...
See also
Configuring pgpool for master/slave mode
Getting ready
How to do it...
How it works...
There's more...
See also
Testing a write query on pgpool
Getting ready
How to do it...
How it works...
There's more...
Swapping active nodes with pgpool
Getting ready
How to do it...
How it works...
There's more...
See also
Combining the power of PgBouncer and pgpool
Getting ready
How to do it...
How it works...
There's more...
4. Troubleshooting
Introduction
Performing triage
Getting ready
How to do it...
How it works...
There's more...
Installing common statistics packages
Getting ready
How to do it...
How it works...
See also
Evaluating the current disk performance with iostat
Getting ready
How to do it...
How it works...
There's more...
See also
Tracking I/O-heavy processes with iotop
Getting ready
How to do it...
How it works...
There's more...
See also
Viewing past performance with sar
Getting ready
How to do it...
How it works...
There's more...
See also
Correlating performance with dstat
Getting ready
How to do it...
How it works...
See also
Interpreting /proc/meminfo
Getting ready
How to do it...
How it works...
There's more...
See also
Examining /proc/net/bo...