跳转到主要内容

documentdb_extended_rum

DocumentDB扩展RUM索引访问方法

documentdb · DocumentDB扩展RUM索引访问方法

概览

ID扩展软件包版本类别许可证编程语言
9030documentdb_extended_rumdocumentdb1.2SIMMITC
属性可执行文件动态库需要预加载需要建扩展可迁移可信
--sLd-r否是是是是否
关联
模式documentdb_extended_rum_catalog
依赖documentdb
相关扩展rum pg_projection jsquery pgbson mongo_fdw pg_jsonschema jsonschema pgjq hll roaringbitmap
同包扩展documentdb documentdb_core
SQL 1.2-0. RPM requires external RUM on PG15–17.

软件包

类型仓库版本兼容的 PostgreSQL 大版本包名模式依赖
EXTPIGSTY1.219 18 17 16 15documentdbdocumentdb
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

源码

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_extended_rum;		# install by extension name

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

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

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

在数据库中创建扩展。

CREATE EXTENSION documentdb_extended_rum CASCADE; -- requires 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 控制,默认关闭;不能因为升级了扩展就认为这项可选清理已经启用。

表格阅读器