Skip to content
Cloud service Databases

Azure Database for PostgreSQL

Azure Database for PostgreSQL is a fully managed service that runs community PostgreSQL on Azure, with zone-redundant HA, automated patching and backups, elastic clusters for sharding, and AI extensions such as pgvector, DiskANN and azure_ai. Azure HorizonDB is a separate PostgreSQL-based service in preview.12

Also known as Azure Database for PostgreSQL flexible server

Intended for
Application developers, Database administrators, Teams migrating PostgreSQL to Azure, AI application developers
Runs on
Azure regions (single zone or zone-redundant), Private access through Azure virtual networks or public access, Elastic clusters for horizontal scale out

At a glance

What is it?
Azure Database for PostgreSQL (the flexible server deployment) is a managed relational database service that runs the community edition of PostgreSQL, so existing applications usually move with little refactoring. The engine runs in a container on a Linux virtual machine, with data files on Azure storage kept as three synchronous copies. You choose Burstable, General Purpose or Memory Optimized compute, can stop the server to pause compute billing, and can add a warm standby in another availability zone. Elastic clusters, a managed form of the open source Citus extension, shard data across several nodes.13
What does it do?
The service patches the OS and engine in a system-managed or custom maintenance window, takes automatic backups to zone-redundant storage (7 days by default, up to 35), encrypts data at rest and in transit, supports private access through virtual networks and includes a built-in PgBouncer. For AI it supports pgvector for vector similarity search, DiskANN for large-scale vector indexing and the azure_ai extension, which lets SQL call Azure OpenAI in Microsoft Foundry models, Azure Language in Foundry Tools and Azure Machine Learning endpoints. Data can be mirrored into Microsoft Fabric.145
Who needs it?
Teams that build on PostgreSQL and want a managed service instead of running their own servers, including those migrating from on-premises PostgreSQL, Amazon RDS or Aurora, Google Cloud SQL or AlloyDB, or EDB with the built-in migration service. It also suits developers who want vectors and LLM calls inside the database for retrieval-augmented generation.5
What does it need?46
  • An Azure subscription
  • A supported PostgreSQL major version for your application
  • A network choice: public access or private access through an Azure virtual network
  • Extensions added to the server allowlist before running CREATE EXTENSION
  • For azure_ai: an Azure OpenAI or Foundry endpoint and an API key or managed identity
What it is not
It is not a proprietary fork: it runs community PostgreSQL versions. It is not Azure HorizonDB, a separate cloud-native PostgreSQL service in preview with disaggregated compute and storage. It is not Azure DocumentDB, the MongoDB-compatible service that also builds on PostgreSQL. The azure_ai AI functions (embedding generation, generate, is_true, extract and rank) are marked preview, and the V6 SKU family is in public preview.124

Availability and licensing. Generally available; some regions temporarily block new zone-redundant HA deployments (checked 26 Oct 2026). The V6 SKU family and the azure_ai AI functions are in preview. Microsoft's product page says the Azure free account includes up to 750 hours of Burstable compute and 32 GB of storage a month for 12 months. Azure HorizonDB, a separate cloud-native PostgreSQL service, was in private preview at Ignite 2025 and announced in preview at Build 2026; its Learn page lists nine regions and gaps such as no cross-region replicas.1278

The problem it solves

Self-managed PostgreSQL needs patching, backups, failover, connection pooling and monitoring, and scaling past one server means running sharding yourself. Adding AI features often brings a second vector database and glue code.

Azure Database for PostgreSQL runs those operations as a service, offers zone-redundant high availability and Citus-based elastic clusters, and keeps vectors and model calls inside SQL through pgvector, DiskANN and azure_ai.1

How it works

  • Compute: the PostgreSQL engine runs in a container on a Linux VM, in Burstable, General Purpose or Memory Optimized tiers; V6 SKUs are in preview.
  • Storage: data files on Azure storage with three locally redundant synchronous copies; backups on zone-redundant storage.
  • High availability: an optional warm standby in the same zone or another zone, with synchronous replication for zero data loss and automatic failover.
  • Scale out: elastic clusters (managed Citus) with row-based or schema-based sharding, rebalanced online.
  • Extensions: pgvector (named vector), DiskANN, azure_ai and others, enabled through a server allowlist.
  • Integration: Microsoft Fabric mirroring, Microsoft Entra authentication and private networking.13
