跳转到主要内容

documentdb

微软DocumentDB的API层

documentdb · 微软DocumentDB的API层

概览

ID扩展软件包版本类别许可证编程语言
9000documentdbdocumentdb1.2SIMMITC
属性可执行文件动态库需要预加载需要建扩展可迁移可信
--sLd--否是是是否否
关联
模式documentdb_api documentdb_api_internal documentdb_api_catalog documentdb_data documentdb_api_v2 documentdb_api_internal_admin documentdb_api_internal_readwrite documentdb_api_internal_readonly documentdb_api_internal_bgworker
依赖documentdb_core pg_cron postgis tsm_system_rows vector
被依赖documentdb_extended_rum
相关扩展pgbson jsquery pg_projection mongo_fdw pgjq pg_graphql omni_rest pg_jsonschema pg_net jsonschema
同包扩展documentdb_core documentdb_extended_rum
SQL 1.2-0. RPM requires external RUM on PG15–17.

软件包

类型仓库版本兼容的 PostgreSQL 大版本包名模式依赖
EXTPIGSTY1.219 18 17 16 15documentdbdocumentdb_core, pg_cron, postgis, tsm_system_rows, vector
RPMPIGSTY1.219 18 17 16 15documentdb_$vpostgresql$v-contrib, pg_cron_$v, pgvector_$v, rum_$v, postgis37_$v
DEBPIGSTY1.219 18 17 16 15postgresql-$v-documentdbpostgresql-$v-cron, postgresql-$v-pgvector, postgresql-$v-rum, postgresql-$v-postgis-3
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2
el8.aarch64N/APIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2
el9.x86_64PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2
el9.aarch64PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2
el10.x86_64PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2
el10.aarch64PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2
d12.x86_64PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 0.117
d12.aarch64PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 0.117
d13.x86_64PIGSTY 1.2PGDG 1.2PGDG 1.2PGDG 1.2PGDG 1.2
d13.aarch64PIGSTY 1.2PGDG 1.2PGDG 1.2PGDG 1.2PGDG 1.2
u22.x86_64PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 0.117
u22.aarch64PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 0.117
u24.x86_64PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 0.117
u24.aarch64PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 1.2PIGSTY 0.117
u26.x86_64PIGSTY 1.2PGDG 1.2PGDG 1.2PGDG 1.2PGDG 1.2
u26.aarch64PIGSTY 1.2PGDG 1.2PGDG 1.2PGDG 1.2PGDG 1.2
软件包版本平台仓库大小下载
documentdb_181.2el8.x86_64pigsty6.2 MiBdocumentdb_18-1.2-1PGSTY.el8.x86_64.rpm
documentdb_181.2el8.aarch64pigsty5.9 MiBdocumentdb_18-1.2-1PGSTY.el8.aarch64.rpm
documentdb_181.2el9.x86_64pigsty6.0 MiBdocumentdb_18-1.2-1PGSTY.el9.x86_64.rpm
documentdb_181.2el9.aarch64pigsty5.9 MiBdocumentdb_18-1.2-1PGSTY.el9.aarch64.rpm
documentdb_181.2el10.x86_64pigsty6.1 MiBdocumentdb_18-1.2-1PGSTY.el10.x86_64.rpm
documentdb_181.2el10.aarch64pigsty5.9 MiBdocumentdb_18-1.2-1PGSTY.el10.aarch64.rpm
postgresql-18-documentdb1.2d12.x86_64pigsty5.7 MiBpostgresql-18-documentdb_1.2-1PGSTY~bookworm_amd64.deb
postgresql-18-documentdb1.2d12.aarch64pigsty5.5 MiBpostgresql-18-documentdb_1.2-1PGSTY~bookworm_arm64.deb
postgresql-18-documentdb1.2d13.x86_64pgdg5.7 MiBpostgresql-18-documentdb_1.2-0-1.pgdg13+1_amd64.deb
postgresql-18-documentdb1.2d13.x86_64pigsty5.7 MiBpostgresql-18-documentdb_1.2-1PGSTY~trixie_amd64.deb
postgresql-18-documentdb1.0d13.x86_64pgdg5.5 MiBpostgresql-18-documentdb_1.0-1-1.pgdg13+2_amd64.deb
postgresql-18-documentdb1.0d13.x86_64pgdg5.5 MiBpostgresql-18-documentdb_1.0-0-1.pgdg13+1_amd64.deb
postgresql-18-documentdb1.2d13.aarch64pgdg5.5 MiBpostgresql-18-documentdb_1.2-0-1.pgdg13+1_arm64.deb
postgresql-18-documentdb1.2d13.aarch64pigsty5.5 MiBpostgresql-18-documentdb_1.2-1PGSTY~trixie_arm64.deb
postgresql-18-documentdb1.0d13.aarch64pgdg5.3 MiBpostgresql-18-documentdb_1.0-1-1.pgdg13+2_arm64.deb
postgresql-18-documentdb1.0d13.aarch64pgdg5.3 MiBpostgresql-18-documentdb_1.0-0-1.pgdg13+1_arm64.deb
postgresql-18-documentdb1.2u22.x86_64pigsty6.1 MiBpostgresql-18-documentdb_1.2-1PGSTY~jammy_amd64.deb
postgresql-18-documentdb1.2u22.aarch64pigsty5.9 MiBpostgresql-18-documentdb_1.2-1PGSTY~jammy_arm64.deb
postgresql-18-documentdb1.2u24.x86_64pigsty5.9 MiBpostgresql-18-documentdb_1.2-1PGSTY~noble_amd64.deb
postgresql-18-documentdb1.2u24.aarch64pigsty5.8 MiBpostgresql-18-documentdb_1.2-1PGSTY~noble_arm64.deb
postgresql-18-documentdb1.2u26.x86_64pgdg5.6 MiBpostgresql-18-documentdb_1.2-0-1.pgdg26.04+1_amd64.deb
postgresql-18-documentdb1.2u26.x86_64pigsty5.9 MiBpostgresql-18-documentdb_1.2-1PGSTY~resolute_amd64.deb
postgresql-18-documentdb1.0u26.x86_64pgdg5.4 MiBpostgresql-18-documentdb_1.0-1-1.pgdg26.04+2_amd64.deb
postgresql-18-documentdb1.0u26.x86_64pgdg5.4 MiBpostgresql-18-documentdb_1.0-0-1.pgdg26.04+1_amd64.deb
postgresql-18-documentdb1.2u26.aarch64pgdg5.4 MiBpostgresql-18-documentdb_1.2-0-1.pgdg26.04+1_arm64.deb
postgresql-18-documentdb1.2u26.aarch64pigsty5.8 MiBpostgresql-18-documentdb_1.2-1PGSTY~resolute_arm64.deb
postgresql-18-documentdb1.0u26.aarch64pgdg5.2 MiBpostgresql-18-documentdb_1.0-1-1.pgdg26.04+2_arm64.deb
postgresql-18-documentdb1.0u26.aarch64pgdg5.2 MiBpostgresql-18-documentdb_1.0-0-1.pgdg26.04+1_arm64.deb
软件包版本平台仓库大小下载
documentdb_171.2el8.x86_64pigsty6.2 MiBdocumentdb_17-1.2-1PGSTY.el8.x86_64.rpm
documentdb_171.2el8.aarch64pigsty5.9 MiBdocumentdb_17-1.2-1PGSTY.el8.aarch64.rpm
documentdb_171.2el9.x86_64pigsty6.0 MiBdocumentdb_17-1.2-1PGSTY.el9.x86_64.rpm
documentdb_171.2el9.aarch64pigsty5.9 MiBdocumentdb_17-1.2-1PGSTY.el9.aarch64.rpm
documentdb_171.2el10.x86_64pigsty6.1 MiBdocumentdb_17-1.2-1PGSTY.el10.x86_64.rpm
documentdb_171.2el10.aarch64pigsty5.9 MiBdocumentdb_17-1.2-1PGSTY.el10.aarch64.rpm
postgresql-17-documentdb1.2d12.x86_64pigsty5.7 MiBpostgresql-17-documentdb_1.2-1PGSTY~bookworm_amd64.deb
postgresql-17-documentdb1.2d12.aarch64pigsty5.5 MiBpostgresql-17-documentdb_1.2-1PGSTY~bookworm_arm64.deb
postgresql-17-documentdb1.2d13.x86_64pgdg5.7 MiBpostgresql-17-documentdb_1.2-0-1.pgdg13+1_amd64.deb
postgresql-17-documentdb1.2d13.x86_64pigsty5.7 MiBpostgresql-17-documentdb_1.2-1PGSTY~trixie_amd64.deb
postgresql-17-documentdb1.0d13.x86_64pgdg5.5 MiBpostgresql-17-documentdb_1.0-1-1.pgdg13+2_amd64.deb
postgresql-17-documentdb1.0d13.x86_64pgdg5.5 MiBpostgresql-17-documentdb_1.0-0-1.pgdg13+1_amd64.deb
postgresql-17-documentdb1.2d13.aarch64pgdg5.5 MiBpostgresql-17-documentdb_1.2-0-1.pgdg13+1_arm64.deb
postgresql-17-documentdb1.2d13.aarch64pigsty5.5 MiBpostgresql-17-documentdb_1.2-1PGSTY~trixie_arm64.deb
postgresql-17-documentdb1.0d13.aarch64pgdg5.3 MiBpostgresql-17-documentdb_1.0-1-1.pgdg13+2_arm64.deb
postgresql-17-documentdb1.0d13.aarch64pgdg5.3 MiBpostgresql-17-documentdb_1.0-0-1.pgdg13+1_arm64.deb
postgresql-17-documentdb1.2u22.x86_64pigsty6.5 MiBpostgresql-17-documentdb_1.2-1PGSTY~jammy_amd64.deb
postgresql-17-documentdb1.2u22.aarch64pigsty6.4 MiBpostgresql-17-documentdb_1.2-1PGSTY~jammy_arm64.deb
postgresql-17-documentdb1.2u24.x86_64pigsty5.9 MiBpostgresql-17-documentdb_1.2-1PGSTY~noble_amd64.deb
postgresql-17-documentdb1.2u24.aarch64pigsty5.8 MiBpostgresql-17-documentdb_1.2-1PGSTY~noble_arm64.deb
postgresql-17-documentdb1.2u26.x86_64pgdg5.6 MiBpostgresql-17-documentdb_1.2-0-1.pgdg26.04+1_amd64.deb
postgresql-17-documentdb1.2u26.x86_64pigsty5.9 MiBpostgresql-17-documentdb_1.2-1PGSTY~resolute_amd64.deb
postgresql-17-documentdb1.0u26.x86_64pgdg5.4 MiBpostgresql-17-documentdb_1.0-1-1.pgdg26.04+2_amd64.deb
postgresql-17-documentdb1.0u26.x86_64pgdg5.4 MiBpostgresql-17-documentdb_1.0-0-1.pgdg26.04+1_amd64.deb
postgresql-17-documentdb1.2u26.aarch64pgdg5.4 MiBpostgresql-17-documentdb_1.2-0-1.pgdg26.04+1_arm64.deb
postgresql-17-documentdb1.2u26.aarch64pigsty5.8 MiBpostgresql-17-documentdb_1.2-1PGSTY~resolute_arm64.deb
postgresql-17-documentdb1.0u26.aarch64pgdg5.2 MiBpostgresql-17-documentdb_1.0-1-1.pgdg26.04+2_arm64.deb
postgresql-17-documentdb1.0u26.aarch64pgdg5.2 MiBpostgresql-17-documentdb_1.0-0-1.pgdg26.04+1_arm64.deb
软件包版本平台仓库大小下载
documentdb_161.2el8.x86_64pigsty6.2 MiBdocumentdb_16-1.2-1PGSTY.el8.x86_64.rpm
documentdb_161.2el8.aarch64pigsty5.9 MiBdocumentdb_16-1.2-1PGSTY.el8.aarch64.rpm
documentdb_161.2el9.x86_64pigsty6.0 MiBdocumentdb_16-1.2-1PGSTY.el9.x86_64.rpm
documentdb_161.2el9.aarch64pigsty5.9 MiBdocumentdb_16-1.2-1PGSTY.el9.aarch64.rpm
documentdb_161.2el10.x86_64pigsty6.1 MiBdocumentdb_16-1.2-1PGSTY.el10.x86_64.rpm
documentdb_161.2el10.aarch64pigsty5.9 MiBdocumentdb_16-1.2-1PGSTY.el10.aarch64.rpm
postgresql-16-documentdb1.2d12.x86_64pigsty5.7 MiBpostgresql-16-documentdb_1.2-1PGSTY~bookworm_amd64.deb
postgresql-16-documentdb1.2d12.aarch64pigsty5.5 MiBpostgresql-16-documentdb_1.2-1PGSTY~bookworm_arm64.deb
postgresql-16-documentdb1.2d13.x86_64pgdg5.7 MiBpostgresql-16-documentdb_1.2-0-1.pgdg13+1_amd64.deb
postgresql-16-documentdb1.2d13.x86_64pigsty5.7 MiBpostgresql-16-documentdb_1.2-1PGSTY~trixie_amd64.deb
postgresql-16-documentdb1.0d13.x86_64pgdg5.5 MiBpostgresql-16-documentdb_1.0-1-1.pgdg13+2_amd64.deb
postgresql-16-documentdb1.0d13.x86_64pgdg5.5 MiBpostgresql-16-documentdb_1.0-0-1.pgdg13+1_amd64.deb
postgresql-16-documentdb1.2d13.aarch64pgdg5.5 MiBpostgresql-16-documentdb_1.2-0-1.pgdg13+1_arm64.deb
postgresql-16-documentdb1.2d13.aarch64pigsty5.5 MiBpostgresql-16-documentdb_1.2-1PGSTY~trixie_arm64.deb
postgresql-16-documentdb1.0d13.aarch64pgdg5.3 MiBpostgresql-16-documentdb_1.0-1-1.pgdg13+2_arm64.deb
postgresql-16-documentdb1.0d13.aarch64pgdg5.3 MiBpostgresql-16-documentdb_1.0-0-1.pgdg13+1_arm64.deb
postgresql-16-documentdb1.2u22.x86_64pigsty6.5 MiBpostgresql-16-documentdb_1.2-1PGSTY~jammy_amd64.deb
postgresql-16-documentdb1.2u22.aarch64pigsty6.4 MiBpostgresql-16-documentdb_1.2-1PGSTY~jammy_arm64.deb
postgresql-16-documentdb1.2u24.x86_64pigsty5.9 MiBpostgresql-16-documentdb_1.2-1PGSTY~noble_amd64.deb
postgresql-16-documentdb1.2u24.aarch64pigsty5.8 MiBpostgresql-16-documentdb_1.2-1PGSTY~noble_arm64.deb
postgresql-16-documentdb1.2u26.x86_64pgdg5.6 MiBpostgresql-16-documentdb_1.2-0-1.pgdg26.04+1_amd64.deb
postgresql-16-documentdb1.2u26.x86_64pigsty5.9 MiBpostgresql-16-documentdb_1.2-1PGSTY~resolute_amd64.deb
postgresql-16-documentdb1.0u26.x86_64pgdg5.4 MiBpostgresql-16-documentdb_1.0-1-1.pgdg26.04+2_amd64.deb
postgresql-16-documentdb1.0u26.x86_64pgdg5.4 MiBpostgresql-16-documentdb_1.0-0-1.pgdg26.04+1_amd64.deb
postgresql-16-documentdb1.2u26.aarch64pgdg5.4 MiBpostgresql-16-documentdb_1.2-0-1.pgdg26.04+1_arm64.deb
postgresql-16-documentdb1.2u26.aarch64pigsty5.8 MiBpostgresql-16-documentdb_1.2-1PGSTY~resolute_arm64.deb
postgresql-16-documentdb1.0u26.aarch64pgdg5.2 MiBpostgresql-16-documentdb_1.0-1-1.pgdg26.04+2_arm64.deb
postgresql-16-documentdb1.0u26.aarch64pgdg5.2 MiBpostgresql-16-documentdb_1.0-0-1.pgdg26.04+1_arm64.deb
软件包版本平台仓库大小下载
documentdb_151.2el8.x86_64pigsty6.2 MiBdocumentdb_15-1.2-1PGSTY.el8.x86_64.rpm
documentdb_151.2el8.aarch64pigsty6.0 MiBdocumentdb_15-1.2-1PGSTY.el8.aarch64.rpm
documentdb_151.2el9.x86_64pigsty6.1 MiBdocumentdb_15-1.2-1PGSTY.el9.x86_64.rpm
documentdb_151.2el9.aarch64pigsty5.9 MiBdocumentdb_15-1.2-1PGSTY.el9.aarch64.rpm
documentdb_151.2el10.x86_64pigsty6.2 MiBdocumentdb_15-1.2-1PGSTY.el10.x86_64.rpm
documentdb_151.2el10.aarch64pigsty6.0 MiBdocumentdb_15-1.2-1PGSTY.el10.aarch64.rpm
postgresql-15-documentdb0.117d12.x86_64pigsty5.6 MiBpostgresql-15-documentdb_0.117-1PGSTY~bookworm_amd64.deb
postgresql-15-documentdb0.117d12.aarch64pigsty5.3 MiBpostgresql-15-documentdb_0.117-1PGSTY~bookworm_arm64.deb
postgresql-15-documentdb1.2d13.x86_64pgdg5.7 MiBpostgresql-15-documentdb_1.2-0-1.pgdg13+1_amd64.deb
postgresql-15-documentdb1.0d13.x86_64pgdg5.6 MiBpostgresql-15-documentdb_1.0-1-1.pgdg13+2_amd64.deb
postgresql-15-documentdb1.0d13.x86_64pgdg5.6 MiBpostgresql-15-documentdb_1.0-0-1.pgdg13+1_amd64.deb
postgresql-15-documentdb0.117d13.x86_64pigsty5.6 MiBpostgresql-15-documentdb_0.117-1PGSTY~trixie_amd64.deb
postgresql-15-documentdb1.2d13.aarch64pgdg5.5 MiBpostgresql-15-documentdb_1.2-0-1.pgdg13+1_arm64.deb
postgresql-15-documentdb1.0d13.aarch64pgdg5.4 MiBpostgresql-15-documentdb_1.0-1-1.pgdg13+2_arm64.deb
postgresql-15-documentdb1.0d13.aarch64pgdg5.4 MiBpostgresql-15-documentdb_1.0-0-1.pgdg13+1_arm64.deb
postgresql-15-documentdb0.117d13.aarch64pigsty5.4 MiBpostgresql-15-documentdb_0.117-1PGSTY~trixie_arm64.deb
postgresql-15-documentdb0.117u22.x86_64pigsty6.4 MiBpostgresql-15-documentdb_0.117-1PGSTY~jammy_amd64.deb
postgresql-15-documentdb0.117u22.aarch64pigsty6.2 MiBpostgresql-15-documentdb_0.117-1PGSTY~jammy_arm64.deb
postgresql-15-documentdb0.117u24.x86_64pigsty5.8 MiBpostgresql-15-documentdb_0.117-1PGSTY~noble_amd64.deb
postgresql-15-documentdb0.117u24.aarch64pigsty5.7 MiBpostgresql-15-documentdb_0.117-1PGSTY~noble_arm64.deb
postgresql-15-documentdb1.2u26.x86_64pgdg5.6 MiBpostgresql-15-documentdb_1.2-0-1.pgdg26.04+1_amd64.deb
postgresql-15-documentdb1.0u26.x86_64pgdg5.5 MiBpostgresql-15-documentdb_1.0-1-1.pgdg26.04+2_amd64.deb
postgresql-15-documentdb1.0u26.x86_64pgdg5.5 MiBpostgresql-15-documentdb_1.0-0-1.pgdg26.04+1_amd64.deb
postgresql-15-documentdb0.117u26.x86_64pigsty5.8 MiBpostgresql-15-documentdb_0.117-1PGSTY~resolute_amd64.deb
postgresql-15-documentdb1.2u26.aarch64pgdg5.4 MiBpostgresql-15-documentdb_1.2-0-1.pgdg26.04+1_arm64.deb
postgresql-15-documentdb1.0u26.aarch64pgdg5.3 MiBpostgresql-15-documentdb_1.0-1-1.pgdg26.04+2_arm64.deb
postgresql-15-documentdb1.0u26.aarch64pgdg5.3 MiBpostgresql-15-documentdb_1.0-0-1.pgdg26.04+1_arm64.deb
postgresql-15-documentdb0.117u26.aarch64pigsty5.7 MiBpostgresql-15-documentdb_0.117-1PGSTY~resolute_arm64.deb

