rum

rum : RUM index access method

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
2720
rum
rum
1.3.15
FEAT
PostgreSQL
C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-d-r
No
Yes
No
Yes
yes
no
Relationships
Need By
documentdb
See Also
pg_trgm
btree_gist
btree_gin
pg_search
pgroonga
pg_bigm
zhparser
pgroonga_database

1.3.15 build pass on pg 16,17,18

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXT
MIXED
1.3.15
18
17
16
15
14
rum-
RPM
PIGSTY
1.3.15
18
17
16
15
14
rum_$v-
DEB
PGDG
1.3.15
18
17
16
15
14
postgresql-$v-rum-
Linux / PGPG18PG17PG16PG15PG14
el8.x86_64
PIGSTY 1.3.15
PIGSTY 1.3.15
PIGSTY 1.3.15
PGDG 1.3.14
PGDG 1.3.14
el8.aarch64
PIGSTY 1.3.15
PIGSTY 1.3.15
PIGSTY 1.3.15
PGDG 1.3.14
PGDG 1.3.14
el9.x86_64
PIGSTY 1.3.15
PIGSTY 1.3.15
PIGSTY 1.3.15
PGDG 1.3.14
PGDG 1.3.14
el9.aarch64
PIGSTY 1.3.15
PIGSTY 1.3.15
PIGSTY 1.3.15
PGDG 1.3.14
PGDG 1.3.14
el10.x86_64
PIGSTY 1.3.15
PIGSTY 1.3.15
PIGSTY 1.3.15
PGDG 1.3.14
PGDG 1.3.14
el10.aarch64
PIGSTY 1.3.15
PIGSTY 1.3.15
PIGSTY 1.3.15
PGDG 1.3.14
PGDG 1.3.14
d12.x86_64
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
d12.aarch64
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
d13.x86_64
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
d13.aarch64
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
u22.x86_64
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
u22.aarch64
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
u24.x86_64
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
u24.aarch64
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PGDG 1.3.15
PackageVersionOSORGSIZEFile URL
rum_171.3.15el8.x86_64pigsty104.2 KiBrum_17-1.3.15-1PIGSTY.el8.x86_64.rpm
rum_171.3.14el8.x86_64pgdg93.1 KiBrum_17-1.3.14-1PGDG.rhel8.x86_64.rpm
rum_171.3.15el8.aarch64pigsty97.7 KiBrum_17-1.3.15-1PIGSTY.el8.aarch64.rpm
rum_171.3.14el8.aarch64pgdg86.8 KiBrum_17-1.3.14-1PGDG.rhel8.aarch64.rpm
rum_171.3.15el9.x86_64pigsty96.5 KiBrum_17-1.3.15-1PIGSTY.el9.x86_64.rpm
rum_171.3.14el9.x86_64pgdg91.6 KiBrum_17-1.3.14-1PGDG.rhel9.x86_64.rpm
rum_171.3.15el9.aarch64pigsty92.6 KiBrum_17-1.3.15-1PIGSTY.el9.aarch64.rpm
rum_171.3.14el9.aarch64pgdg87.8 KiBrum_17-1.3.14-1PGDG.rhel9.aarch64.rpm
rum_171.3.15el10.x86_64pigsty97.3 KiBrum_17-1.3.15-1PIGSTY.el10.x86_64.rpm
rum_171.3.14el10.x86_64pgdg93.0 KiBrum_17-1.3.14-2PGDG.rhel10.x86_64.rpm
rum_171.3.15el10.aarch64pigsty94.0 KiBrum_17-1.3.15-1PIGSTY.el10.aarch64.rpm
rum_171.3.14el10.aarch64pgdg88.8 KiBrum_17-1.3.14-2PGDG.rhel10.aarch64.rpm
postgresql-17-rum1.3.15d12.x86_64pgdg234.4 KiBpostgresql-17-rum_1.3.15-1.pgdg12+1_amd64.deb
postgresql-17-rum1.3.15d12.aarch64pgdg225.9 KiBpostgresql-17-rum_1.3.15-1.pgdg12+1_arm64.deb
postgresql-17-rum1.3.15d13.x86_64pgdg234.6 KiBpostgresql-17-rum_1.3.15-1.pgdg13+1_amd64.deb
postgresql-17-rum1.3.15d13.aarch64pgdg226.7 KiBpostgresql-17-rum_1.3.15-1.pgdg13+1_arm64.deb
postgresql-17-rum1.3.15u22.x86_64pgdg265.0 KiBpostgresql-17-rum_1.3.15-1.pgdg22.04+1_amd64.deb
postgresql-17-rum1.3.15u22.aarch64pgdg257.4 KiBpostgresql-17-rum_1.3.15-1.pgdg22.04+1_arm64.deb
postgresql-17-rum1.3.15u24.x86_64pgdg235.0 KiBpostgresql-17-rum_1.3.15-1.pgdg24.04+1_amd64.deb
postgresql-17-rum1.3.15u24.aarch64pgdg227.0 KiBpostgresql-17-rum_1.3.15-1.pgdg24.04+1_arm64.deb
PackageVersionOSORGSIZEFile URL
rum_161.3.15el8.x86_64pigsty104.1 KiBrum_16-1.3.15-1PIGSTY.el8.x86_64.rpm
rum_161.3.14el8.x86_64pgdg93.0 KiBrum_16-1.3.14-1PGDG.rhel8.x86_64.rpm
rum_161.3.13el8.x86_64pgdg92.7 KiBrum_16-1.3.13-2.rhel8.1.x86_64.rpm
rum_161.3.15el8.aarch64pigsty97.7 KiBrum_16-1.3.15-1PIGSTY.el8.aarch64.rpm
rum_161.3.14el8.aarch64pgdg86.8 KiBrum_16-1.3.14-1PGDG.rhel8.aarch64.rpm
rum_161.3.13el8.aarch64pgdg86.4 KiBrum_16-1.3.13-2.rhel8.1.aarch64.rpm
rum_161.3.15el9.x86_64pigsty96.5 KiBrum_16-1.3.15-1PIGSTY.el9.x86_64.rpm
rum_161.3.14el9.x86_64pgdg91.7 KiBrum_16-1.3.14-1PGDG.rhel9.x86_64.rpm
rum_161.3.13el9.x86_64pgdg91.3 KiBrum_16-1.3.13-2.rhel9.1.x86_64.rpm
rum_161.3.15el9.aarch64pigsty92.8 KiBrum_16-1.3.15-1PIGSTY.el9.aarch64.rpm
rum_161.3.14el9.aarch64pgdg87.7 KiBrum_16-1.3.14-1PGDG.rhel9.aarch64.rpm
rum_161.3.13el9.aarch64pgdg87.3 KiBrum_16-1.3.13-2.rhel9.1.aarch64.rpm
rum_161.3.15el10.x86_64pigsty97.3 KiBrum_16-1.3.15-1PIGSTY.el10.x86_64.rpm
rum_161.3.14el10.x86_64pgdg92.9 KiBrum_16-1.3.14-2PGDG.rhel10.x86_64.rpm
rum_161.3.15el10.aarch64pigsty93.9 KiBrum_16-1.3.15-1PIGSTY.el10.aarch64.rpm
rum_161.3.14el10.aarch64pgdg88.7 KiBrum_16-1.3.14-2PGDG.rhel10.aarch64.rpm
postgresql-16-rum1.3.15d12.x86_64pgdg234.4 KiBpostgresql-16-rum_1.3.15-1.pgdg12+1_amd64.deb
postgresql-16-rum1.3.15d12.aarch64pgdg225.7 KiBpostgresql-16-rum_1.3.15-1.pgdg12+1_arm64.deb
postgresql-16-rum1.3.15d13.x86_64pgdg234.5 KiBpostgresql-16-rum_1.3.15-1.pgdg13+1_amd64.deb
postgresql-16-rum1.3.15d13.aarch64pgdg226.6 KiBpostgresql-16-rum_1.3.15-1.pgdg13+1_arm64.deb
postgresql-16-rum1.3.15u22.x86_64pgdg264.7 KiBpostgresql-16-rum_1.3.15-1.pgdg22.04+1_amd64.deb
postgresql-16-rum1.3.15u22.aarch64pgdg256.7 KiBpostgresql-16-rum_1.3.15-1.pgdg22.04+1_arm64.deb
postgresql-16-rum1.3.15u24.x86_64pgdg234.9 KiBpostgresql-16-rum_1.3.15-1.pgdg24.04+1_amd64.deb
postgresql-16-rum1.3.15u24.aarch64pgdg226.9 KiBpostgresql-16-rum_1.3.15-1.pgdg24.04+1_arm64.deb
PackageVersionOSORGSIZEFile URL
rum_141.3.14el8.x86_64pgdg111.7 KiBrum_14-1.3.14-1PGDG.rhel8.x86_64.rpm
rum_141.3.13el8.x86_64pgdg111.1 KiBrum_14-1.3.13-1.rhel8.x86_64.rpm
rum_141.3.8el8.x86_64pgdg308.8 KiBrum_14-1.3.8-1.rhel8.x86_64.rpm
rum_141.3.14el8.aarch64pgdg104.3 KiBrum_14-1.3.14-1PGDG.rhel8.aarch64.rpm
rum_141.3.13el8.aarch64pgdg103.8 KiBrum_14-1.3.13-1.rhel8.aarch64.rpm
rum_141.3.14el9.x86_64pgdg111.1 KiBrum_14-1.3.14-1PGDG.rhel9.x86_64.rpm
rum_141.3.13el9.x86_64pgdg111.1 KiBrum_14-1.3.13-1.rhel9.x86_64.rpm
rum_141.3.14el9.aarch64pgdg105.8 KiBrum_14-1.3.14-1PGDG.rhel9.aarch64.rpm
rum_141.3.13el9.aarch64pgdg105.8 KiBrum_14-1.3.13-1.rhel9.aarch64.rpm
rum_141.3.14el10.x86_64pgdg111.8 KiBrum_14-1.3.14-2PGDG.rhel10.x86_64.rpm
rum_141.3.14el10.aarch64pgdg107.1 KiBrum_14-1.3.14-2PGDG.rhel10.aarch64.rpm
postgresql-14-rum1.3.15d12.x86_64pgdg287.6 KiBpostgresql-14-rum_1.3.15-1.pgdg12+1_amd64.deb
postgresql-14-rum1.3.15d12.aarch64pgdg277.0 KiBpostgresql-14-rum_1.3.15-1.pgdg12+1_arm64.deb
postgresql-14-rum1.3.15d13.x86_64pgdg287.9 KiBpostgresql-14-rum_1.3.15-1.pgdg13+1_amd64.deb
postgresql-14-rum1.3.15d13.aarch64pgdg277.5 KiBpostgresql-14-rum_1.3.15-1.pgdg13+1_arm64.deb
postgresql-14-rum1.3.15u22.x86_64pgdg324.6 KiBpostgresql-14-rum_1.3.15-1.pgdg22.04+1_amd64.deb
postgresql-14-rum1.3.15u22.aarch64pgdg314.5 KiBpostgresql-14-rum_1.3.15-1.pgdg22.04+1_arm64.deb
postgresql-14-rum1.3.15u24.x86_64pgdg287.2 KiBpostgresql-14-rum_1.3.15-1.pgdg24.04+1_amd64.deb
postgresql-14-rum1.3.15u24.aarch64pgdg277.8 KiBpostgresql-14-rum_1.3.15-1.pgdg24.04+1_arm64.deb

