跳转到主要内容

documentdb_extended_rum

DocumentDB扩展RUM索引访问方法

概览

扩展包名版本分类许可证语言
documentdb1.2SIMMITC
ID扩展名BinLibLoadCreateTrustReloc模式
9000documentdb否是是是否否documentdb_api
9010documentdb_core否是是是否否documentdb_core
9030documentdb_extended_rum否是是是否是documentdb_extended_rum_catalog

SQL 1.0-0; RPM external RUM dependency only on PG15-17.

版本

类型仓库版本PG 大版本包名依赖
EXTPIGSTY1.21817161514documentdbdocumentdb
RPMPIGSTY1.21817161514documentdb_$vpostgresql$v-contrib, pg_cron_$v, pgvector_$v, rum_$v, postgis37_$v
DEBPIGSTY1.21817161514postgresql-$v-documentdbpostgresql-$v-cron, postgresql-$v-pgvector, postgresql-$v-rum, postgresql-$v-postgis-3
OS / 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

构建

您可以使用 pig build 命令构建 documentdb 扩展的 RPM / DEB 包:

pig build pkg documentdb         # 构建 RPM / DEB 包

安装

您可以直接安装 documentdb 扩展包的预置二进制包,首先确保 PGDG 和 PIGSTY 仓库已经添加并启用:

pig repo add pgsql -u          # 添加仓库并更新缓存

使用 pig 或者是 apt/yum/dnf 安装扩展:

安装
pig install documentdb;          # 当前活跃 PG 版本安装
pig
pig ext install -y documentdb -v 19  # PG 19
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
dnf install -y documentdb_19       # PG 19
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
apt install -y postgresql-19-documentdb   # PG 19
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

预加载配置:

shared_preload_libraries = 'pg_cron, pg_documentdb_core, pg_documentdb, pg_documentdb_extended_rum';

创建扩展:

CREATE EXTENSION documentdb_extended_rum CASCADE;  -- 依赖: documentdb

用法

来源:

documentdb_extended_rum 是DocumentDB的扩展RUM索引访问方法。它是由DocumentDB索引层选择的实现组件,而不是通用的应用程序索引或替代安装 documentdb。

配置与安装

该库只能从 shared_preload_libraries 初始化。在基础DocumentDB库之后预加载它并重启PostgreSQL:

shared_preload_libraries = 'pg_cron, pg_documentdb_core, pg_documentdb, pg_documentdb_extended_rum'
documentdb.rum_library_load_option = 'require_documentdb_extended_rum'

然后使用相同的版本安装扩展,就像安装基础堆栈一样:

CREATE EXTENSION documentdb CASCADE;
CREATE EXTENSION documentdb_extended_rum;

DocumentDB部署工具通常会管理此配置。现有数据库应遵循特定于版本的升级程序而不是随意切换索引处理器。

重要对象

  • documentdb_extended_rum 是该扩展注册的索引访问方法。
  • documentdb_extended_rum_catalog 包含用于DocumentDB的BSON操作符家族和类。
  • documentdb.rum_library_load_option = 'require_documentdb_extended_rum' 指示DocumentDB索引层使用适配器。
  • 实现是一个RUM分支,其磁盘布局和内容设计保持与上游RUM向后兼容的同时,改变查询和易变路径以适应文档工作负载。

运行边界

安装和升级此组件时,请确保与 documentdb 和 documentdb_core 二进制文件版本匹配。除非遵循上游开发指导,否则不要直接使用其内部操作符类构建索引;通过DocumentDB API创建和管理索引以保持元数据的一致性。

在 1.0-0 中,documentdb.rum_library_load_option 继续默认使用 require_documentdb_extended_rum。本版本修复了清理时并发根页分裂的处理,恢复清理延迟与中断检查,并默认启用定向倒排树剪枝与空条目叶页回收。应应用匹配的升级 SQL,并通过受支持的 DocumentDB 操作验证现有索引。

DocumentDB 1.2 变化

1.2 源码为此组件提供 SQL 版本 1.2-0。备份后,应与匹配的 DocumentDB API/core 一起升级;不能安全地将升级后的数据降回 1.0。此版本修复了大型索引项导致最右叶页分裂时溢出的问题。真空清理期间回收孤立的空 posting-tree 叶页,另由 documentdb_rum.enable_vacuum_cleanup_posting_tree_pruning 控制,默认关闭;不能因为升级了扩展就认为这项可选清理已经启用。

这个页面对您有帮助吗?

表格阅读器