跳转到主要内容

pgroonga

Use Groonga as index, fast full text search platform for all languages!

pgroonga : Use Groonga as index, fast full text search platform for all languages!

Overview

ID Extension Package Version Category License Language
2110 pgroonga pgroonga 4.1.0 FTS PostgreSQL C
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--s-d-- Yes Yes No Yes no no
Requires Groonga >= 15.1.7, MessagePack and xxHash.

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT PIGSTY 4.1.0 18 17 16 15 14 pgroonga -
RPM PIGSTY 4.1.0 18 17 16 15 14 pgroonga_$v groonga-libs, msgpack, xxhash-libs
DEB PIGSTY 4.1.0 18 17 16 15 14 postgresql-$v-pgroonga libgroonga0, `libmsgpackc2
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0
el8.aarch64 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0
el9.x86_64 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0
el9.aarch64 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0
el10.x86_64 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0
el10.aarch64 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0
d12.x86_64 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0
d12.aarch64 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0
d13.x86_64 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0
d13.aarch64 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0
u22.x86_64 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0
u22.aarch64 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0
u24.x86_64 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0
u24.aarch64 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0
u26.x86_64 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0
u26.aarch64 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0 PIGSTY 4.1.0
Package Version OS ORG SIZE File URL
pgroonga_18 4.1.0 el8.x86_64 pigsty 242.7 KiB pgroonga_18-4.1.0-1PGSTY.el8.x86_64.rpm
pgroonga_18 4.1.0 el8.aarch64 pigsty 229.6 KiB pgroonga_18-4.1.0-1PGSTY.el8.aarch64.rpm
pgroonga_18 4.1.0 el9.x86_64 pigsty 247.0 KiB pgroonga_18-4.1.0-1PGSTY.el9.x86_64.rpm
pgroonga_18 4.1.0 el9.aarch64 pigsty 239.4 KiB pgroonga_18-4.1.0-1PGSTY.el9.aarch64.rpm
pgroonga_18 4.1.0 el10.x86_64 pigsty 249.9 KiB pgroonga_18-4.1.0-1PGSTY.el10.x86_64.rpm
pgroonga_18 4.1.0 el10.aarch64 pigsty 240.6 KiB pgroonga_18-4.1.0-1PGSTY.el10.aarch64.rpm
postgresql-18-pgroonga 4.1.0 d12.x86_64 pigsty 181.7 KiB postgresql-18-pgroonga_4.1.0-1PGSTY~bookworm_amd64.deb
postgresql-18-pgroonga 4.1.0 d12.aarch64 pigsty 163.5 KiB postgresql-18-pgroonga_4.1.0-1PGSTY~bookworm_arm64.deb
postgresql-18-pgroonga 4.1.0 d13.x86_64 pigsty 182.3 KiB postgresql-18-pgroonga_4.1.0-1PGSTY~trixie_amd64.deb
postgresql-18-pgroonga 4.1.0 d13.aarch64 pigsty 164.5 KiB postgresql-18-pgroonga_4.1.0-1PGSTY~trixie_arm64.deb
postgresql-18-pgroonga 4.1.0 u22.x86_64 pigsty 197.6 KiB postgresql-18-pgroonga_4.1.0-1PGSTY~jammy_amd64.deb
postgresql-18-pgroonga 4.1.0 u22.aarch64 pigsty 190.8 KiB postgresql-18-pgroonga_4.1.0-1PGSTY~jammy_arm64.deb
postgresql-18-pgroonga 4.1.0 u24.x86_64 pigsty 191.8 KiB postgresql-18-pgroonga_4.1.0-1PGSTY~noble_amd64.deb
postgresql-18-pgroonga 4.1.0 u24.aarch64 pigsty 185.9 KiB postgresql-18-pgroonga_4.1.0-1PGSTY~noble_arm64.deb
postgresql-18-pgroonga 4.1.0 u26.x86_64 pigsty 194.0 KiB postgresql-18-pgroonga_4.1.0-1PGSTY~resolute_amd64.deb
postgresql-18-pgroonga 4.1.0 u26.aarch64 pigsty 184.2 KiB postgresql-18-pgroonga_4.1.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pgroonga_17 4.1.0 el8.x86_64 pigsty 242.7 KiB pgroonga_17-4.1.0-1PGSTY.el8.x86_64.rpm
pgroonga_17 4.1.0 el8.aarch64 pigsty 229.4 KiB pgroonga_17-4.1.0-1PGSTY.el8.aarch64.rpm
pgroonga_17 4.1.0 el9.x86_64 pigsty 247.0 KiB pgroonga_17-4.1.0-1PGSTY.el9.x86_64.rpm
pgroonga_17 4.1.0 el9.aarch64 pigsty 239.2 KiB pgroonga_17-4.1.0-1PGSTY.el9.aarch64.rpm
pgroonga_17 4.1.0 el10.x86_64 pigsty 250.1 KiB pgroonga_17-4.1.0-1PGSTY.el10.x86_64.rpm
pgroonga_17 4.1.0 el10.aarch64 pigsty 240.7 KiB pgroonga_17-4.1.0-1PGSTY.el10.aarch64.rpm
postgresql-17-pgroonga 4.1.0 d12.x86_64 pigsty 181.3 KiB postgresql-17-pgroonga_4.1.0-1PGSTY~bookworm_amd64.deb
postgresql-17-pgroonga 4.1.0 d12.aarch64 pigsty 163.7 KiB postgresql-17-pgroonga_4.1.0-1PGSTY~bookworm_arm64.deb
postgresql-17-pgroonga 4.1.0 d13.x86_64 pigsty 182.3 KiB postgresql-17-pgroonga_4.1.0-1PGSTY~trixie_amd64.deb
postgresql-17-pgroonga 4.1.0 d13.aarch64 pigsty 164.7 KiB postgresql-17-pgroonga_4.1.0-1PGSTY~trixie_arm64.deb
postgresql-17-pgroonga 4.1.0 u22.x86_64 pigsty 197.4 KiB postgresql-17-pgroonga_4.1.0-1PGSTY~jammy_amd64.deb
postgresql-17-pgroonga 4.1.0 u22.aarch64 pigsty 190.5 KiB postgresql-17-pgroonga_4.1.0-1PGSTY~jammy_arm64.deb
postgresql-17-pgroonga 4.1.0 u24.x86_64 pigsty 191.4 KiB postgresql-17-pgroonga_4.1.0-1PGSTY~noble_amd64.deb
postgresql-17-pgroonga 4.1.0 u24.aarch64 pigsty 185.7 KiB postgresql-17-pgroonga_4.1.0-1PGSTY~noble_arm64.deb
postgresql-17-pgroonga 4.1.0 u26.x86_64 pigsty 194.0 KiB postgresql-17-pgroonga_4.1.0-1PGSTY~resolute_amd64.deb
postgresql-17-pgroonga 4.1.0 u26.aarch64 pigsty 184.2 KiB postgresql-17-pgroonga_4.1.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pgroonga_16 4.1.0 el8.x86_64 pigsty 240.4 KiB pgroonga_16-4.1.0-1PGSTY.el8.x86_64.rpm
pgroonga_16 4.1.0 el8.aarch64 pigsty 227.2 KiB pgroonga_16-4.1.0-1PGSTY.el8.aarch64.rpm
pgroonga_16 4.1.0 el9.x86_64 pigsty 244.9 KiB pgroonga_16-4.1.0-1PGSTY.el9.x86_64.rpm
pgroonga_16 4.1.0 el9.aarch64 pigsty 237.3 KiB pgroonga_16-4.1.0-1PGSTY.el9.aarch64.rpm
pgroonga_16 4.1.0 el10.x86_64 pigsty 247.7 KiB pgroonga_16-4.1.0-1PGSTY.el10.x86_64.rpm
pgroonga_16 4.1.0 el10.aarch64 pigsty 238.5 KiB pgroonga_16-4.1.0-1PGSTY.el10.aarch64.rpm
postgresql-16-pgroonga 4.1.0 d12.x86_64 pigsty 179.6 KiB postgresql-16-pgroonga_4.1.0-1PGSTY~bookworm_amd64.deb
postgresql-16-pgroonga 4.1.0 d12.aarch64 pigsty 161.8 KiB postgresql-16-pgroonga_4.1.0-1PGSTY~bookworm_arm64.deb
postgresql-16-pgroonga 4.1.0 d13.x86_64 pigsty 180.2 KiB postgresql-16-pgroonga_4.1.0-1PGSTY~trixie_amd64.deb
postgresql-16-pgroonga 4.1.0 d13.aarch64 pigsty 162.7 KiB postgresql-16-pgroonga_4.1.0-1PGSTY~trixie_arm64.deb
postgresql-16-pgroonga 4.1.0 u22.x86_64 pigsty 195.2 KiB postgresql-16-pgroonga_4.1.0-1PGSTY~jammy_amd64.deb
postgresql-16-pgroonga 4.1.0 u22.aarch64 pigsty 188.3 KiB postgresql-16-pgroonga_4.1.0-1PGSTY~jammy_arm64.deb
postgresql-16-pgroonga 4.1.0 u24.x86_64 pigsty 189.9 KiB postgresql-16-pgroonga_4.1.0-1PGSTY~noble_amd64.deb
postgresql-16-pgroonga 4.1.0 u24.aarch64 pigsty 183.7 KiB postgresql-16-pgroonga_4.1.0-1PGSTY~noble_arm64.deb
postgresql-16-pgroonga 4.1.0 u26.x86_64 pigsty 191.8 KiB postgresql-16-pgroonga_4.1.0-1PGSTY~resolute_amd64.deb
postgresql-16-pgroonga 4.1.0 u26.aarch64 pigsty 182.6 KiB postgresql-16-pgroonga_4.1.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pgroonga_15 4.1.0 el8.x86_64 pigsty 239.8 KiB pgroonga_15-4.1.0-1PGSTY.el8.x86_64.rpm
pgroonga_15 4.1.0 el8.aarch64 pigsty 226.8 KiB pgroonga_15-4.1.0-1PGSTY.el8.aarch64.rpm
pgroonga_15 4.1.0 el9.x86_64 pigsty 244.0 KiB pgroonga_15-4.1.0-1PGSTY.el9.x86_64.rpm
pgroonga_15 4.1.0 el9.aarch64 pigsty 236.7 KiB pgroonga_15-4.1.0-1PGSTY.el9.aarch64.rpm
pgroonga_15 4.1.0 el10.x86_64 pigsty 247.4 KiB pgroonga_15-4.1.0-1PGSTY.el10.x86_64.rpm
pgroonga_15 4.1.0 el10.aarch64 pigsty 238.0 KiB pgroonga_15-4.1.0-1PGSTY.el10.aarch64.rpm
postgresql-15-pgroonga 4.1.0 d12.x86_64 pigsty 179.2 KiB postgresql-15-pgroonga_4.1.0-1PGSTY~bookworm_amd64.deb
postgresql-15-pgroonga 4.1.0 d12.aarch64 pigsty 161.3 KiB postgresql-15-pgroonga_4.1.0-1PGSTY~bookworm_arm64.deb
postgresql-15-pgroonga 4.1.0 d13.x86_64 pigsty 180.9 KiB postgresql-15-pgroonga_4.1.0-1PGSTY~trixie_amd64.deb
postgresql-15-pgroonga 4.1.0 d13.aarch64 pigsty 162.3 KiB postgresql-15-pgroonga_4.1.0-1PGSTY~trixie_arm64.deb
postgresql-15-pgroonga 4.1.0 u22.x86_64 pigsty 194.5 KiB postgresql-15-pgroonga_4.1.0-1PGSTY~jammy_amd64.deb
postgresql-15-pgroonga 4.1.0 u22.aarch64 pigsty 187.8 KiB postgresql-15-pgroonga_4.1.0-1PGSTY~jammy_arm64.deb
postgresql-15-pgroonga 4.1.0 u24.x86_64 pigsty 189.4 KiB postgresql-15-pgroonga_4.1.0-1PGSTY~noble_amd64.deb
postgresql-15-pgroonga 4.1.0 u24.aarch64 pigsty 183.0 KiB postgresql-15-pgroonga_4.1.0-1PGSTY~noble_arm64.deb
postgresql-15-pgroonga 4.1.0 u26.x86_64 pigsty 191.3 KiB postgresql-15-pgroonga_4.1.0-1PGSTY~resolute_amd64.deb
postgresql-15-pgroonga 4.1.0 u26.aarch64 pigsty 182.2 KiB postgresql-15-pgroonga_4.1.0-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
pgroonga_14 4.1.0 el8.x86_64 pigsty 221.5 KiB pgroonga_14-4.1.0-1PGSTY.el8.x86_64.rpm
pgroonga_14 4.1.0 el8.aarch64 pigsty 211.3 KiB pgroonga_14-4.1.0-1PGSTY.el8.aarch64.rpm
pgroonga_14 4.1.0 el9.x86_64 pigsty 226.9 KiB pgroonga_14-4.1.0-1PGSTY.el9.x86_64.rpm
pgroonga_14 4.1.0 el9.aarch64 pigsty 220.5 KiB pgroonga_14-4.1.0-1PGSTY.el9.aarch64.rpm
pgroonga_14 4.1.0 el10.x86_64 pigsty 230.1 KiB pgroonga_14-4.1.0-1PGSTY.el10.x86_64.rpm
pgroonga_14 4.1.0 el10.aarch64 pigsty 221.6 KiB pgroonga_14-4.1.0-1PGSTY.el10.aarch64.rpm
postgresql-14-pgroonga 4.1.0 d12.x86_64 pigsty 163.9 KiB postgresql-14-pgroonga_4.1.0-1PGSTY~bookworm_amd64.deb
postgresql-14-pgroonga 4.1.0 d12.aarch64 pigsty 148.3 KiB postgresql-14-pgroonga_4.1.0-1PGSTY~bookworm_arm64.deb
postgresql-14-pgroonga 4.1.0 d13.x86_64 pigsty 165.0 KiB postgresql-14-pgroonga_4.1.0-1PGSTY~trixie_amd64.deb
postgresql-14-pgroonga 4.1.0 d13.aarch64 pigsty 149.1 KiB postgresql-14-pgroonga_4.1.0-1PGSTY~trixie_arm64.deb
postgresql-14-pgroonga 4.1.0 u22.x86_64 pigsty 178.3 KiB postgresql-14-pgroonga_4.1.0-1PGSTY~jammy_amd64.deb
postgresql-14-pgroonga 4.1.0 u22.aarch64 pigsty 172.2 KiB postgresql-14-pgroonga_4.1.0-1PGSTY~jammy_arm64.deb
postgresql-14-pgroonga 4.1.0 u24.x86_64 pigsty 173.3 KiB postgresql-14-pgroonga_4.1.0-1PGSTY~noble_amd64.deb
postgresql-14-pgroonga 4.1.0 u24.aarch64 pigsty 167.9 KiB postgresql-14-pgroonga_4.1.0-1PGSTY~noble_arm64.deb
postgresql-14-pgroonga 4.1.0 u26.x86_64 pigsty 175.1 KiB postgresql-14-pgroonga_4.1.0-1PGSTY~resolute_amd64.deb
postgresql-14-pgroonga 4.1.0 u26.aarch64 pigsty 167.2 KiB postgresql-14-pgroonga_4.1.0-1PGSTY~resolute_arm64.deb

Source

pig build pkg pgroonga;		# build rpm/deb

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 pgroonga;		# install via package name, for the active PG version

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

Create this extension with:

CREATE EXTENSION pgroonga;

Usage

Sources:

pgroonga 4.1.0 provides Groonga-backed indexes for multilingual full-text search. It installs the pgroonga access method and SQL operators; ordinary use does not require shared preload.

Core Workflow

Install compatible PGroonga and Groonga libraries, then create the extension as an administrator:

CREATE EXTENSION pgroonga;
CREATE TABLE search_notes (id bigint PRIMARY KEY, body text);
CREATE INDEX search_notes_body_idx ON search_notes USING pgroonga (body);
INSERT INTO search_notes VALUES (1, 'PostgreSQL supports full text search');
SELECT id, body FROM search_notes WHERE body &@ 'PostgreSQL';
SELECT id, body, pgroonga_score(tableoid, ctid) AS score
FROM search_notes WHERE body &@~ 'PostgreSQL OR Groonga'
ORDER BY score DESC;

Important Objects

  • &@ matches a keyword; &@~ accepts Groonga query syntax. Supported LIKE/ILIKE searches can also use the index, with rechecks where required.
  • pgroonga_score(tableoid, ctid) retrieves search scores. Confirm the intended index plan when using score-based ordering.
  • pgroonga_highlight_html() and pgroonga_query_extract_keywords() produce highlighted search results; pgroonga_snippet_html() provides surrounding text.
  • New in 4.0.9, pgroonga_physical_table_names(partitioned_index, prefix) returns a text array of Groonga command arguments identifying the physical tables behind partition indexes. This release also increments pg_stat_user_indexes.idx_scan for PGroonga scans.

Maintenance and Privileges

The 4.0.9 control file declares neither trusted installation nor relocatability; do not assume ordinary users can install it or move it between schemas. Index creation and queries follow the relevant table privileges. Match the extension and Groonga libraries to the target PostgreSQL build and follow upstream upgrade guidance before replacing binaries.

PGroonga manages derived index files in addition to table data. Plan disk capacity and backup/recovery procedures accordingly. Use REINDEX for index repair where appropriate. The separate pgroonga_database module is a recovery tool for damaged internal Groonga databases and is not needed for normal searches. Do not disable sequential scans globally merely to force an index in production.

Pigsty Runtime Compatibility

The current Pigsty EL8 and EL9 packages have a confirmed coexistence limit with PostGIS Raster on both x86_64 and aarch64, across PostgreSQL 14–18. Groonga uses Arrow 22, while the tested GDAL/Raster stacks use Arrow 8 on EL8 and Arrow 9 on EL9. Loading both stacks into one PostgreSQL backend can crash it; a successful SQL query does not prove a normal backend exit.

Changing load order is not a complete fix: automatic session preload still produced backend-exit crashes on EL9 aarch64. Avoid enabling both stacks in the same backend until a compatible dependency combination is verified; isolate their use when necessary. The tested EL10 and Debian/Ubuntu combinations did not reproduce this failure, which does not establish compatibility for arbitrary other dependency versions. This is a Pigsty package-stack boundary, not an upstream requirement to preload PGroonga for ordinary search.

MeCab tokenization additionally needs the matching Groonga tokenizer plugin and dictionary. Installing the PostgreSQL extension alone does not supply every optional tokenizer; verify the requested tokenizer before building an index that names it.

Version 4.1.0

Version 4.1.0 fixes another session running VACUUM/ANALYZE before CREATE INDEX commits, which could remove index data. An index already affected may need REINDEX. Direct Groonga calls can use pgroonga_tuple_is_alive in post_filter with Groonga 16.1.3 or later. This source release does not change the separately documented Pigsty dependency-stack limitation.