Sunday, March 21, 2021

PostgreSQL High Availability with Patroni and ETCD


Building an Enterprise-Grade PostgreSQL Setup Using Open Source Tools
https://www.percona.com/blog/2018/10/19/postgresql-building-enterprise-grade-setup-with-open-source/
https://www.veritas.com/content/support/en_US/doc/129277259-129955710-0/v129957708-129955710 

Set Up Highly Available PostgreSQL12 Cluster on CentOS, RHEL 8
https://www.techsupportpk.com/2020/02/how-to-create-highly-available-postgresql-cluster-centos-rhel-8.html   

Set Up a Highly Available PostgreSQL12 Cluster on CentOS, RHEL 7   
https://www.techsupportpk.com/2020/02/how-to-create-highly-available-postgresql-cluster-using-patroni-haproxy-centos-rhel-7.html   


The simplest Patroni PostgreSQL HA is with One ETCD instance and Two PostgreSQL ( instances )   https://www.cybertec-postgresql.com/en/patroni-setting-up-a-highly-available-postgresql-cluster/


My favourite Patroni introduction :
https://www.cybertec-postgresql.com/en/postgresql-high-availability-and-patroni-an-introduction/


Nice article about ETCD Cluster : 
https://www.cybertec-postgresql.com/en/introduction-and-how-to-etcd-clusters-for-patroni/


Other useful Links with more information regarding the subject :
https://www.youtube.com/watch?v=FiWZuEVlSLc
https://digitalis.io/blog/postgresql/part1-postgresql-ha-patroni-etcd-haproxy/

https://www.programmersought.com/article/4066235751/

https://www.techsupportpk.com/2020/02/how-to-create-highly-available-postgresql-cluster-centos-rhel-8.html

https://www.alibabacloud.com/blog/how-to-set-up-a-highly-available-postgresql-cluster-using-patroni-on-ubuntu-16-04_594477

https://blog.dbi-services.com/postgresql-high-availabilty-patroni-ectd-haproxy-keepalived/


PostgreSQL Cluster Patroni ETCD
https://www.youtube.com/watch?v=SBRo0l7fc_Q
https://github.com/jamalshahverdiev/vagrant-codes-in-practice/tree/master/vagrant-jenkins-gitlab
   by Jamal Shahverdiev


How to Set Up a High Available PostgreSQL Cluster Using Patroni
https://miro.medium.com/max/1400/1*MKVdFmARn20kBlKcnSx_9w.png
https://medium.com/@neslisah.demirci/how-to-set-up-a-high-available-postgresql-cluster-using-patroni-d7044a754d2f

   - Load Balancing with Primary + Replica - HAProxy
https://github.com/zalando/patroni/blob/master/postgres1.yml
https://github.com/zalando/patroni/blob/master/postgres0.yml

https://dzone.com/articles/managing-high-availability-in-postgresql-part-iii



---

Articles from books : 

---

 - Preventing Split Brain
https://subscription.packtpub.com/book/data/9781838984854/1/ch01lvl1sec09/preventing-split-brain
 - Installing and configuring pgBackRest
https://subscription.packtpub.com/book/data/9781838984854/8/ch08lvl1sec98/installing-and-configuring-pgbackrest

 ( PostgreSQL 12 High Availability Cookbook - Third Edition : By Shaun Thomas - February 2020 ) 

---


PITR on a patroni-pgbackrest stack
https://medium.com/@Gowtham_Raj_Elangovan/pitr-on-a-patroni-pgbackrest-stack-9472846d8559

How to configure a Patroni Cluster to use pgbackrest
https://community.pivotal.io/s/article/How-to-Configure-a-Patroni-Cluster-to-use-pgbackrest?language=en_US

Point-in-time-recovery (PITR) with Patroni
https://community.pivotal.io/s/article/Point-in-time-recovery-PITR-with-Patroni

Q: Is it possible to perform PITR recovery with Patroni using pgBackrest?
A: As of pgBackrest 2.23 and Patroni 1.6.4, it is only possible to perform a PITR if you bootstrap the cluster. 

How to use pgbackrest to bootstrap or add replica to HA Patroni
https://community.pivotal.io/s/article/How-to-Use-pgbackrest-to-bootstrap-or-add-replica-to-HA-Patroni


How to configure a Patroni Cluster to use pgbackrest
https://community.pivotal.io/s/article/How-to-Configure-a-Patroni-Cluster-to-use-pgbackrest

An ultimate guide to upgrading your PostgreSQL installation
https://www.youtube.com/watch?v=CzhVkdnbQBU
https://youtu.be/CzhVkdnbQBU?t=2528
by Ilya Kosmodemiansky

Cluster PostgreSQL mutualisé : les choix techniques Sigma
https://www.sigma.fr/2020/05/26/2-cluster-postgresql-mutualise-les-choix-techniques-sigma/