documentdb
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
documentdb | 0.114 | SIM | MIT | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 9000 | documentdb | No | Yes | Yes | Yes | No | No | - |
| 9010 | documentdb_core | No | Yes | Yes | Yes | No | No | - |
| 9020 | documentdb_distributed | No | Yes | Yes | Yes | No | No | - |
| 9030 | documentdb_extended_rum | No | Yes | Yes | Yes | No | Yes | - |
| Related | documentdb_core pg_cron postgis tsm_system_rows vector mongo_fdw wal2mongo pg_jsonschema jsquery |
|---|---|
| Depended By | documentdb_distributed documentdb_extended_rum |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.114 | 1817161514 | documentdb | documentdb_core, pg_cron, postgis, tsm_system_rows, vector |
| RPM | PIGSTY | 0.114 | 1817161514 | documentdb_$v | postgresql$v-contrib, pg_cron_$v, pgvector_$v, rum_$v, postgis36_$v |
| DEB | PIGSTY | 0.114 | 1817161514 | postgresql-$v-documentdb | postgresql-$v-cron, postgresql-$v-pgvector, postgresql-$v-rum, postgresql-$v-postgis-3 |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.114 el8.x86_64.pg18 : documentdb_18 documentdb_18-0.114-0PIGSTY.el8.x86_64.rpm
| PIGSTY 0.114 el8.x86_64.pg17 : documentdb_17 documentdb_17-0.114-0PIGSTY.el8.x86_64.rpm
| PIGSTY 0.114 el8.x86_64.pg16 : documentdb_16 documentdb_16-0.114-0PIGSTY.el8.x86_64.rpm
| PIGSTY 0.114 el8.x86_64.pg15 : documentdb_15 documentdb_15-0.114-0PIGSTY.el8.x86_64.rpm
| N/A |
| el8.aarch64 | PIGSTY 0.114 el8.aarch64.pg18 : documentdb_18 documentdb_18-0.114-0PIGSTY.el8.aarch64.rpm
| PIGSTY 0.114 el8.aarch64.pg17 : documentdb_17 documentdb_17-0.114-0PIGSTY.el8.aarch64.rpm
| PIGSTY 0.114 el8.aarch64.pg16 : documentdb_16 documentdb_16-0.114-0PIGSTY.el8.aarch64.rpm
| PIGSTY 0.114 el8.aarch64.pg15 : documentdb_15 documentdb_15-0.114-0PIGSTY.el8.aarch64.rpm
| N/A |
| el9.x86_64 | PIGSTY 0.114 el9.x86_64.pg18 : documentdb_18 documentdb_18-0.114-0PIGSTY.el9.x86_64.rpm
| PIGSTY 0.114 el9.x86_64.pg17 : documentdb_17 documentdb_17-0.114-0PIGSTY.el9.x86_64.rpm
| PIGSTY 0.114 el9.x86_64.pg16 : documentdb_16 documentdb_16-0.114-0PIGSTY.el9.x86_64.rpm
| PIGSTY 0.114 el9.x86_64.pg15 : documentdb_15 documentdb_15-0.114-0PIGSTY.el9.x86_64.rpm
| N/A |
| el9.aarch64 | PIGSTY 0.114 el9.aarch64.pg18 : documentdb_18 documentdb_18-0.114-0PIGSTY.el9.aarch64.rpm
| PIGSTY 0.114 el9.aarch64.pg17 : documentdb_17 documentdb_17-0.114-0PIGSTY.el9.aarch64.rpm
| PIGSTY 0.114 el9.aarch64.pg16 : documentdb_16 documentdb_16-0.114-0PIGSTY.el9.aarch64.rpm
| PIGSTY 0.114 el9.aarch64.pg15 : documentdb_15 documentdb_15-0.114-0PIGSTY.el9.aarch64.rpm
| N/A |
| el10.x86_64 | PIGSTY 0.114 el10.x86_64.pg18 : documentdb_18 documentdb_18-0.114-0PIGSTY.el10.x86_64.rpm
| PIGSTY 0.114 el10.x86_64.pg17 : documentdb_17 documentdb_17-0.114-0PIGSTY.el10.x86_64.rpm
| PIGSTY 0.114 el10.x86_64.pg16 : documentdb_16 documentdb_16-0.114-0PIGSTY.el10.x86_64.rpm
| PIGSTY 0.114 el10.x86_64.pg15 : documentdb_15 documentdb_15-0.114-0PIGSTY.el10.x86_64.rpm
| N/A |
| el10.aarch64 | PIGSTY 0.114 el10.aarch64.pg18 : documentdb_18 documentdb_18-0.114-0PIGSTY.el10.aarch64.rpm
| PIGSTY 0.114 el10.aarch64.pg17 : documentdb_17 documentdb_17-0.114-0PIGSTY.el10.aarch64.rpm
| PIGSTY 0.114 el10.aarch64.pg16 : documentdb_16 documentdb_16-0.114-0PIGSTY.el10.aarch64.rpm
| PIGSTY 0.114 el10.aarch64.pg15 : documentdb_15 documentdb_15-0.114-0PIGSTY.el10.aarch64.rpm
| N/A |
| d12.x86_64 | PIGSTY 0.114 d12.x86_64.pg18 : postgresql-18-documentdb postgresql-18-documentdb_0.114-0PIGSTY~bookworm_amd64.deb
| PIGSTY 0.114 d12.x86_64.pg17 : postgresql-17-documentdb postgresql-17-documentdb_0.114-0PIGSTY~bookworm_amd64.deb
| PIGSTY 0.114 d12.x86_64.pg16 : postgresql-16-documentdb postgresql-16-documentdb_0.114-0PIGSTY~bookworm_amd64.deb
| PIGSTY 0.114 d12.x86_64.pg15 : postgresql-15-documentdb postgresql-15-documentdb_0.114-0PIGSTY~bookworm_amd64.deb
| N/A |
| d12.aarch64 | PIGSTY 0.114 d12.aarch64.pg18 : postgresql-18-documentdb postgresql-18-documentdb_0.114-0PIGSTY~bookworm_arm64.deb
| PIGSTY 0.114 d12.aarch64.pg17 : postgresql-17-documentdb postgresql-17-documentdb_0.114-0PIGSTY~bookworm_arm64.deb
| PIGSTY 0.114 d12.aarch64.pg16 : postgresql-16-documentdb postgresql-16-documentdb_0.114-0PIGSTY~bookworm_arm64.deb
| PIGSTY 0.114 d12.aarch64.pg15 : postgresql-15-documentdb postgresql-15-documentdb_0.114-0PIGSTY~bookworm_arm64.deb
| N/A |
| d13.x86_64 | PGDG 0.114 | PGDG 0.114 | PGDG 0.114 | PGDG 0.114 | N/A |
| d13.aarch64 | PGDG 0.114 | PGDG 0.114 | PGDG 0.114 | PGDG 0.114 | N/A |
| u22.x86_64 | PIGSTY 0.114 u22.x86_64.pg18 : postgresql-18-documentdb postgresql-18-documentdb_0.114-0PIGSTY~jammy_amd64.deb
| PIGSTY 0.114 u22.x86_64.pg17 : postgresql-17-documentdb postgresql-17-documentdb_0.114-0PIGSTY~jammy_amd64.deb
| PIGSTY 0.114 u22.x86_64.pg16 : postgresql-16-documentdb postgresql-16-documentdb_0.114-0PIGSTY~jammy_amd64.deb
| PIGSTY 0.114 u22.x86_64.pg15 : postgresql-15-documentdb postgresql-15-documentdb_0.114-0PIGSTY~jammy_amd64.deb
| N/A |
| u22.aarch64 | PIGSTY 0.114 u22.aarch64.pg18 : postgresql-18-documentdb postgresql-18-documentdb_0.114-0PIGSTY~jammy_arm64.deb
| PIGSTY 0.114 u22.aarch64.pg17 : postgresql-17-documentdb postgresql-17-documentdb_0.114-0PIGSTY~jammy_arm64.deb
| PIGSTY 0.114 u22.aarch64.pg16 : postgresql-16-documentdb postgresql-16-documentdb_0.114-0PIGSTY~jammy_arm64.deb
| PIGSTY 0.114 u22.aarch64.pg15 : postgresql-15-documentdb postgresql-15-documentdb_0.114-0PIGSTY~jammy_arm64.deb
| N/A |
| u24.x86_64 | PIGSTY 0.114 u24.x86_64.pg18 : postgresql-18-documentdb postgresql-18-documentdb_0.114-0PIGSTY~noble_amd64.deb
| PIGSTY 0.114 u24.x86_64.pg17 : postgresql-17-documentdb postgresql-17-documentdb_0.114-0PIGSTY~noble_amd64.deb
| PIGSTY 0.114 u24.x86_64.pg16 : postgresql-16-documentdb postgresql-16-documentdb_0.114-0PIGSTY~noble_amd64.deb
| PIGSTY 0.114 u24.x86_64.pg15 : postgresql-15-documentdb postgresql-15-documentdb_0.114-0PIGSTY~noble_amd64.deb
| N/A |
| u24.aarch64 | PIGSTY 0.114 u24.aarch64.pg18 : postgresql-18-documentdb postgresql-18-documentdb_0.114-0PIGSTY~noble_arm64.deb
| PIGSTY 0.114 u24.aarch64.pg17 : postgresql-17-documentdb postgresql-17-documentdb_0.114-0PIGSTY~noble_arm64.deb
| PIGSTY 0.114 u24.aarch64.pg16 : postgresql-16-documentdb postgresql-16-documentdb_0.114-0PIGSTY~noble_arm64.deb
| PIGSTY 0.114 u24.aarch64.pg15 : postgresql-15-documentdb postgresql-15-documentdb_0.114-0PIGSTY~noble_arm64.deb
| N/A |
| u26.x86_64 | N/A | ||||
| u26.aarch64 | N/A |
Build
You can build the RPM / DEB packages for documentdb using pig build:
pig build pkg documentdb # build RPM / DEB packages
Install
You can install documentdb directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
pig repo add pgsql -u # Add repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install documentdb; # Install for current active PG version
pig ext install -y documentdb -v 18 # PG 18
pig ext install -y documentdb -v 17 # PG 17
pig ext install -y documentdb -v 16 # PG 16
pig ext install -y documentdb -v 15 # PG 15
dnf install -y documentdb_18 # PG 18
dnf install -y documentdb_17 # PG 17
dnf install -y documentdb_16 # PG 16
dnf install -y documentdb_15 # PG 15
apt install -y postgresql-18-documentdb # PG 18
apt install -y postgresql-17-documentdb # PG 17
apt install -y postgresql-16-documentdb # PG 16
apt install -y postgresql-15-documentdb # PG 15
Preload:
shared_preload_libraries = 'pg_documentdb, pg_documentdb_core, pg_cron';
Create Extension:
CREATE EXTENSION documentdb CASCADE; -- requires: documentdb_core, pg_cron, postgis, tsm_system_rows, vector
Usage
Sources:
- DocumentDB v0.114-0 README
- DocumentDB v0.114-0 changelog
documentdbcontrol file- Official preload helper
documentdb is the public PostgreSQL API extension for DocumentDB, an open-source MongoDB-compatible document database built on PostgreSQL. It stores BSON documents and implements CRUD, aggregation, full-text, geospatial, and vector workflows. MongoDB drivers require the separate DocumentDB gateway; installing this extension alone exposes the PostgreSQL API, not a wire-protocol listener.
Configure and Install
The official deployment helper preloads the core and API libraries with pg_cron. Restart PostgreSQL after changing this setting:
shared_preload_libraries = 'pg_cron, pg_documentdb_core, pg_documentdb'
Install the public extension and its declared dependencies:
CREATE EXTENSION documentdb CASCADE;
CASCADE can install documentdb_core, pg_cron, tsm_system_rows, vector, and postgis when their files are present. Installation is superuser-only and non-relocatable.
Native SQL Workflow
The SQL surface uses a database name, collection name, and BSON command document:
SELECT documentdb_api.create_collection('appdb', 'people');
SELECT documentdb_api.insert_one(
'appdb',
'people',
'{"_id": 1, "name": "Ada", "team": "storage"}',
NULL
);
SELECT document
FROM documentdb_api_catalog.bson_aggregation_find(
'appdb',
'{"find":"people","filter":{"team":"storage"}}'
);
For application compatibility, run the gateway and use a supported MongoDB driver against its configured TLS endpoint. The gateway translates wire-protocol commands into this PostgreSQL API.
Important Objects
documentdb_apicontains collection-management and command functions such ascreate_collectionandinsert_one.documentdb_api_catalog.bson_aggregation_findexecutes a MongoDB-style find specification and returns BSON documents.documentdb_core.bsonis the storage and interchange type supplied bydocumentdb_core.- DocumentDB roles and internal schemas separate public read/write operations from administrative and implementation objects.
documentdb.enableNonBlockingUniqueIndexBuildcontrols the v0.114 path for background unique ordered-index builds and is enabled by default in that release.
Version and Operational Notes
The v0.114-0 tagged changelog enables schema validation by default, fixes validator propagation and caching, and enables non-blocking unique ordered-index builds. It also records gateway configuration, connectivity-check, TLS, and credential-handling improvements. Two RUM optimizations in that changelog remain feature-flagged and disabled by default; do not describe them as active behavior.
MongoDB compatibility is not identical to every MongoDB server version. Test operators, index behavior, transactions, schema validation, authentication, and driver behavior used by the application. Match documentdb, documentdb_core, gateway, and optional distributed/index components to the same release line.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.