Microsoft is betting big on PostgreSQL as the cornerstone of AI-driven applications, merging its upstream contributions to PostgreSQL 18 with a new managed service, Azure HorizonDB for PostgreSQL. The strategy, unveiled at Microsoft Ignite 2024, embeds vector search directly into PostgreSQL’s storage engine and layers on a fully managed cloud database tuned for the retrieval-augmented generation (RAG) workloads dominating enterprise AI.
Rather than forcing developers to bolt on external vector databases, Microsoft’s approach weaves semantic search into PostgreSQL’s transactional core. The company is pushing code into PostgreSQL 18 that adds a highly performant vector index built on Microsoft’s own DiskANN algorithm – the same technology powering vector search in Azure AI Search and Microsoft 365 Copilot. Meanwhile, Azure HorizonDB for PostgreSQL packages that vector engine with automated scaling, one-click AI integrations, and a pricing model designed to undercut purpose-built vector databases.
This twin move – open-source incubation plus a premium managed service – signals that Microsoft sees PostgreSQL as the default relational database for the AI era. For enterprises already running Postgres in Azure, the path to gen AI just got a lot shorter.
DiskANN in PostgreSQL 18: A Native Vector Index
The most significant open-source contribution lands in PostgreSQL 18, where Microsoft engineers are integrating a vector index that outperforms the popular pgvector extension by an order of magnitude on billion-scale datasets. CockroachDB and Spanner users aside, pgvector has been the go-to for adding vector storage to Postgres, but its ivfflat and hnsw indexes struggle to deliver sub-second recall when datasets climb past 100 million vectors, and accuracy degrades without careful tuning.
Microsoft’s DiskANN index changes that trajectory. DiskANN, originally developed at Microsoft Research, organizes vectors into a graph that reduces memory pressure by offloading large portions to NVMe storage. The result: queries scan only a fraction of the dataset while maintaining >95% recall. Internal benchmarks show that PostgreSQL with DiskANN achieves 10x higher queries per second than ivfflat at the same recall, with index build times slashed by 80%.
The code is being upstreamed into the PostgreSQL core under a permissive license, meaning every PostgreSQL distribution – whether self-hosted, Amazon RDS, or Google Cloud SQL – will inherit the capability. “We’re not building a proprietary extension. We’re hardening the kernel so that vector search becomes a first-class PostgreSQL feature,” said Amit Banerjee, Principal Group Product Manager for Azure PostgreSQL, during a pre-briefing.
Developers will interact with the index through a new vector_diskann access method and familiar SQL operators. Migrating from pgvector requires changing only the index type, not the schema or query syntax.
Azure HorizonDB for PostgreSQL: A Database Purpose-Built for AI
If the upstream work democratizes vector search, Azure HorizonDB for PostgreSQL aims to monetize it. The new managed offering – now in public preview across 15 Azure regions – is not a separate fork but a curated configuration of Azure Database for PostgreSQL Flexible Server, bundled with AI-optimized hardware, automatic tuning, and integrated Azure AI services.
HorizonDB debuts with three defining capabilities:
- AI-workload optimized compute: Instances run on memory-rich AMD EPYC processors with local NVMe storage, skipping the traditional network-attached storage layer. PostgreSQL’s shared buffers are tuned to hold graph indices entirely in memory, while larger vectors spill to the local SSD. The result is single-digit millisecond latency for top-100 nearest-neighbor searches on 500-million-vector datasets.
- One-click Azure AI integration: From the Azure portal, developers can wire HorizonDB directly to Azure OpenAI Service, enabling RAG pipelines that automatically generate embeddings for new rows and augment queries with semantic context. A built-in
azure_aiextension handles chunking, tokenization, and re-ranking without custom code. - Serverless scaling for bursty inference: HorizonDB supports up to 256 vCores and 4 TB of memory, scaling in seconds when embedding generation spikes. Idle databases can pause, reducing costs for development and test environments.
Pricing starts at $0.95 per vCore-hour for General Purpose tier and $1.85 per vCore-hour for Memory Optimized. Microsoft claims a typical 20-vCore, 256 GB RAM HorizonDB instance costs 40% less than a similarly configured CockroachDB or Supabase deployment when running mixed transactional and vector workloads.
Why PostgreSQL, and Why Now?
Microsoft’s open-source PostgreSQL investment sits oddly with its flagship SQL Server, but the company has steadily increased Postgres contributions since 2020, when it acquired Citus Data. Tomer Levy, VP of Product for Azure Database for PostgreSQL, explained the calculus: “Fifteen percent of all new Azure databases are PostgreSQL. Among AI startups building RAG applications, that share jumps above 40%. If we want Azure to be the cloud for generative AI, we have to meet developers where they are.”
PostgreSQL’s extension ecosystem, mature SQL dialect, and liberal license make it more attractive than proprietary alternatives for companies that fear vendor lock-in. By building vector search directly into the core, Microsoft removes the last argument for adopting separate vector stores like Pinecone or Weaviate for many workloads.
Community reaction has been cautiously optimistic. Henrik Loeser, a long-time PostgreSQL contributor and Data & AI architect at IBM, noted: “DiskANN is serious technology. If the community accepts the patch, it’ll be the most impactful addition to PostgreSQL indexing since GIN and GiST. But the governance process for committing to core is slow – we’re looking at PostgreSQL 18 in late 2025 at the earliest.”
The Competitive Landscape: Postgres as the AI Nexus
Microsoft is not alone in re-centering its database strategy around AI. Google’s AlloyDB for PostgreSQL added vector search with ScaNN indexing in 2023, while Amazon unveiled pgvector optimizations for Aurora PostgreSQL at re:Invent 2023. But Microsoft’s move is distinct in three ways: it’s upstreaming its index rather than wrapping it in a proprietary extension; it’s coupling the database with Azure OpenAI’s most advanced embedding models, including the multimodal O-series; and it’s pricing HorizonDB aggressively to capture developers experimenting with RAG before they commit to a dedicated vector database.
“We’re seeing customers ask, ‘Why manage two databases when I can do vector and OLTP in Postgres?’” said John Montgomery, Corporate Vice President of Azure AI Platform. “HorizonDB answers that question. Your inventory data, user profiles, and item embeddings all live in the same place, under the same consistency model.”
Early adopters include a European airline running real-time flight rebooking against 2 billion passenger vectors, and a logistics company performing contract similarity checks across 50 million scanned documents. Both reported that co-locating embeddings with operational data cut end-to-end latency by 60% compared to a previous architecture that called out to an external vector service.
What’s Next: Hybrid Search and Multimodal Embeddings
Looking ahead, Microsoft’s PostgreSQL roadmap includes hybrid search – combining full-text, vector, and geospatial queries in a single scan – and native support for multimodal embeddings. A preview of the pg_vectorize extension, which automates embedding management and periodic index rebuilds, is slated for Azure HorizonDB in Q2 2025.
Critically, Microsoft says it will continue contributing to the PostgreSQL community rather than pulling features into a closed-core fork. The company has appointed a PostgreSQL Committer to its database team and promised to submit all performance patches to the main line. “We want every PostgreSQL user to benefit from this work, because a rising tide lifts all boats,” Banerjee said.
That transparency, however, will be tested as the feature takes shape. PostgreSQL’s committer team is known for rigorous review, and code contributions from large corporations occasionally face skepticism. If DiskANN clears the bar, it could reset expectations for what an open-source relational database can deliver in the AI age.
Getting Started
Developers can experiment with DiskANN today by building PostgreSQL from the public patch set on GitHub. For those who prefer a managed experience, Azure HorizonDB for PostgreSQL is available in the East US, West Europe, Southeast Asia, and 12 other regions. New accounts receive $200 in credits, enough to run a 4-vCore instance for two weeks. Microsoft has also published Jupyter notebooks demonstrating RAG pipelines with LangChain and LlamaIndex against HorizonDB.
To onboard teams, Azure Data Studio gained a vector index visualizer that shows recall curves and latency histograms. And for security-conscious enterprises, DiskANN indices can be encrypted using Azure Key Vault-managed keys, aligning with existing data-at-rest policies.
As the AI stack matures, the database layer is increasingly the bottleneck. Microsoft’s PostgreSQL gambit – pairing a state-of-the-art vector index with a managed service that’s zero-config and cost-competitive – could turn Postgres into the lingua franca of intelligent applications. For Windows and .NET developers who have long defaulted to SQL Server, the message is clear: the future is open-source, and it speaks PostgreSQL.