
Learn to install Oracle on Linux by creating a VirtualBox VM and configuring Oracle Linux, including downloading the ISO and following prerequisites, and using bridged networking for a networked environment.
Demonstrates installing Oracle Linux in a VirtualBox VM, mounting the ISO, configuring language, keyboard, time zone, and root password, with practical setup tips.
Use the free -m command to view total, used, and available memory and swap on Linux, then use top to monitor real-time CPU and memory usage by processes.
Learn how to use the chown command to change file and directory ownership in Linux, including owner and group management, root privileges, and owner:group syntax with practical examples.
Install Postgres on Oracle Linux using the offline second method by copying the installer from another machine via FTP, then initialize the database and start the service.
Change to the postgres linux user, connect to the Postgres database with PgAdmin and SQL, and create databases, tables, and users while enforcing passwords.
Switch to the Postgres context, edit the pg_hba.conf to set md5 authentication, and restart Postgres to require a password for Postgres connections on Oracle Linux.
Explain how quorum ensures a single leader in a Patroni managed PostgreSQL cluster by requiring majority among three or more nodes, preventing split-brain and ensuring reliable failover.
Install etcd on the first cluster node and configure it for cluster management, then stop and disable PostgreSQL so Patroni can manage it and handle failover.
Configure and activate etcd across all nodes in a Patroni-managed Postgres cluster, establishing a quorum-driven failover with leader and replica awareness.
Configure etcd for a Patroni-managed Postgres cluster, create and save config blocks, restart services, and troubleshoot startup messages in preparation for installing Patroni.
Install and configure Patroni to manage a PostgreSQL cluster, create a replication user, set up systemd service, start Patroni, and verify leader status and failover readiness with etcd and HAProxy.
Install and configure HAProxy across all nodes to route writes to the leader via Patroni, balance reads across replicas, and expose a single proxy IP with health portal on 8080.
Configure Patroni on the first cluster replica, joining 189 to the etcd cluster for a three-node high-availability setup. Resolve replication permission errors by authorizing the replicator user and verifying status.
Clone the existing vm 189 to create node 190 for a three-node patroni-managed postgres cluster, then change its ip and prepare it to join the high-availability quorum.
Test and finalize Patroni, etcd, HAProxy, and keepalived configuration by performing failover tests, validating leader and replicas, and configuring asynchronous replication with plans to enable synchronous replication.
Explore quorum testing in a three-node patroni-managed Postgres cluster, simulate node failures, observe auto failover with a majority, and prepare for synchronous versus asynchronous replication.
In this 100% hands-on course, you will learn how to set up high availability with PostgreSQL using the powerful Patroni orchestrator, in a modern and professional Linux environment.
If you want to ensure your PostgreSQL databases remain available even in the event of failures, this course is for you.
Throughout the lessons, we’ll build a fully functional and robust cluster together, using:
PostgreSQL — the most advanced open-source database on the market
Patroni — the orchestration tool that manages automatic failover and replication
ETCD — the distributed configuration store that ensures cluster-wide consensus
HAProxy — the load balancer that automatically routes connections to the primary node
Keepalived — used to set up a floating virtual IP to guarantee continuous access
You will learn:
What quorum is and how it works in a cluster
How to avoid issues like split-brain
How to perform both automatic and manual failover safely
How to monitor the cluster and maintain data integrity
How to simulate real-world failure and recovery scenarios
Best practices for production environments
This course is ideal for DBAs, DevOps engineers, SREs, and Linux administrators who want to take their PostgreSQL infrastructure to the next level.
Prerequisites
Basic knowledge of PostgreSQL (but don’t worry — if you’re new to it, I have a complete PostgreSQL course available here on Udemy)
A strong desire to learn by doing, with real-world simulations
Enjoy the course, everyone!
Prof. Sandro Servino