Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4133 pages

Cloud and platforms

RDS vs Azure Database for PostgreSQL vs Cloud SQL: Failover, Backups and Upgrades

In short

In RDS vs Azure Database for PostgreSQL vs Cloud SQL, the step hardest to undo is a major-version upgrade, because each treats read replicas differently. RDS upgrades in-Region replicas with the primary, Azure makes you delete them first, and Cloud SQL rebuilds them from a backup. Failover is closer; each documents roughly one to two minutes of unavailability.

What happens to connections when the primary fails?

A Multi-AZ DB instance on RDS keeps a synchronous standby in another Availability Zone that cannot serve reads. Failover usually takes 60 to 120 seconds and works by pointing the instance's DNS record at the standby. AWS advises a JVM DNS cache TTL of no more than 60 seconds, because some Java setups never refresh a lookup until restart.

RDS also sells a different shape, the Multi-AZ DB cluster: one writer and two readable standbys with semisynchronous replication, where a commit needs at least one reader's acknowledgment. For PostgreSQL, failover time there depends on the lower replica lag of the two readers.

Azure Database for PostgreSQL flexible server offers zone-redundant HA by default, with same-zone HA as a fallback that Azure later moves to zone-redundant once capacity exists. Replication is synchronous, the standby takes no read queries, and zone-redundant failover is documented at 60 to 120 seconds with zero data loss. It can run longer when the standby must recover first. The Burstable tier gets no zone-redundant HA.

Cloud SQL builds HA as a regional instance: writes reach persistent disks in two zones before commit, and on failover the standby serves from the same static IP. Expect about sixty seconds without service. The new primary stays primary when the old zone returns, so going back is a manual failback. Sometimes Cloud SQL restarts the instance instead of failing over.

Checked against: source 1, source 2, source 3, source 9, source 15

How far back can you restore, and to what?

All three restore to a point in time inside a retention window, but the window sizes, the edition rules and what survives a deleted database are not the same.

SettingAmazon RDS for PostgreSQLAzure flexible serverCloud SQL for PostgreSQL
Automated backup retention0 to 35 days; 0 turns automated backups off7 days by default, up to 351 to 365; default 7 on Enterprise and 15 on Enterprise Plus
Point-in-time windowAny time within retention; logs reach S3 every five minutesAny time within the retention you configureLog retention of 1 to 7 days (Enterprise) or 1 to 35 days (Enterprise Plus), kept below backup retention
Where a PITR landsAlways a new DB instanceNot spelled out on the backup overview pageAlways a new instance
After the database is deletedBackups can be kept for the full retention if you chooseImmutable backups (preview) outlive the serverDeleted-instance backups held four days; a final backup 30 days by default

Checked against: source 4, source 5, source 10, source 16, source 17, source 18, source 22

How much does routine maintenance interrupt each service?

RDS gives every instance a weekly 30-minute maintenance window. If you do not pick one, it is drawn at random from an 8-hour block for the Region. The window sets when work starts, not when it must end. On Multi-AZ, RDS patches the standby, promotes it, then patches the old primary; an OS patch needs a short failover that usually lasts under a minute.

Azure lets you choose a custom day and time, or a system-managed one-hour window between 11 PM and 7 AM local to the region. Notices go out five calendar days ahead, and scheduled events are normally at least 15 days apart, though a critical fix can skip both. With HA, maintenance hits the standby first.

Cloud SQL usually schedules maintenance once every few months. On Enterprise edition an update takes roughly 5 to 10 minutes and connections drop for under 30 seconds on average. Enterprise Plus promises near-zero downtime, typically under one second, but that excludes customer-run work such as major version upgrades.

Checked against: source 6, source 9, source 11, source 19

How do read replicas differ between RDS vs Azure Database for PostgreSQL vs Cloud SQL?

All three ship asynchronous, read-only replicas built on PostgreSQL physical replication, and any replica can be promoted to stand alone. RDS supports cascading replicas only from PostgreSQL 14.1, and notes that a replica of an idle source can report up to five minutes of lag. Long queries on any hot standby can also be cancelled by WAL replay conflicts.

Azure caps a primary at five replicas, allows cross-region and cascading ones, and does not support replicas on the Burstable tier. Promoting a replica to primary needs the same tier and storage size as the current primary.

Cloud SQL lists read, cross-region, cascading and external replicas. One catch is easy to miss: an instance with connector enforcement turned on cannot have read replicas, unless it uses private service access.

Checked against: source 7, source 12, source 20

What does a major version upgrade do to replicas and downtime?

Each one runs pg_upgrade in place, and each protects you differently if it fails:

  • RDS takes a snapshot before the upgrade and another after it, upgrades in-Region read replicas with the primary, and terminates replication for Multi-AZ DB cluster replicas, which you must recreate. AWS suggests a blue/green deployment to cut the downtime.
  • Azure runs a precheck, stops the server, takes an implicit backup for rollback, turns HA off during the upgrade and back on after. Read replicas, cascading ones included, must be deleted first, and geo-replication is not supported during the upgrade.
  • Cloud SQL keeps the instance name and IP, makes a pre-upgrade backup, and either upgrades replicas with the primary by recreating them from the post-upgrade backup, or makes you upgrade each replica before the primary. External replicas cannot be upgraded in place.
  • Because of that, I would plan replica capacity for the upgrade window on Azure and Cloud SQL, since reads lose their replicas while the rebuild runs.

Checked against: source 8, source 13, source 14, source 21

Which of these limits should shape the decision?

Most of the numbers above are close enough not to matter. These four are not:

  • Client reconnection: RDS fails over by changing DNS, Cloud SQL keeps one static IP. Long-lived Java pools on RDS need the shorter DNS cache, or they keep calling a dead address.
  • Readable HA: if the standby should also carry reads, only the RDS Multi-AZ DB cluster shape documents that.
  • Recovery depth on Google: Enterprise edition caps transaction logs at 7 days, so a 30-day point-in-time need means Enterprise Plus or a different plan.
  • Replica count: Azure stops at five per primary, which matters for read-heavy apps that scale out with replicas.

Checked against: source 2, source 3, source 10, source 12, source 15, source 18

What else do people ask?

Can I read from the high-availability standby?

Not on an RDS Multi-AZ DB instance or on Azure flexible server HA; both docs say the standby takes no reads. The RDS Multi-AZ DB cluster is the exception, with two readable standbys.

Does point-in-time recovery overwrite my existing database?

Not on RDS or Cloud SQL. Both always create a new instance, so connection strings change after a restore.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. This compares the PostgreSQL engine only, using AWS, Microsoft Learn and Google Cloud documentation fetched on 20 Nov 2026. None of the timings come from my own databases; they are the figures each vendor publishes. Aurora, AlloyDB, Azure elastic clusters and all pricing are not covered. Found a mistake? Tell me.

Keep reading

Next step

Have a project in mind?

Tell me about it. A discovery call within 48 hours.