Postgress Flexible server instance suddenly showing as "in recovery Mode"

Anil Kumar 0 Reputation points
2026-01-09T06:53:28.04+00:00

Postgress Flexible server instance suddenly showing all the databases showing in "read-only" mode and instance is showing in "recovery mode". It was deployed with Zone redundant HA.

We are connecting it using hostname/FQDN only. Already tried stop / restart the instance, is there any other things needs to be changed / reconfigured?

Azure Database for PostgreSQL
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pilladi Padma Sai Manisha 1,975 Reputation points Microsoft External Staff Moderator
    2026-01-09T08:45:05.8066667+00:00

    Hi Anil Kumar,
    Your PostgreSQL Flexible Server entering "recovery mode" with read-only databases is a standard indicator of an ongoing high availability (HA) failover process, especially since it's configured with Zone-Redundant HA the standby replica is promoting to primary after detecting a primary issue.​

    Stop/restarts won't help as they extend the transition; monitor for auto-completion instead.​

    Check Current Status

    • In Azure Portal, go to Overview status should shift from "Recovery" to "Available" (typically 5-15 mins).​
    • Under High availability blade, note Primary/Standby roles (they swap post-failover).​
    • Resource Health (Support + troubleshooting) shows HA events like "Unplanned Failover".​

    Resolve if Stuck

    Connect read-only and run: SELECT pg_is_in_recovery(); (returns true during recovery).​

    • Trigger Planned failover from HA blade for quick resolution (~60s downtime).​
    • Rule out storage full: Compute + storage >95% triggers read-only.​

    Monitor & Prevent

    Set alerts on Monitoring > Alerts for Resource Health/HA metrics (e.g., is_read_only).​ Connection via FQDN remains valid no changes needed.​

    Share a screenshot of Resource Health/HA blade or server name for more targeted help. This resolves 99% of cases without data loss.

    References:

    HA Monitoring

    Configure HA


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.