源码

intelrdfpmath-applied-2.0u3-1.tar.gz

pig build pkg documentdb;		# build rpm/deb

安装

启用 PGDG 和 PIGSTY 仓库并更新缓存。

pig repo add pgsql -u   # add both repo and update cache

使用 pig 安装扩展。

pig install documentdb;		# install by package name

pig install documentdb -v 19;   # install for PG 19
pig install documentdb -v 18;   # install for PG 18
pig install documentdb -v 17;   # install for PG 17
pig install documentdb -v 16;   # install for PG 16
pig install documentdb -v 15;   # install for PG 15

将扩展加入 shared_preload_libraries,详见配置说明。

shared_preload_libraries = 'pg_documentdb_core, pg_cron, pg_documentdb';

在数据库中创建扩展。

CREATE EXTENSION documentdb CASCADE; -- requires documentdb_core, pg_cron, postgis, tsm_system_rows, vector

用法

来源:

documentdb 是 PostgreSQL 的公共 API 扩展,用于 DocumentDB,这是一个基于 PostgreSQL 开源的 MongoDB 兼容文档数据库。它存储 BSON 文档并实现 CRUD、聚合、全文搜索、地理空间和向量工作流。MongoDB 驱动程序需要单独的 DocumentDB 网关;仅安装此扩展不会暴露 Wire-Protocol 监听器,而是 PostgreSQL API。

