High availability (HA) का अर्थ है विफलताएँ होने पर भी database को उपलब्ध रखना — replication (standby replicas), automatic failover (primary के विफल होने पर एक replica को promote करना), और उचित architecture के माध्यम से। लक्ष्य: downtime और data loss को कम करना, चूँकि database outages पूरे application को गिरा देते हैं।
नींव: replication + automatic failover
Primary ──(streaming replication)──▶ Standby replica(s)
If the PRIMARY fails:
→ a STANDBY is automatically PROMOTED to become the new primary (FAILOVER)
→ the application reconnects to the new primary → minimal downtime
→ Without HA, a primary failure = total database outage = application down.