Azure Database for PostgreSQL architecture: components by layer and how they connectCopilot & businessappsAI models & platformData & analyticsCloud & hybridinfrastructureApplication or AI agent: Connects with standard PostgreSQL driversApplication or AI agentpgvector and DiskANN: Vector storage, distance functions and indexespgvector and DiskANNazure_ai extension: Calls models and AI services from SQLazure_ai extensionAzure OpenAI in Foundry Models and Foundry Tools: Model and language endpoints called by azure_aiAzure OpenAI in FoundryModels and Foundry ToolsPrimary server (PostgreSQL on a Linux VM): Runs the community PostgreSQL enginePrimary server (PostgreSQLon a Linux VM)Azure storage and zone-redundant backups: Three synchronous copies of data files; backups for point-in-time restoreAzure storage andzone-redundant backupsMicrosoft Fabric mirroring: Replicates data to OneLake for analyticsMicrosoft Fabric mirroringBuilt-in PgBouncer: Connection pooling on port 6432Built-in PgBouncerZone-redundant standby: Synchronous replica for automatic failoverZone-redundant standby
Diagram as a list
  1. Copilot & business apps

    • Application or AI agentConnects with standard PostgreSQL driversConnects to Built-in PgBouncer
  2. AI models & platform

    • pgvector and DiskANNVector storage, distance functions and indexes
    • azure_ai extensionCalls models and AI services from SQLConnects to Azure OpenAI in Foundry Models and Foundry Tools
    • Azure OpenAI in Foundry Models and Foundry ToolsModel and language endpoints called by azure_ai
  3. Data & analytics

    • Primary server (PostgreSQL on a Linux VM)Runs the community PostgreSQL engine
    • Azure storage and zone-redundant backupsThree synchronous copies of data files; backups for point-in-time restore
    • Microsoft Fabric mirroringReplicates data to OneLake for analytics
  4. Cloud & hybrid infrastructure

    • Built-in PgBouncerConnection pooling on port 6432Connects to Primary server (PostgreSQL on a Linux VM)
    • Zone-redundant standbySynchronous replica for automatic failover
Components and connections as documented by Microsoft.5

Capabilities

  • Managed operations and high availability1

    Automated patching in a maintenance window, automatic backups with point-in-time restore (7 to 35 days), and zone-redundant high availability with a synchronous warm standby.

    Why it matters: Removes routine database operations and protects against an availability zone failure.

    Limits: Some regions temporarily block new zone-redundant HA deployments; patching may restart the server.

  • Cost controls1

    A Burstable tier for low-concurrency workloads and stop and start on demand, which stops compute billing immediately.

    Why it matters: Development, test and time-bound workloads cost less.

    Limits: A stopped server restarts automatically after seven days; V6 SKUs cannot scale to or from Burstable.

  • Elastic clusters for sharding3

    A managed offering of the open source Citus extension that shards PostgreSQL across nodes with row-based or schema-based sharding and online rebalancing.

    Why it matters: Multitenant and large datasets can scale beyond a single server.

    Limits: All nodes must use the same compute and storage tier; DDL runs only through the coordinator node.

  • Vector search with pgvector and DiskANN69

    The pgvector extension adds vector types, distance operators and functions; DiskANN provides efficient large-scale vector indexing.

    Why it matters: RAG and semantic search can run inside the operational database.

    Limits: Extensions must be allowlisted per server and created in each database; the pgvector extension is named vector.

  • azure_ai extension4

    Lets SQL call Azure OpenAI in Microsoft Foundry models, Azure Language in Foundry Tools and Azure Machine Learning endpoints, with managed identity support.

    Why it matters: Embeddings, classification and LLM calls can be part of SQL queries and pipelines.

    Limits: The AI functions (embedding generation, generate, is_true, extract and rank) are in preview, and model calls are billed by the AI service.

  • Fabric mirroring and migration service510

    Mirroring replicates data into Microsoft Fabric OneLake in near real time; the migration service moves databases online or offline from on-premises, Amazon RDS and Aurora, Google Cloud SQL and AlloyDB, and EDB.

    Why it matters: Simplifies both moving into Azure and analyzing the data afterwards.

    Limits: Mirroring requires a running Fabric capacity; online migration needs replication prerequisites at the source.

