Releases · documentdb/documentdb · GitHub
Skip to content

Releases: documentdb/documentdb

v1.0-0 (October 19, 2026)

Choose a tag to compare

@guanzhousongmicrosoft guanzhousongmicrosoft released this 19 Oct 11:38

DocumentDB 1.0 is the first generally available release of DocumentDB.

Learn more at

https://documentdb.io/v1/

and

1.0 release notes

Get started

Install script

On a clean Ubuntu 24.04 or RHEL 9-compatible host (amd64 or arm64), the installer sets up the current stable release from the documentdb.io package repository:

curl -fsSLo documentdb-install.sh https://github.com/documentdb/documentdb/releases/download/v1.0-0/install.sh &&
sudo sh documentdb-install.sh

Packages

Packages 1.0.0 (SQL extension 1.0-0) for PostgreSQL 17/18 on Ubuntu 24.04 and RHEL 9-compatible systems, amd64 and arm64. Download and verify this release's files:

gh release download v1.0-0 -R documentdb/documentdb -D documentdb-1.0 &&
  (cd documentdb-1.0 && sha256sum -c SHA256SUMS)

See the package guide.

Containers

Images for PostgreSQL 15-18 at ghcr.io/documentdb/documentdb/documentdb-local, tagged pg15-1.0.0 through pg18-1.0.0; latest is pg17-1.0.0.

docker run -dt -p 10260:10260 --name documentdb \
  -e USERNAME=<YOUR_USERNAME> -e PASSWORD=<YOUR_PASSWORD> \
  ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0.0

The image sends usage telemetry by default; see PRIVACY.md to turn it off.

Also 1.0