配置与安装

官方部署助手使用 pg_cron 预加载核心库和 API 库。更改此设置后,请重启 PostgreSQL:

shared_preload_libraries = 'pg_cron, pg_documentdb_core, pg_documentdb, pg_documentdb_extended_rum'

安装公共扩展及其声明的依赖项:

CREATE EXTENSION documentdb CASCADE;
CREATE EXTENSION documentdb_extended_rum;

CASCADE 可以在文件存在时安装 documentdb_core、pg_cron、tsm_system_rows、vector 和 postgis。安装仅限超级用户且不可重定位。

原生 SQL 工作流

SQL 接口使用数据库名、集合名和 BSON 命令文档:

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"}}'
);

为了应用程序兼容性,请运行网关并在其配置的 TLS 端点上使用受支持的 MongoDB 驱动程序。网关将 Wire-Protocol 命令转换为此 PostgreSQL API。

重要对象

  • documentdb_api 包含集合管理及命令函数,如 create_collection 和 insert_one。
  • documentdb_api_catalog.bson_aggregation_find 执行 MongoDB 风格的查找规范并返回 BSON 文档。
  • documentdb_core.bson 是由 documentdb_core 提供的存储和交换类型。
  • DocumentDB 角色和内部模式将公共读写操作与管理及实现对象分开。
  • documentdb.enableNonBlockingUniqueIndexBuild 控制 v0.114 路径下的后台唯一有序索引构建,并在该版本中默认启用。

