A look at what HA is and what PostgreSQL has to offer for building an open source HA solution. Covers various aspects in terms of Recovery Point Objective and Recovery Time Objective. Includes backup and restore, PITR (point in time recovery) and streaming replication concepts.
2. Agenda
● A typical workflow in DR
● Why does everyone talk about it ?
● What is HA after all ?
● PostgreSQL HA
● PostgreSQL HA + Linux modus vivendi
3. Who am I ??
● Working in PostgreSQL space @ 2ndQuadrant
● Part of PostgreSQL family for over 10 years
● Work in almost all areas around PostgreSQL from development to professional
services
● Past stints with PostgreSQL family include
○ EnterpriseDB
○ OpenSCG
● Headed Engineering & IT efforts @ IBEX
● Served as Principal Architect/Product Owner @ TRG
Email: haroon@2ndQuadrant.com
: contact.mharoon@gmail.com
Skype: contact.haroon
10. What is HA after all ?
● RTO - Recovery Time Objective
○ The time interval it will take to restore ...
● RPO - Recovery Point Objective
○ The amount of data that you will lose ...
16. PostgreSQL HA - Failover Scenario
Primary/Master
Standby 4
Standby 3
Standby 1
App server
Standby 2
17. PostgreSQL HA - Failover Scenario (cont.)
Primary/Master
Standby 4
Standby 3
Standby 1
App server
Standby 2
18. PostgreSQL HA - Failover Scenario (cont.)
Old primary/master
Standby 4
Standby 3
Primary/Master
App server
Standby 2
19. PostgreSQL HA - Failover Scenario (cont.)
Standby 4
Standby 3
Primary/Master
Old primary/master
App server
Standby 2
20. PostgreSQL HA - Failover Scenario (cont.)
Standby 4
Standby 3
Primary/Master
Standby 1
App server
Standby 2
21. PostgreSQL HA + Open source PG
community tools + Linux
Free & Open source complete HA
22. PostgreSQL HA - Streaming Replication
Primary/Master
Standby 4
Standby 3
Standby 1
App server
Proxy
Standby 2
23. PostgreSQL HA - Streaming Replication
Old Primary/Master
Standby 4
Standby 3
Primary
App server
Proxy
Standby 2
24. Old primary - STONITH
Shoot
The
Other
Node
In
The
Head
image courtesy ourobengr.com
25. Further reading
- Barman: http://www.pgbarman.org
- Repmgr: http://www.repmgr.org
- Repmgrd: http://www.repmgr.org
- Pgbouncer: https://pgbouncer.github.io
- pgPool: http://www.pgpool.net/mediawiki/index.php/Main_Page
- pgBackRest: https://github.com/pgbackrest/pgbackrest
- CoroSync: http://corosync.github.io/corosync/
- Various other tools available to work with postgres
27. Questions
Thank you for your time
Questions ?
● Need customized PostgreSQL suited to your
needs?
● Looking for PostgreSQL training ?
● Need help migrating to PostgreSQL ?
● Need PostgreSQL production support ?
● Got specific PostgreSQL needs ?
● Looking for cloud and/or hybrid high availability
clusters ?
Let us help you!
Email: haroon@2ndQuadrant.com
Skype: contact.haroon