Source

pig build pkg rum;		# build rpm

Install

Make sure PGDG and PIGSTY repo available:

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

Install this extension with pig:

pig install rum;		# install via package name, for the active PG version

pig install rum -v 18;   # install for PG 18
pig install rum -v 17;   # install for PG 17
pig install rum -v 16;   # install for PG 16
pig install rum -v 15;   # install for PG 15
pig install rum -v 14;   # install for PG 14

Create this extension with:

CREATE EXTENSION rum;

Usage

rum: RUM index access method

RUM is an index access method that extends GIN by storing additional information in the posting tree. This enables direct access to positional data, avoiding extra heap scans for ranking, phrase searches, and timestamp ordering.

Index Creation

CREATE INDEX idx ON table_name USING rum (column operator_class);

With addon operators (e.g., ordering by a timestamp alongside full-text search):

CREATE INDEX tsts_idx ON tsts USING rum (t rum_tsvector_addon_ops, d)
    WITH (attach = 'd', to = 't');

Operator Classes

Operator ClassDescription
rum_tsvector_opsStores tsvector lexemes with positions. Supports <=> ordering and prefix search.
rum_tsvector_hash_opsStores hashed tsvector lexemes with positions. Supports <=> ordering, no prefix search.
rum_tsvector_addon_opsCombines tsvector with additional fields (timestamps, integers, etc.) for filtering and ordering.
rum_tsvector_hash_addon_opsHashed variant supporting addon fields, no prefix search.
rum_tsquery_opsStores tsquery branches for fast query matching against indexed documents.
rum_anyarray_opsIndexes array types. Supports &&, @>, <@, =, % and <=> ordering.
rum_anyarray_addon_opsCombines array elements with additional fields.
rum_TYPE_opsGeneric ops for int2, int4, int8, float4, float8, money, oid, time, timetz, date, interval, macaddr, inet, cidr, text, varchar, char, bytea, bit, varbit, numeric, timestamp, timestamptz.

Ordering Operators

OperatorDescription
<=>Distance operator for tsvector, timestamp, numeric types, arrays
<=|Left-side distance for timestamp, int, float, money, oid
|=>Right-side distance for timestamp, int, float, money, oid

Examples

Full-text search with ranking:

SELECT t, a <=> to_tsquery('english', 'beautiful | place') AS rank
FROM test_rum
WHERE a @@ to_tsquery('english', 'beautiful | place')
ORDER BY a <=> to_tsquery('english', 'beautiful | place');

Timestamp-ordered full-text search:

SELECT id, d, d <=> '2016-05-16 14:21:25' FROM tsts
WHERE t @@ 'wr&qh'
ORDER BY d <=> '2016-05-16 14:21:25'
LIMIT 5;

Array matching with distance ordering:

SELECT * FROM test_array
WHERE i && '{1}'
ORDER BY i <=> '{1}' ASC;
Last updated on