DocumentDB (open-source, PostgreSQL-based)

active

by DocumentDB project (Linux Foundation; originated at Microsoft) · since 2025 · also known as DocumentDB, pg_documentdb, DocumentDB Linux Foundation

MIT-licensed, MongoDB-compatible document engine built as PostgreSQL extensions, run by the Linux Foundation.

documentvectorspatialdatabase engineopen source (permissive)emerging

Overview

DocumentDB is an open-source document database that stores native BSON inside PostgreSQL through the pg_documentdb_core and pg_documentdb extensions, with a Rust gateway that speaks the MongoDB wire protocol. Microsoft open-sourced it in January 2025 as the engine behind Azure DocumentDB, then donated it to the Linux Foundation in August 2025; its steering committee now includes Microsoft, AWS, Rippling and Yugabyte. Version 1.0, the first GA release, shipped on 19 October 2026 alongside a 1.0 Kubernetes operator. It is the most credible permissively licensed path to MongoDB-compatible storage, and it inherits PostgreSQL's durability and tooling.

Strengths & trade-offs

Strengths

  • +MIT license with vendor-neutral Linux Foundation governance
  • +Works with existing MongoDB drivers and tools such as mongosh and Compass
  • +Runs on stock PostgreSQL 15-18, so backups, replication and monitoring are familiar
  • +Vector search via pgvector and text indexes built in
  • +Backed by several cloud vendors, which makes it a likely common standard

Trade-offs

  • −Very young as a GA product (1.0 in October 2026); compatibility gaps remain
  • −No open-source horizontal sharding yet
  • −Change streams and some admin commands are incomplete
  • −Performance tuning means understanding both PostgreSQL internals and MongoDB semantics

Great for

  • +Self-hosted MongoDB-compatible database without SSPL
  • +Migrating MongoDB apps onto PostgreSQL infrastructure
  • +Document plus vector storage for RAG on Kubernetes
  • +Local development matching Azure DocumentDB

Think twice for

  • −Multi-terabyte write-heavy workloads needing sharding
  • −Apps relying on the newest MongoDB-specific features

Capabilities

Native or official first-party support · 11 of 25 tracked

✓Transactions
✓Joins
✓Secondary indexes
✓Full-text search
✓Vector search
✓Geospatial
✓JSON
✓TTL / expiry
✓Durable persistence
✓Role-based access
✓Online schema changes
–Change data capture
–Triggers
–Stored procedures
–Materialized views
–Pub/Sub
–Columnar storage
–In-memory
–Compression
–Encryption at rest
–Time travel
–Branching
–Streaming ingest
–Offline sync
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Medium · ≤ 10 TB
Horizontal scaling
None
Multi-region
Read replicas
Transactions
Full ACID
Consistency
Strong
Schema
Schemaless
Architecture
Primary replica, Client server
Query languages
MongoDB Query API (MQL), Aggregation pipeline, SQL (via PostgreSQL)

Scales like a single PostgreSQL primary with streaming replicas; the operator handles HA and cross-cluster replication. Transparent sharding exists only in the Azure service today.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

Ecosystem

compatible withMongoDB, PostgreSQL
apis & protocolsMongoDB wire protocol (gateway), PostgreSQL wire protocol
client languagesJava, Python, JavaScript, Go, C#, Rust

Alternatives to DocumentDB (open-source, PostgreSQL-based)

Compare all→
MongoDBDocument80.5

The default document database: flexible BSON documents, rich queries and built-in sharding.

documentdb-postgres vs mongodb →
FerretDBDocument9.5

Apache-licensed MongoDB-protocol proxy that stores data in PostgreSQL with the DocumentDB extension.

documentdb-postgres vs ferretdb →
Azure DocumentDBDocument0.0

Microsoft's managed MongoDB-compatible service, built on the open-source DocumentDB engine.

documentdb-postgres vs azure-documentdb →
Amazon DocumentDBDocument15.7

AWS's managed MongoDB-API database on a proprietary, Aurora-style storage layer.

documentdb-postgres vs amazon-documentdb →
PostgreSQLRelational93.2

The extensible, standards-first open-source relational database.

documentdb-postgres vs postgresql →
Percona Server for MongoDBDocument5.9

Drop-in MongoDB Community build with enterprise features like encryption, LDAP and hot backup.

documentdb-postgres vs percona-server-mongodb →

DocumentDB (open-source, PostgreSQL-based) FAQ

What is DocumentDB (open-source, PostgreSQL-based)?

DocumentDB (open-source, PostgreSQL-based) is a document database by DocumentDB project (Linux Foundation; originated at Microsoft), first released in 2025. DocumentDB is an open-source document database that stores native BSON inside PostgreSQL through the pg_documentdb_core and pg_documentdb extensions, with a Rust gateway that speaks the MongoDB wire protocol. Microsoft open-sourced it in January 2025 as the engine behind Azure DocumentDB, then donated it to the Linux Foundation in August 2025; its steering committee now includes Microsoft, AWS, Rippling and Yugabyte. Version 1.0, the first GA release, shipped on 19 October 2026 alongside a 1.0 Kubernetes operator. It is the most credible permissively licensed path to MongoDB-compatible storage, and it inherits PostgreSQL's durability and tooling.

Is DocumentDB (open-source, PostgreSQL-based) open source?

Yes. DocumentDB (open-source, PostgreSQL-based) is open source. License: MIT License.

Does DocumentDB (open-source, PostgreSQL-based) support ACID transactions?

Yes. DocumentDB (open-source, PostgreSQL-based) supports full ACID transactions, with strong consistency.

Does DocumentDB (open-source, PostgreSQL-based) scale horizontally?

DocumentDB (open-source, PostgreSQL-based) does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at medium scale (≤ 10 TB). It supports cross-region read replicas.

How can I run DocumentDB (open-source, PostgreSQL-based)?

You can self-host it. Managed offerings include Azure DocumentDB.

What is DocumentDB (open-source, PostgreSQL-based) best for?

DocumentDB (open-source, PostgreSQL-based) is a strong fit for self-hosted MongoDB-compatible database without SSPL, migrating MongoDB apps onto PostgreSQL infrastructure and document plus vector storage for RAG on Kubernetes. Think twice for multi-terabyte write-heavy workloads needing sharding.

What are the best alternatives to DocumentDB (open-source, PostgreSQL-based)?

Common alternatives to DocumentDB (open-source, PostgreSQL-based) include MongoDB, FerretDB, Azure DocumentDB, Amazon DocumentDB and PostgreSQL. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

How popular is DocumentDB (open-source, PostgreSQL-based)?

DocumentDB (open-source, PostgreSQL-based) ranks #386 of 844 databases on the WhichDB Score (5.4/100), and #35 among document databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.