Summary
Keywords
Full Transcript
# 🐘 PostgreSQL High Availability (Primary + Replica) ## Docker Streaming Replication on Two Servers Ubuntu 24.04 LTS | PostgreSQL 16 | Docker (latest) ## 🖥️ Server Details | Role | Hostname | IP Address | Port | | ------- | -------- | --------------- | ---- | | Primary | server1 | 192.168.136.128 | 5432 | | Replica | server2 | 192.168.136.129 | 5432 | Credentials (same as your demo): * DB: demo_db * Superuser: postgres * Password: admin@123 * Replication user: replicator * Replication password: replica@123 ## ⚠️ Important DBA Notes * Old primary must be rebuilt before rejoining * This is manual failover * For auto-failover → use Patroni / repmgr / Stolon * For load-balancing → add PgBouncer / HAProxy * For production → secure pg_hba.conf ## ✅ FINAL RESULT ✔ Two-server PostgreSQL HA ✔ Docker-based ✔ Streaming replication ✔ Manual failover tested ✔ DBA-friendly (no magic tools) -------------------------------------------------------------------- ######## ⚠️ Disclaimer / अस्वीकरण ######## 1️⃣ All trademarks, logos, and names belong to their respective owners. 2️⃣ This video is made only for educational & informational purposes under Fair Use (Section 107, Copyright Act 1976). 3️⃣ No copyright infringement intended. 4️⃣ For any copyright concerns, email 📩 [email protected] — action will be taken promptly. ## 🌐 👇 Follow & Support: 🎥 YouTube: https://www.youtube.com/@ChiragMahtoOfficial 📷 Instagram: https://www.instagram.com/chirag_._mahto 💼 LinkedIn: https://linkedin.com/in/chittrmahto 📘 Facebook: https://www.facebook.com/chittrmahto 💬 WhatsApp Channel: https://whatsapp.com/channel/0029VbBgm16002T93KB16U12 💬 Telegram Channel: https://t.me/+GAATbmOU4z1mMDY9 📘 Note: Follow the process exactly as shown in the video. 💾 DM me for paid PDF/Document → 📩 [email protected] ✨ Share this tutorial with your friends & colleagues! 💬 Drop your questions in the YouTube comments — I’ll reply personally. 🔔 Subscribe for FREE tutorial and Certification Tutorials! 🔥 Don’t forget to 💛 LIKE, 💘 SHARE, 💝 COMMENT, & 💙 SUBSCRIBE to @ChiragTutorial 💯 Thanks & Regards, 💫 Chitt Ranjan Mahto — “CHIRAG” 💫 🌍 https://www.chirags.in #chiragtutorial #chirag #chittranjanmahto #chiragmahto #postgresql #docker #postgresqlha #postgresreplication #streamingreplication #postgresdocker #databaseha #dba #postgresql16 #linux #devops