版本与运行注意事项

1.0-0 是首个正式可用的发行系列。它修复了零批量读取的权限检查、合并与输出目标的写权限,以及崩溃、地理排序和索引清理问题。自定义角色 CRUD 与连接后嵌套查找仍受设置控制,默认关闭。应使用匹配的全部库,并应用该版本的升级 SQL。

官方 DocumentDB Local 容器默认启用使用情况遥测;原生软件包不受影响。容器中可设置 DOCUMENTDB_USAGE_TELEMETRY=false、NO_ANALYTICS=1 或 DO_NOT_TRACK=1 禁用。

MongoDB 兼容性并不等同于所有 MongoDB 服务器版本。应测试应用实际使用的操作符、索引行为、事务、模式验证、身份验证和驱动行为。请确保 documentdb、documentdb_core、网关及可选的分布式/索引组件来自同一发行系列。

DocumentDB 1.2 变化

DocumentDB 1.2 的 SQL 版本为 1.2-0。升级前应备份数据目录;不支持将已升级数据退回 1.0。官方 1.2 容器先升级扩展再启动网关,并要求显式提供密码,已有数据卷也不例外。对于接管的 PostgreSQL 实例,应遵循包指南的重启与升级顺序,不要重启或修改无关实例。

只有设置 documentdb_core.enableCollation = on 后才启用排序规则,即使显式指定 simple 也一样。非唯一排序规则索引还需要 documentdb.enableCollationWithNonUniqueOrderedIndexes;唯一索引还需要 documentdb.enable_collated_unique_indexes 与 documentdb.enable_composite_unique_optional_key。此版本扩展了逐命令、逐更新的排序规则行为,并修复降序唯一索引的空值与缺失值冲突、$dateTrunc 的天边界以及重扫 $densify 的结果。升级后应复核相关查询和索引语义。

表格阅读器