Changes since 0.117

  • Add usage telemetry to the documentdb-local image, on by default. It reports the image version, platform and CPU architecture to Scarf at startup and hourly; Scarf also sees the source IP address. Turn it off with DOCUMENTDB_USAGE_TELEMETRY=false, NO_ANALYTICS=1, DO_NOT_TRACK=1 or --disable-usage-telemetry. Native packages are unaffected. See PRIVACY.md. [Feature]
  • Release executable memory allocated for PCRE2 JIT-compiled regular expressions when their memory context resets. [Bugfix]
  • Prevent RUM vacuum from processing internal entry-tree and posting-tree roots as leaf pages after concurrent root splits. [Bugfix]
  • Restore vacuum cost delays and interrupt handling between RUM posting-tree leaf pages. [Bugfix]
  • Keep background index callers waiting after retryable failures, and report an error only after the request becomes terminal. [Bugfix]
  • Promote overflowing 64-bit integer intermediate products to double in covariance and standard-deviation accumulators instead of reporting an internal calculation error. [Bugfix]
  • Fix a backend crash when $getField, $setField or $unsetField were given an input document that constant-folds to a system variable, such as { "$redact": { "$getField": { "field": "f", "input": { "f": "$$PRUNE" } } } }. The parse-time null-check evaluated the input without a lifetime tracker, so materializing a non-inline result dereferenced a null pointer and terminated the backend. [Bugfix]
  • Fix a lock-upgrade deadlock between two overlapping non-concurrent dropIndexes on the same collection by acquiring the final AccessExclusiveLock on the collection table up front instead of upgrading from AccessShareLock. [Bugfix]
  • Fix $near, $nearSphere and $geoNear failing with an internal wrong-order error on a 2dsphere index. The index bound is derived from bounding boxes while the ordering is rechecked with an exact spherical distance, and the two disagree by a sub-micrometre amount for locations that are nearly coincident or that use longitude -180, which violated the ordering guarantee the scan relies on. The index bound now carries a small allowance so it stays a true lower bound. [Bugfix]
  • Allow collMod to convert an eligible existing single-field index into a TTL index when selected by name or key pattern. [Bugfix]
  • Allow nested $lookup stages to run after the parent equality join so enrichment applies only to matched foreign documents. Guarded by the default-off documentdb.force_nested_lookup_pipeline_after_join setting; unsupported query shapes may fail when it is enabled. [Perf]
  • Support collation with the $stdDevPop, $stdDevSamp, $median and $percentile $group accumulators. They only do arithmetic, so the collation is applied when their input expression is evaluated. [Feature]
  • Prevent index-only scans on collated indexes for all field-consuming projection and aggregation targets, while preserving them for constant-only targets such as $count. [Bugfix]
  • Enable targeted posting-tree pruning by default so vacuum takes brief posting-tree root cleanup locks for individual deletion attempts instead of holding one root lock across an entire pruning traversal. [Perf]
  • Enable RUM empty entry-leaf page pruning (documentdb_rum.prune_rum_empty_pages) by default. [Perf]
  • Apply collation to the symbol BSON type, so symbols compare and hash like the equivalent string under the active collation. [Feature]
  • Fix collation-aware hashing and index term generation for code with scope. [Bugfix]
  • Support collation with count command [Feature]
  • Persist and manage custom roles through the data plane: createRole/dropRole/rolesInfo are backed by the roles catalog (keyed by role name). Guarded by documentdb.enableRoleCrud feature flag, disabled by default. [Feature]
  • Report compact's bytesFreed as the measured reduction in on-disk size across the VACUUM instead of a statistics-based bloat estimate, and stop running the expensive bloat estimate query when no freeSpaceTargetMB was requested. [Bugfix/Perf]
  • Fix an internal error for $group over a $sort whose trailing key opposes the composite index direction. Guarded by the default-on documentdb.enable_skip_setting_order_scan_direction_for_full_scan_expr setting. [Bugfix]
  • Fix a gateway panic when the system connection budget exceeds the configured maximum connections. [Bugfix]
  • Fall back to a logical posting-tree sweep when inline RUM vacuum observes a concurrent root split, ensuring dead TIDs are removed from leaves allocated behind the disk-order cursor. [Bugfix]
  • Run the permission check for find and aggregate with batchSize: 0, which returned a cursor on collections the caller could not read. [Bugfix/Security]
  • Fix a crash or wrong results in the no-sort $firstN/$lastN accumulators when a value's size is a multiple of 64 bytes. [Bugfix]
  • Prevent a backend crash by rejecting $documents directly inside a $facet sub-pipeline. [Bugfix]
  • Enforce $facet restrictions on $collStats, $facet, $geoNear, $indexStats, and $planCacheStats in nested $lookup and $unionWith pipelines while preserving parent-stage validation and valid collectionless pipelines. [Bugfix]
  • Keep ordered RUM scans reading a posting tree past a singleton leaf so visible matches in later leaves are not skipped. [Bugfix]
  • Fix ordered scalar-array ($in) index scans across multiple unsatisfiable ranges. Guarded by the default-on documentdb.enable_ordered_saop_multi_range_skip_advance setting. [Bugfix]
  • Exit the gateway with an error instead of panicking when PostgreSQL is unreachable at startup, and stop the background-worker gateway instead of leaving it idle. [Bugfix]
  • Preserve UTF-8 string boundaries in trim expressions and string-to-binData conversions. [Bugfix]
  • Return retryable or specific error codes from the gateway for backend connection, transport, and pool failures and for malformed legacy wire-protocol requests instead of InternalError. [Bugfix]
  • Require insert and/or update permission on a $merge or $out target collection according to the stage's configured actions, instead of only read permission, so a read-only user can no longer write through these stages. [Bugfix/Security]
  • Limit result string size for $concat. [Bugfix]
  • Write the same generated _id to the document and its stored object ID in $merge/$out, so inserted documents without _id are found by _id lookups. Guarded by the default-on documentdb.enable_merge_generated_id_consistency setting. [Bugfix]
  • Harden ordered RUM index scans against an emptied leftmost posting-tree leaf and set the recheck flag on the correct bound. [Bugfix]
  • Apply find, count, and distinct command stages after a view's terminal aggregation stage, preventing grouped views from producing invalid aggregate plans. [Bugfix]
  • Fix a one-byte heap overflow when parsing a bsonsequence from JSON. [Bugfix]
  • Reject non-string values resolved by $meta before accessing string data. [Bugfix]
  • Reject passwords that fail SASLprep in createUser and updateUser before creating or changing native users. [Bugfix] (#765)

Blog posts

v1.0-RC2

v1.0-RC2 Pre-release
Pre-release

Choose a tag to compare

@guanzhousongmicrosoft guanzhousongmicrosoft released this 09 Oct 23:33

Changelog

  • Add anonymous usage telemetry to the documentdb-local image, on by default. It reports only the image version, platform and CPU architecture at startup and hourly. Turn it off with DOCUMENTDB_USAGE_TELEMETRY=false, NO_ANALYTICS=1, DO_NOT_TRACK=1 or --disable-usage-telemetry. Native packages are unaffected. See documentdb-local/PRIVACY.md. [Feature]
  • Release executable memory allocated for PCRE2 JIT-compiled regular expressions when their memory context resets. [Bugfix] (work item 5530914)
  • Prevent RUM vacuum from processing internal entry-tree and posting-tree roots as leaf pages after concurrent root splits. [Bugfix]
  • Restore vacuum cost delays and interrupt handling between RUM posting-tree leaf pages. [Bugfix]
  • Keep background index callers waiting after retryable failures, and report an error only after the request becomes terminal. [Bugfix]
  • Promote overflowing 64-bit integer intermediate products to double in covariance and standard-deviation accumulators instead of reporting an internal calculation error. [Bugfix]
  • Fix a backend crash when $getField, $setField or $unsetField were given an input document that constant-folds to a system variable, such as { "$redact": { "$getField": { "field": "f", "input": { "f": "$$PRUNE" } } } }. The parse-time null-check evaluated the input without a lifetime tracker, so materializing a non-inline result dereferenced a null pointer and terminated the backend. [Bugfix]
  • Fix a lock-upgrade deadlock between two overlapping non-concurrent dropIndexes on the same collection by acquiring the final AccessExclusiveLock on the collection table up front instead of upgrading from AccessShareLock. [Bugfix]
  • Fix $near, $nearSphere and $geoNear failing with an internal wrong-order error on a 2dsphere index. The index bound is derived from bounding boxes while the ordering is rechecked with an exact spherical distance, and the two disagree by a sub-micrometre amount for locations that are nearly coincident or that use longitude -180, which violated the ordering guarantee the scan relies on. The index bound now carries a small allowance so it stays a true lower bound. [Bugfix]
  • Allow collMod to convert an eligible existing single-field index into a TTL index when selected by name or key pattern. [Bugfix]
  • Allow nested $lookup stages to run after the parent equality join so enrichment applies only to matched foreign documents. Guarded by the default-off documentdb.force_nested_lookup_pipeline_after_join setting; unsupported query shapes may fail when it is enabled. [Perf]
  • Support collation with the $stdDevPop, $stdDevSamp, $median and $percentile $group accumulators. They only do arithmetic, so the collation is applied when their input expression is evaluated. [Feature]
  • Prevent index-only scans on collated indexes for all field-consuming projection and aggregation targets, while preserving them for constant-only targets such as $count. [Bugfix]
  • Enable targeted posting-tree pruning by default so vacuum takes brief posting-tree root cleanup locks for individual deletion attempts instead of holding one root lock across an entire pruning traversal. [Perf]
  • Enable RUM empty entry-leaf page pruning (documentdb_rum.prune_rum_empty_pages) by default. [Perf]
  • Apply collation to the symbol BSON type, so symbols compare and hash like the equivalent string under the active collation. [Feature]
  • Fix collation-aware hashing and index term generation for code with scope. [Bugfix]
  • Support collation with count command [Feature]
  • Persist and manage custom roles through the data plane: createRole/dropRole/rolesInfo are backed by the roles catalog (keyed by role name). Guarded by documentdb.enableRoleCrud feature flag, disabled by default. [Feature]
  • Report compact's bytesFreed as the measured reduction in on-disk size across the VACUUM instead of a statistics-based bloat estimate, and stop running the expensive bloat estimate query when no freeSpaceTargetMB was requested. [Bugfix/Perf]
  • Fix an internal error for $group over a $sort whose trailing key opposes the composite index direction. Guarded by the default-on documentdb.enable_skip_setting_order_scan_direction_for_full_scan_expr setting. [Bugfix]
  • Fix a gateway panic when the system connection budget exceeds the configured maximum connections. [Bugfix]
  • Fall back to a logical posting-tree sweep when inline RUM vacuum observes a concurrent root split, ensuring dead TIDs are removed from leaves allocated behind the disk-order cursor. [Bugfix]
  • Run the permission check for find and aggregate with batchSize: 0, which returned a cursor on collections the caller could not read. [Bugfix/Security]
  • Fix a crash or wrong results in the no-sort $firstN/$lastN accumulators when a value's size is a multiple of 64 bytes. [Bugfix]
  • Prevent a backend crash by rejecting $documents directly inside a $facet sub-pipeline. [Bugfix]
  • Enforce $facet restrictions on $collStats, $facet, $geoNear, $indexStats, and $planCacheStats in nested $lookup and $unionWith pipelines while preserving parent-stage validation and valid collectionless pipelines. [Bugfix]
  • Keep ordered RUM scans reading a posting tree past a singleton leaf so visible matches in later leaves are not skipped. [Bugfix]
  • Fix ordered scalar-array ($in) index scans across multiple unsatisfiable ranges. Guarded by the default-on documentdb.enable_ordered_saop_multi_range_skip_advance setting. [Bugfix]
  • Exit the gateway with an error instead of panicking when PostgreSQL is unreachable at startup, and stop the background-worker gateway instead of leaving it idle. [Bugfix]
  • Preserve UTF-8 string boundaries in trim expressions and string-to-binData conversions. [Bugfix]
  • Return retryable or specific error codes from the gateway for backend connection, transport, and pool failures and for malformed legacy wire-protocol requests instead of InternalError. [Bugfix]
  • Require insert and/or update permission on a $merge or $out target collection according to the stage's configured actions, instead of only read permission, so a read-only user can no longer write through these stages. [Bugfix/Security]
  • Limit result string size for $concat. [Bugfix]
  • Write the same generated _id to the document and its stored object ID in $merge/$out, so inserted documents without _id are found by _id lookups. Guarded by the default-on documentdb.enable_merge_generated_id_consistency setting. [Bugfix]
  • Harden ordered RUM index scans against an emptied leftmost posting-tree leaf and set the recheck flag on the correct bound. [Bugfix]
  • Apply find, count, and distinct command stages after a view's terminal aggregation stage, preventing grouped views from producing invalid aggregate plans. [Bugfix]
  • Fix a one-byte heap overflow when parsing a bsonsequence from JSON. [Bugfix]
  • Reject non-string values resolved by $meta before accessing string data. [Bugfix]
  • Reject passwords that fail SASLprep in createUser and updateUser before creating or changing native users. [Bugfix] (#765)

How to use

Packages

Version 1.0~rc2: 22 files for PostgreSQL 17/18 on Ubuntu 24.04 and RHEL/Rocky 9, amd64 and arm64. On a clean host, enable PGDG (plus EPEL and CRB on RHEL), install the five packages for your PostgreSQL major in one apt install or dnf install, then run documentdb-setup.

base=https://github.com/documentdb/documentdb/releases/download/v1.0-RC2
mkdir pkgs && cd pkgs && curl -fsSLO "$base/SHA256SUMS"
awk '{print $2}' SHA256SUMS | while read -r f; do curl -fsSLO "$base/$f"; done
sha256sum -c SHA256SUMS

Or let the installer do it on a clean host:

curl -fsSLo documentdb-install.sh https://github.com/documentdb/documentdb/releases/download/v1.0-RC2/install.sh &&
sudo sh documentdb-install.sh --version v1.0-RC2

See the package guide.

Containers

Images for PostgreSQL 15-18, tagged pg15-1.0-rc2 through pg18-1.0-rc2:

docker pull ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0-rc2
docker run -dt -p 10260:10260 --name documentdb-rc2 \
  ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0-rc2 \
  --username <YOUR_USERNAME> --password <YOUR_PASSWORD>

Connect with mongodb://<YOUR_USERNAME>:<YOUR_PASSWORD>@localhost:10260/?tls=true&tlsAllowInvalidCertificates=true. The image sends anonymous usage telemetry by default; add -e DOCUMENTDB_USAGE_TELEMETRY=false to turn it off.

v1.0-RC1

v1.0-RC1 Pre-release
Pre-release

Choose a tag to compare

@guanzhousongmicrosoft guanzhousongmicrosoft released this 28 Sep 20:58

DocumentDB v1.0-RC1

First release candidate for DocumentDB 1.0. Please try it and report issues before 1.0 ships.

Rebuilt on October 2, 2026. Packages are now version 1.0~rc1 and images are tagged pgNN-1.0-rc1. If dpkg-query -W '*documentdb*' or rpm -qa '*documentdb*' shows 1.0.0, or you pulled a pgNN-1.0.0-rc1 image, you have the September 28 build; start again on a fresh host or volume.

For testing only. Don't use it in production or for data you need to keep. Fixes go into the next release candidate or 1.0, not into RC1; expect an RC2. Upgrades from 0.117 to an RC, between release candidates, or from an RC to 1.0 aren't supported, so use a fresh instance each time. The package repository, the latest image and GitHub's latest release stay on v0.117-0.

There is no date for 1.0 yet. A release candidate is meant to be close to what 1.0 ships, apart from fixes found during testing; 1.0 follows once the release candidates stop turning up blocking issues. The upgrade and support policy from 1.0 onward will be published with the final release.

Changes since v0.117-0

  • Fixed crashes in no-sort $firstN/$lastN and in $getField/$setField/$unsetField, int64 overflow in statistical accumulators, ordered RUM scans skipping matches, $near/$geoNear ordering errors on 2dsphere, a dropIndexes deadlock, a PCRE2 JIT memory leak and a gateway panic in pool sizing.
  • Collation now works with count, $stdDevPop, $stdDevSamp, $median, $percentile, symbols and code with scope. Collation is still behind documentdb_core.enableCollation, which is off by default; until you turn it on, requests with a collation fail with "not supported".
  • Targeted RUM posting-tree pruning and empty-leaf pruning are on by default.
  • Custom roles are now persisted in a roles catalog (createRole, dropRole, rolesInfo), still behind documentdb.enableRoleCrud, which stays off by default. Nested $lookup after the parent join is new and off by default (documentdb.force_nested_lookup_pipeline_after_join).
  • New install.sh sets up clean Ubuntu 24.04 and EL9 hosts. By default it installs the stable release from the package repository; --version v1.0-RC1 installs this RC from the release assets instead.
  • documentdb-local refuses to start on a stale postmaster.pid instead of removing it (set DOCUMENTDB_FORCE_REMOVE_STALE_POSTMASTER_PID=true once to recover), keeps the admin password out of process arguments and logs, adds --toast-compression (default lz4), and treats --disable-extended-rum as deprecated.

Full list in the tagged changelog.

Known issues in RC1

  • documentdb-local: an error in an --init-data-path script is logged but does not stop startup. The container still reports success and marks the volume as initialized. Check docker logs after the first start; after fixing the script, start from a new volume. Fixed in the next release candidate.

Compatibility

The extension version is 1.0-0. Upgrading from 0.117 isn't supported; use a clean host.

Extended RUM is still required: on extension-only installs, create documentdb_extended_rum as well as documentdb, since CASCADE doesn't. The documentdb meta package selects PostgreSQL 18; for PG17 install documentdb-17 instead.

Try it

Packages, version 1.0~rc1 so that 1.0 sorts above them: 22 files for PostgreSQL 17/18 on Ubuntu 24.04 and RHEL/Rocky 9, amd64 and arm64. On a clean host, enable PGDG (plus EPEL and CRB on RHEL), install the five packages for your PostgreSQL major in one apt install or dnf install, then run documentdb-setup.

base=https://github.com/documentdb/documentdb/releases/download/v1.0-RC1
mkdir pkgs && cd pkgs && curl -fsSLO "$base/SHA256SUMS"
awk '{print $2}' SHA256SUMS | while read -r f; do curl -fsSLO "$base/$f"; done
sha256sum -c SHA256SUMS

Or let the installer do it. Without --version it installs v0.117-0 from the documentdb.io repository:

curl -fsSLo documentdb-install.sh https://documentdb.io/install.sh &&
sudo sh documentdb-install.sh --version v1.0-RC1

Container images for PostgreSQL 15-18, tagged pg15-1.0-rc1 through pg18-1.0-rc1:

docker pull ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0-rc1

Guides: Try the 1.0 release candidate | Package guide

v0.117-0 (September 10, 2026)

Choose a tag to compare

@guanzhousongmicrosoft guanzhousongmicrosoft released this 10 Sep 02:11

DocumentDB v0.117-0

This release improves aggregation correctness, collation support, query planning, and RUM index maintenance. Several query optimizations remain feature-flagged. Review the compatibility notes before deploying, especially for extension-only PostgreSQL installations.

Downloads and quick start

Changes

  • _id selectivity: Estimate range and prefix filters as a merged range. Requires suitable schema operators and per-collection statistics or enableBsonSelectivityFromBtreeStats.
  • Parallel aggregation: Fix crashes with the with-expression $min, $max, $first, and $last accumulators in parallel partial-aggregation plans.
  • $mergeObjects: Ignore null and missing inputs; return an empty object when a group has no object inputs.
  • RUM vacuum: Reclaim already-empty posting-tree leaf pages missed by earlier vacuum cycles, across the existing vacuum paths.
  • $push: Preserve the full 64-bit range of $slice and $position, avoiding overflow and invalid array bounds.
  • Pipeline correctness: Fix nested geospatial predicates and prevent output stages from writing root-pruned documents.
  • Command validation: Clamp numeric options to prevent metadata constraint violations in collMod and divide-by-zero failures in $collStats.
  • Parallel RUM scans: Preserve remaining entries on worker-owned pages and apply scalar-array skip bounds without bypassing shared page assignment.
  • RUM split safety: Prevent vacuum from deleting either half of an incomplete split before its parent downlink is installed.
  • Scalar $group: Add index scans for aggregates with a constant _id. documentdb.enable_scalar_aggregate_index_pushdown is off by default; accumulator path collection is independently controlled by documentdb.enable_scalar_aggregate_accumulator_path_collection.
  • RUM default: Set documentdb.rum_library_load_option to require_documentdb_extended_rum on all supported PostgreSQL versions.
  • $unwind planning: Extend projection pruning to pipelines with multiple $unwind stages, still guarded by enableProjectPushUpBeforeUnwindWithGroup.
  • Composite indexes: Prefer leading-equality $elemMatch owners when choosing reduced-correlated bounds. Non-equality first-owner fallback remains off by default, controlled by documentdb.enable_composite_reduced_correlated_first_owner_fallback.
  • Collated expressions: Make $max, $min, $maxN, and $minN collation-aware and correct equal-value selection for $maxN/$minN.
  • Collated grouping: Support collation for $group keys.
  • Collated index-only scans: Prevent projected queries from returning shared collation-equivalent index values instead of each row's stored values.
  • Gateway observability: Make telemetry and metrics provider-neutral.
  • Sample Data New sample data set.

See the tagged changelog for implementation details and additional flag context.

Compatibility and upgrades

Extended RUM is now required by default on every supported PostgreSQL major. For manual extension-only installations, create documentdb_extended_rum as well as documentdb; CREATE EXTENSION documentdb CASCADE does not create it. The setup wizard handles this for managed installations. Setting documentdb.rum_library_load_option to none remains an opt-out.

Pre-GA upgrade policy: In-place package upgrades from earlier releases are not supported yet. Use a clean host for a fresh installation. Removing packages preserves database files; reinstalling them is not a data reset.

The documentdb meta package selects PostgreSQL 18. To install PG17, choose documentdb-17 and omit the meta package. Native gateway setup requires PG16 or newer; native PG15 packages are extension-only.

Downloads and quick start

Packages: Release assets | SHA256SUMS | Package inventory

The 22 attached packages cover PostgreSQL 17/18, Ubuntu 24.04 (DEB), and RHEL/Rocky 9 (RPM), on amd64/arm64. Download and verify the exact release:

gh release download v0.117-0 -R documentdb/documentdb -D pkgs \
  && cd pkgs \
  && sha256sum -c SHA256SUMS

Install only the matching platform and PostgreSQL package set together in one apt or dnf transaction. PostgreSQL and third-party dependencies are not included in these assets. Repository publication may follow the GitHub release; attached assets identify this exact build. Draft assets require authorized repository access until publication.

Containers: Official images support PostgreSQL 15-18 on linux/amd64 and linux/arm64. Use a versioned tag rather than floating latest:

docker pull ghcr.io/documentdb/documentdb/documentdb-local:pg17-0.117.0

Replace pg17 with pg15, pg16, or pg18 as needed. Docker selects the host architecture automatically. Use this versioned image when following the container quick start.

Setup guides: Linux quick start | Package Finder | Versioned package guide | Container quick start

These guides cover prerequisites, complete install commands, authentication, persistent storage, optional sample data, and day-2 operations.

v0.116-0 (August 20, 2026)

Choose a tag to compare

@guanzhousongmicrosoft guanzhousongmicrosoft released this 24 Aug 16:36

documentdb v0.116-0 (August 20, 2026)

  • This release also includes the changes prepared for v0.115-0. The v0.115-0 release itself was skipped.
  • Rename the $sample EXPLAIN metric Sample Heap Skips to Sample Heap Fetches. [Refactor]
  • Enable pushing suffix sort keys into the accumulator in $sortGroup when group-by keys form a non-dotted prefix of the sort keys by default (enableSortPushToAccumulatorWithPrefix). [Perf]
  • Fix $sample size coercion and validation to be wire protocol compatible. [Bugfix]
  • Harden feature-flagged RUM empty entry-leaf page pruning (documentdb_rum.prune_rum_empty_pages): revalidate that the left/right siblings still bracket the target after re-locking (a concurrent left-sibling split could otherwise drop pages from the leaf chain), zero the retained high-key tuple's posting-tree pointer as intended, and acquire posting-tree root cleanup locks conditionally up front instead of blocking while holding sibling/parent/target locks. [Bugfix]
  • Stream $group aggregations under dynamic cursors when the group keys can be provided in order by an index (sorted GroupAggregate over an ordered index scan), instead of falling back to a persistent cursor. Guarded by documentdb.enable_group_by_dynamic_streaming feature flag, enabled by default while pending stabilization. [Perf]
  • Push safe indexed $elemMatch conditions into reduced-correlated composite scans and prune cross-element bounds during planning, aligning index costing with execution. Guarded by documentdb.enable_composite_reduced_correlated_bounds_planning. [Bugfix/Perf]
  • Reject parallel arrays on metadata-backed composite indexes by default for compatible compound-index semantics. Guarded by documentdb.enable_failure_on_parallel_index_arrays_for_metadata_tracking. [Bugfix]
  • Fix per-path multikey metadata so an array ancestor marks every indexed descendant, including fields absent from the document. [Bugfix]
  • Support the enum keyword in $jsonSchema validators, requiring a value to equal one of the listed allowed values, both at the top level and for individual properties. [Feature]
  • Support the oneOf keyword in $jsonSchema validators, matching the documented semantics where a value must validate against exactly one of the listed subschemas, both at the top level and for individual properties. [Feature]
  • Fix the gateway tearing down warm PostgreSQL connection pools: idle-pool cleanup evicted pools that were still serving requests (the last-used timestamp was written in seconds but compared as nanoseconds), and every authentication rebuilt the user's pool from scratch. A user's pool is now reused across re-authentication while the credential is unchanged, and replaced when it rotates. [Bugfix/Perf]

📦 Packages

This is the first release built on the redesigned Linux packaging system — a multi-package layout with a documentdb-setup wizard and systemd integration, replacing the single per-PostgreSQL-major extension package shipped previously. Paved-road default: Ubuntu 24.04 LTS + PostgreSQL 18.

Package Role
documentdb (meta) + documentdb-N Full stand-alone install. Pins PostgreSQL major N + its extension and owns the systemd lifecycle. The meta package pins PG 18.
postgresql-N-documentdb The extension for PostgreSQL major N (files only).
documentdb-gateway Wire-protocol runtime (binary + systemd unit).
documentdb-postgresql-tools Admin helpers: documentdb-tune, documentdb-createcluster, documentdb-register-gateway, documentdb-gateway-admin.
documentdb-common Shared, PG-agnostic payload: documentdb-setup, systemd template units, sysusers.d/tmpfiles.d drop-ins, helper scripts, sample data.

Install

Recommended — install from the package repository. The apt/dnf repositories are live, so the package manager resolves the dependency graph for you:

sudo apt install documentdb-18     # or: sudo dnf install documentdb-18

That single line needs the DocumentDB repository (and PGDG, plus EPEL/CRB on RHEL) configured first. documentdb.io → Linux Packages Quick Start carries the full copy-paste command for every distribution, architecture and PostgreSQL major, and the Package Finder generates it interactively. Those pages are kept current; prefer them over the asset instructions below, which are frozen at this release.

The documentdb meta package is equivalent to documentdb-18.


The rest of this section covers installing from these release assets instead — to pin this exact build, or on a host without repository access.

Truly air-gapped? The release assets alone are not enough: DocumentDB also needs PostgreSQL, pg_cron, pgvector and PostGIS from PGDG, which are not published here. See Offline / air-gapped install for staging the full dependency closure on a connected machine and serving it to the target as a local repository — which also restores a single-command install on the target.

1. Prerequisites

Commands are written for a normal host where you use sudo. In a container running as
root, drop the sudo prefix. On a fresh machine run apt-get update (or dnf makecache)
first.

Debian / Ubuntu — enable the PGDG apt repository

documentdb depends on postgresql-18 (and postgresql-18-cron / -pgvector / -postgis-3), which are not in Ubuntu 24.04's default sources.

sudo apt-get update
sudo apt-get install -y curl ca-certificates gnupg lsb-release
sudo install -d /usr/share/postgresql-common/pgdg
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc \
  | sudo gpg --dearmor -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.gpg
echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.gpg] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" \
  | sudo tee /etc/apt/sources.list.d/pgdg.list
sudo apt-get update
RHEL / Rocky / AlmaLinux 9 — enable PGDG + EPEL + CRB (#75)

CRB is disabled by default but required: postgis36_N pulls in gdal*-libs, which needs libqhull_r.so.7, and that library ships only in CRB. Without it dnf install fails with a wall of GDAL candidate lines that never name the missing repository.

sudo dnf install -y dnf-plugins-core
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo dnf install -y epel-release
# Rocky Linux / AlmaLinux / CentOS Stream:
sudo dnf config-manager --set-enabled crb
# Subscribed Red Hat Enterprise Linux has no 'crb' repo id. Use instead:
#   sudo subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms
sudo dnf -qy module disable postgresql

On EL8 replace EL-9 with EL-8 in the PGDG URL and use --set-enabled powertools; on arm64 replace x86_64 with aarch64.

2. Download and verify

gh release download v0.116-0 -R documentdb/documentdb -D pkgs && cd pkgs && sha256sum -c SHA256SUMS

Needs the GitHub CLI, authenticated. Without it, download the assets
from the release page above into a pkgs/ directory and run sha256sum -c SHA256SUMS there.

This fetches all 22 packages — every PostgreSQL major, both architectures, DEB and RPM. Install only the subset for your platform, below.

3. Install

The packages depend on each other, and apt/dnf resolve dependencies only from repository indexes — a dependency on a bare local file is unresolvable — so pass the whole set to one command. Installing the meta package alone fails with Depends: documentdb-18 ... but it is not installable. (Installing from the repository above avoids this entirely.)

Ubuntu 24.04 · PostgreSQL 18 · amd64 (for arm64 swap amd64→arm64; for PG 17 swap 18→17):

sudo apt install ./ubuntu24.04-documentdb_0.116.0_all.deb \
                 ./ubuntu24.04-documentdb-18_0.116.0_all.deb \
                 ./ubuntu24.04-documentdb-common_0.116.0_all.deb \
                 ./ubuntu24.04-documentdb-postgresql-tools_0.116.0_all.deb \
                 ./ubuntu24.04-documentdb-gateway_0.116.0_amd64.deb \
                 ./ubuntu24.04-postgresql-18-documentdb_0.116-0_amd64.deb

RHEL / Rocky / Alma 9 · PostgreSQL 18 · x86_64 (for arm64 swap x86_64→aarch64):

sudo dnf install ./documentdb-0.116.0-1.noarch.rpm \
                 ./documentdb-18-0.116.0-1.noarch.rpm \
                 ./documentdb-common-0.116.0-1.noarch.rpm \
                 ./documentdb-postgresql-tools-0.116.0-1.noarch.rpm \
                 ./documentdb-gateway-0.116.0-1.el9.x86_64.rpm \
                 ./rhel9-postgresql18-documentdb-0.116.0-1.el9.x86_64.rpm

The ubuntu24.04- / rhel9- filename prefixes are not part of the package name. Note the two version grammars: on DEB the extension keeps the control-file form 0.116-0 while every other package uses 0.116.0; on RPM everything is 0.116.0 (the extension's -0 becomes the RPM release field, giving 0.116.0-1).

4. Set up and connect

# Runs initdb / CREATE EXTENSION / admin bootstrap, then starts the gateway and
# enables documentdb-local.target so the stack survives reboot (on hosts with
# systemd; see Day 2 below). Add --admin-password-file <file> (or
# --admin-password-stdin) and --yes for an unattended install.
sudo documentdb-setup --admin-user admin

# Connect. mongosh is not shipped by these packages: https://www.mongodb.com/docs/mongod...
Read more

v0.114-0 (July 16, 2026)

Choose a tag to compare

@guanzhousongmicrosoft guanzhousongmicrosoft released this 17 Jul 17:06

Important:

The community noticed a regression where active connections are closed after tow hours (see #690 for more details and a fix). We recommend not to update if your workloads runs longer than two hours and instead wait for a new version with the fix.

documentdb v0.114-0 (July 16, 2026)

  • Emit a btree REUSE_PAGE WAL marker before a RUM page is reused from the FSM, so streaming standbys resolve recovery conflicts before the page contents are overwritten. Mirrors nbtree's _bt_allocbuf behavior. Guarded by documentdb_rum.enable_emit_reuse_page_on_recycle feature flag, disabled by default while pending stabilization. [Perf]
  • Support configuring the gateway via DOCUMENTDB_* environment variables for systemd-managed installs, and add a documentdb-gateway check connectivity-probe subcommand. [Feature]
  • Support non-blocking background unique index build for ordered indexes via CREATE INDEX CONCURRENTLY with post-processing to register exclusion constraints and validate existing rows. Guarded by documentdb.enableNonBlockingUniqueIndexBuild flag, enabled by default. [Feature]
  • Add feature-flagged targeted RUM posting-tree pruning to shorten root cleanup-lock hold time during vacuum. Guarded by enable_targeted_posting_tree_pruning, disabled by default while pending stabilization. [Perf]
  • Fix crash when $natural sort on non-base relations that are already sorted by pipeline. [Bugfix] (#532)
  • Fix schema validation propagation and ensure correct caching of the parsed validator across calls. [Bugfix]
  • Fix $sample TABLESAMPLE optimization not being applied on sharded collections when preceded by an empty filter. Guarded by enableSampleScanFixOnSharded feature flag [Bugfix]
  • Schema Validation: enabled by default.
  • Collation support: https://gist.github.com/xgerman/0d84036a676927a9382785cbffc857af

Docker images

  • ghcr.io/documentdb/documentdb/documentdb-local:pg15-0.114.0 (linux/amd64, linux/arm64) — sha256:b1db442a762493c7dc239d5eb722f077f9a58d32b5be3beb7f705722426317a7

  • ghcr.io/documentdb/documentdb/documentdb-local:pg16-0.114.0 (linux/amd64, linux/arm64) — sha256:df95cd6ba4bbbe709302b56f36aefdbf7a46068c33919370ba00da0cca43daa2

  • ghcr.io/documentdb/documentdb/documentdb-local:pg17-0.114.0 (linux/amd64, linux/arm64) — sha256:8c8a716e27f398b03c397424c4ddd901bddbc22b9f910b17096b0b246c7c9011

  • ghcr.io/documentdb/documentdb/documentdb-local:pg18-0.114.0 (linux/amd64, linux/arm64) — sha256:5efc5c57db90efceea62f1d961fde89347bf2b4abd2b70fbd2dd63f7928ca511

  • ghcr.io/documentdb/documentdb/documentdb-local:latest currently points to the same manifest as pg17-0.114.0.

v0.113-0 (June 22, 2026)

Choose a tag to compare

@guanzhousongmicrosoft guanzhousongmicrosoft released this 22 Jun 19:57

documentdb v0.113-0 (June 22, 2026)

  • Add EnableSortPushToAccumulator GUC to control pushing sort order into accumulator in $sortGroup stage [Perf]
  • Support collation with non-unique ordered indexes with $in and $nin but not with ordered scans. Requires documentdb.EnableCollationWithNonUniqueOrderedIndexes flag to be on. [Feature]
  • Support for pruning dead index entry on ordered TTL indexes. Requires EnableDeadIndexEntryMarkingByTTLTask to be on. [Perf]
  • Enable index-only scan for $group accumulators when all referenced fields are covered by the composite index [Perf]

Docker images

  • ghcr.io/documentdb/documentdb/documentdb-local:pg15-0.113.0 (linux/amd64, linux/arm64) — sha256:2903cafe2c66a399a894ec4a721325308b600ae9a818c824a3209b58d20ba9b8

  • ghcr.io/documentdb/documentdb/documentdb-local:pg16-0.113.0 (linux/amd64, linux/arm64) — sha256:ec523c359688ff358bc8978843208d63b382dbf9984c4bcb17d035f0f5e9f9af

  • ghcr.io/documentdb/documentdb/documentdb-local:pg17-0.113.0 (linux/amd64, linux/arm64) — sha256:02b465efc93cc9f4d6061eefe8485d624ab85c5fa30edd6e23663ff78cdfb376

  • ghcr.io/documentdb/documentdb/documentdb-local:latest currently points to the same manifest as pg17-0.113.0.

v0.112-0 (May 26, 2026)

Choose a tag to compare

@guanzhousongmicrosoft guanzhousongmicrosoft released this 26 May 18:02

documentdb v0.112-0 (May 26, 2026)

  • Removed feature flag documentdb.enableUpdateBsonDocument and dropped legacy composite-returning bson_update_document UDF — all callers now use the scalar update_bson_document UDF
  • Eliminate subquery migration in $group for unsharded and sharded with constant _id aggregation queries. Guarded with EnableGroupSubqueryElimination [Perf]
  • Support collation with non-unique ordered indexes with $lt, $lte. Requires EnableCollationWithNonUniqueOrderedIndexes flag to be on. [Feature]
  • Support index pushdown for $group stage when _id is a multi-field document expression [Perf]
  • Support collation with non-unique ordered indexes with $ne. Requires EnableCollationWithNonUniqueOrderedIndexes flag to be on. [Feature]
  • Support collation with non-unique ordered indexes with $not combined with $gt, $gte, $lt, $lte. Requires EnableCollationWithNonUniqueOrderedIndexes flag to be on. [Feature]
  • Fix crash in BsonOrderFinal and BsonOrderFinalOnSorted when BSONFIRSTN/BSONLASTN aggregates run on empty sharded collections, caused by a NULL datum not being detected before detoasting. Also fix similar crash in bson_maxminn_combine for BSONMAXN/BSONMINN [Bugfix] (#531)
  • Migrate DrainStreamingQuery from SPI cursor-based execution to direct executor invocation via DestReceiver, eliminating Portal/SPI overhead for streaming queries [Perf]
  • Add enableSortPushToAccumulator GUC to control pushing sort order into accumulator in $sortGroup; disabled by default while pending stabilization. [Bugfix]

Docker images

  • ghcr.io/documentdb/documentdb/documentdb-local:pg15-0.112.0 (linux/amd64, linux/arm64) — sha256:e755ec2750ef71c6573fc7f01bd10f4c6cdd4d3d733d865fc402c9c6e7a1a75f

  • ghcr.io/documentdb/documentdb/documentdb-local:pg16-0.112.0 (linux/amd64, linux/arm64) — sha256:a725d97c692640cc5222f9e1efef28a3ae88bc8a907c6945aaec20cbab4bdb8c

  • ghcr.io/documentdb/documentdb/documentdb-local:pg17-0.112.0 (linux/amd64, linux/arm64) — sha256:6aafe73e0d4594655c33b982898de277b58787cce7079bb3c2b69cd93a6353d8

  • ghcr.io/documentdb/documentdb/documentdb-local:latest currently points to the same manifest as pg17-0.112.0.

v0.111-0 (May 11, 2026)

Choose a tag to compare

@guanzhousongmicrosoft guanzhousongmicrosoft released this 11 May 21:13

documentdb v0.111-0 (May 11, 2026)

  • Add feature flag enableCollationWithIndexes to enableCollationWithNonUniqueOrderedIndexes to gate collation support specifically for non-unique ordered/composite indexes. Collation is rejected for other index types/options [Feature]
  • Fix $count:{} accumulator in $group to reject invalid arguments. Guarded by failOnNonEmptyGroupCountArg feature flag [Bugfix]
  • Reject duplicate _id in $group stage. Guarded by failOnGroupIdDuplicate feature flag [Bugfix]
  • Update file modification time in DeserializeFileState to prevent TTL-based cleanup from expiring actively-used cursor files [Bugfix]
  • Improved performance for $first and $last accumulators in $group pipeline stage (no preceding $sort) under flag enableNewWithExprAccumulators. [Perf] (#457)
  • Support $db field in wire protocol command specs for insert, update, delete, findAndModify, createIndexes, dropIndexes, collMod, and background index commands [Feature]
  • Removed feature flag documentdb.enableNowSystemVariable — $$NOW time system variable support is now always enabled
  • Fixes crash that occurs when enableDebugQueryText is enabled and certain commands (e.g., count_query, find_cursor_first_page) operate on queries whose query trees are mutated by the PostgreSQL planner. [Bugfix] (#484)
  • Map PostgreSQL Gather Merge plan node to PARALLEL_SORT_MERGE in explain output [Bugfix]
  • Fix crash in BsonTextGenerateTSQueryCore when $text search contains only stop words or empty string, causing QT2QTN to read past the end of an empty TSQuery [Bugfix]
  • Support collation with $min and $max aggregation $group accumulators. Guarded by EnableNewWithExprAccumulators and EnableCollation
  • Optimize OP_INSERT and refactor opcode parsers
  • Enable index only scan by default and move to the cost estimate function [Feature]
  • Optimize index boundaries for $regex when there is an anchored prefix [Perf]
  • Push $in filters on object_id to the primary key index, during evaluation of a streaming cursor query [Bugfix]
  • Improved performance for $sum and $avg accumulators in $group and $setWindowFields pipeline stages under flag enableNewWithExprAccumulators, with moving window support via inverse transition. (#457)
  • Fix segfault due to use after free in bson_dollar_project_find [Bugfix]
  • Remove unnecessary explicit frees of items allocated on tuple-context [Perf]
  • Add support for ordering by index term order (matching the ordering spec more closely) for both index and runtime. This also makes index and runtime orders match [Bugfix]
  • Support collation with non-unique ordered indexes with $eq, $gt, $gte. Requires EnableCollationWithNonUniqueOrderedIndexes flag to be on. [Feature]
  • Enable collated index pushdown for collation-insensitive operators; avoid pushdown for unsupported operator strategies. [Feature]

Docker images

  • ghcr.io/documentdb/documentdb/documentdb-local:pg15-0.111.0 (linux/amd64, linux/arm64) — sha256:26d49282f80c613789e01bfc5dc010f202e492e74fbd94c90fe21592be3d10c3

  • ghcr.io/documentdb/documentdb/documentdb-local:pg16-0.111.0 (linux/amd64, linux/arm64) — sha256:a9550fb6a83114acca30afe90ada90a200b5d73afaf3ef5a25ecd0812d6251f6

  • ghcr.io/documentdb/documentdb/documentdb-local:pg17-0.111.0 (linux/amd64, linux/arm64) — sha256:bb991c68cb6f7d1f5247a7d1eaacda2e0da6fe2a1bda945821214b23b5ca4eb7

  • ghcr.io/documentdb/documentdb/documentdb-local:latest currently points to the same manifest as pg17-0.111.0.

v0.110-0 (April 22, 2026)

Choose a tag to compare

@guanzhousongmicrosoft guanzhousongmicrosoft released this 24 Apr 16:38

documentdb v0.110-0 (April 22, 2026)

  • Add support for keyword description in $jsonSchema [Feature]
  • Integrate cargo tools to identify dependencies for pg_documentdb_gw [Feature] (#263)
  • Add support for killSessions command [Feature] (#402)
  • Support arbitrary database user and password [Feature] (#306)
  • Improved performance for $max and $min accumulators in $group and $setWindowFields pipeline stages under flag enableNewMinMaxAccumulators.
  • Fix crash in bson_dollar_lookup_project when matched documents array contains NULL elements from LEFT JOIN [Bugfix] (#465)
  • Fix crash in $densify with partitionByFields on shard key due to mismatched sort operators for INT8 partition expression [Bugfix] (#464)
  • Fix crash in shard_collection when implicit collection creation fails and returns NULL [Bugfix] (#462)
  • Fix crash in $let when in expression is a constant [Bugfix] (#463)
  • Support for TTL cron job to repeat deletes in batches until the one minute budget is exhausted, instead of deleting one batch per index per minute.[Perf]
  • Crash fix when zero rows reach $first/$last/$firstN/$lastN accumulators in $group stage with no $sort [Bugfix]. (#466)

Docker images

  • ghcr.io/documentdb/documentdb/documentdb-local:pg15-0.110.0 (linux/amd64, linux/arm64) — sha256:ee2f6b4b43c182c26b91ecee1f2810bd589a8177f2b30f11c92ab371b5be3982

  • ghcr.io/documentdb/documentdb/documentdb-local:pg16-0.110.0 (linux/amd64, linux/arm64) — sha256:4eabd2249df5e619d7141d416ccf9f50f1daa1bf5f68eb2a9311f44ba2553ca1

  • ghcr.io/documentdb/documentdb/documentdb-local:pg17-0.110.0 (linux/amd64, linux/arm64) — sha256:90e32f5f5c29147b1c9644986d355a6921da2ff468a09f93a32cbb22472bd14c

  • ghcr.io/documentdb/documentdb/documentdb-local:latest currently points to the same manifest as pg17-0.110.0.