Practical use cases

A team runs PostgreSQL on its own servers or on Amazon RDS and wants to consolidate on Azure.
Approach
Use the Azure Database for PostgreSQL migration service, online for production systems or offline where downtime is acceptable.
Role of Azure Database for PostgreSQL
Azure Database for PostgreSQL becomes the managed target running community PostgreSQL.
Data, infrastructure and skills
Network access to the source, a target server sized for the workload and a cutover plan.
Type of benefit
Less database administration
Caveats
Check that the extensions you use are on the Azure allowlist before migrating.
First step
Run the migration service's pre-migration validation against one source database.
Users cannot find products because search only matches exact words.
Approach
Generate embeddings with azure_ai, store them with pgvector and index them with DiskANN for semantic search.
Role of Azure Database for PostgreSQL
The database stores embeddings next to product data and runs similarity queries.
Data, infrastructure and skills
An Azure OpenAI or Foundry embedding deployment and the vector, DiskANN and azure_ai extensions.
Type of benefit
Better search relevance
Caveats
azure_ai AI functions are in preview; embedding calls add model cost.
First step
Embed a sample of product descriptions and compare semantic results with keyword search.
A multitenant SaaS app outgrows a single PostgreSQL server.
Approach
Move to an elastic cluster and use schema-based sharding, one schema per tenant.
Role of Azure Database for PostgreSQL
Elastic clusters spread tenants across nodes and rebalance them online.
Data, infrastructure and skills
An application that maps tenants to schemas and nodes in the same compute tier.
Type of benefit
Room to grow
Caveats
DDL and cluster-wide operations must go through the coordinator node.
First step
Create a small elastic cluster and distribute a copy of two tenant schemas.

Who uses it

Works with

Optional integration

Optional integration for

Relationship labels follow Microsoft's documentation. "Alternative approaches" does not mean one is better: each profile says when it fits.

Getting started

  1. Create a server

    Create an Azure Database for PostgreSQL flexible server in the portal, CLI or Bicep, starting on the Burstable tier for development.

    Check: You can connect and run a query with the PostgreSQL extension for Visual Studio Code.

  2. Set networking and HA

    Choose public or private (virtual network) access and enable zone-redundant high availability for production.

    Check: The portal shows the standby in a different availability zone.

  3. Enable AI extensions

    Add vector and azure_ai to the azure.extensions allowlist, then run CREATE EXTENSION in each database.

    Check: SHOW azure.extensions lists both extensions.

  4. Load or migrate data

    Use pg_dump and pg_restore for offline moves or the migration service for online migration.

    Check: Row counts match the source.

  5. Connect analytics

    Set up Microsoft Fabric mirroring for the server.

    Check: Tables appear in a Fabric mirrored database.

Official resources

Deciding whether you need it?

Three free tools apply Microsoft's own published guidance to your situation, and say when Azure Database for PostgreSQL or any new technology is not needed.

Sources

Each statement above links to the source it comes from. Labels say who reported it.

  1. What is Azure Database for PostgreSQL flexible server? (opens in a new tab) Microsoft · Vendor-reported
  2. What is Azure HorizonDB? (opens in a new tab) Microsoft · Vendor-reported
  3. Elastic clusters in Azure Database for PostgreSQL (opens in a new tab) Microsoft · Vendor-reported
  4. azure_ai extension in Azure Database for PostgreSQL (opens in a new tab) Microsoft · Vendor-reported
  5. Azure Database for PostgreSQL documentation (opens in a new tab) Microsoft · Vendor-reported · link checked 27 Oct 2026
  6. Vector search in Azure Database for PostgreSQL (opens in a new tab) Microsoft · Vendor-reported
  7. Microsoft Ignite 2025 Book of News (opens in a new tab) Microsoft · Vendor-reported · link checked 27 Oct 2026
  8. Microsoft Build 2026 live blog (opens in a new tab) Microsoft · Vendor-reported · link checked 27 Oct 2026
  9. Azure Database for PostgreSQL product page (opens in a new tab) Microsoft · Vendor-reported · link checked 27 Oct 2026
  10. Mirroring in Microsoft Fabric (opens in a new tab) Microsoft · Vendor-reported

Fill out the form below to request your copy.

Name(Required)