Microsoft Azure Learning Journey

Azure SQL or PostgreSQL? Choose and Operate a Relational Database

Choose a managed relational database by workload fit, operational skills, and recovery needs—not by brand familiarity.

6 min read · 1015 words
Microsoft AzureAzure StorageAzure DatabasesCloud ArchitectureDevOps
Azure SQL or PostgreSQL? Choose and Operate a Relational Database cover image

A team moves a line-of-business database to the cloud and discovers that “managed” does not mean “the provider understands our schema, access model, or recovery objective.” The first decision—Azure SQL or Azure Database for PostgreSQL—shapes compatibility, operations, identity, and cost.

What you’ll learn

Where this fits

Module 21, Phase 5, Part 3. Continue from Disks, Files, and Backups; next: Cosmos DB and Caching.

Prerequisites

Start with the workload, not the SKU

These are not interchangeable. Inventory extensions, SQL dialect, drivers, stored procedures, linked-server behavior, collation, latency, throughput, backup retention, and high-availability requirements. Run a compatibility assessment and representative performance tests before migration.

Managed service does not remove database operations

The cloud provider operates much of the host and service platform. Your team still owns schema changes, query quality, connection pooling, authorization, data classification, application retries, maintenance planning, and restore validation. High availability is not a substitute for backup, and a backup is not a substitute for tested failover.

Identity crosses two authorization planes

Azure RBAC governs management operations such as creating or changing a server. Database roles authorize SQL operations and data access. A user with Azure Contributor does not automatically receive SELECT access to application tables.

PostgreSQL Flexible Server supports Microsoft Entra authentication, including managed identities. A Microsoft Entra administrator enables identity provisioning, but applications still need database principals and least-privilege database roles. Password authentication may be disabled only after administrators and applications have verified identity-based connections and recovery access.

Private connectivity requires DNS too

PostgreSQL private access (VNet integration) places the service in a delegated subnet and does not expose a public endpoint. The application still needs a route to that VNet and a working private DNS resolution path. Peered networks must be configured for DNS as well as network reachability. Public access with firewall rules and private endpoint is a different networking choice; do not combine the models by assumption.

Hands-on: inspect current database servers

RESOURCE_GROUP="<EXISTING_RESOURCE_GROUP>"

az postgres flexible-server list --resource-group "$RESOURCE_GROUP" \
  --query "[].{name:name, location:location, version:version, state:state}" \
  --output table

az sql server list --resource-group "$RESOURCE_GROUP" \
  --query "[].{name:name, location:location, state:state}" \
  --output table

These commands list management-plane resources only. They neither enumerate databases nor test database authentication.

✅ Checkpoint: Record service type, engine version, network model, HA configuration, backup retention, and the identity that can connect. Do not copy sensitive endpoint details into a public report.

Security, cost, and production choices

Use managed identity or Microsoft Entra authentication where supported; avoid embedding database passwords in application settings. Restrict network paths and use TLS. Give application identities database roles that match actual queries rather than administrator rights. Store schema changes in reviewed migrations and test them against representative data.

Costs can include compute, storage, backup retention, high availability, replicas, networking, licenses, and data transfer. The cheapest compute tier may not meet the latency or availability requirement. Compare total operating cost and verify current regional pricing, service limits, and feature compatibility.

Troubleshooting

Five-pillar readiness checklist

Cleanup

No Azure resources were created. No cleanup is needed.

Key takeaways

Next: Cosmos DB and Caching: Model Access Before Scaling.

Series navigation: Previous: Disks, Files, and Backups · Current: Phase 5, Part 3 · Next: Cosmos DB and Caching

References

Share this article

LinkedIn post draft