Skip to content

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

IDExtensionPackageVersionCategoryLicenseLanguage
2110pgroongapgroonga4.1.0FTSPostgreSQLC
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-d--YesYesNoYesnono
PG15-19 packages require Groonga >=16.1.8 (Debian 12: >=16.0.5).

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXTPIGSTY4.1.019 18 17 16 15pgroonga-
RPMPIGSTY4.1.019 18 17 16 15pgroonga_$vgroonga-libs, msgpack, xxhash-libs
DEBPIGSTY4.1.019 18 17 16 15postgresql-$v-pgroongalibgroonga0, `libmsgpackc2
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
el8.aarch64N/APIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
el9.x86_64PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
el9.aarch64PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
el10.x86_64PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
el10.aarch64PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
d12.x86_64PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
d12.aarch64PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
d13.x86_64PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
d13.aarch64PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
u22.x86_64PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
u22.aarch64PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
u24.x86_64PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
u24.aarch64PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
u26.x86_64PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
u26.aarch64PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
PackageVersionOSORGSIZEFile URL
pgroonga_194.1.0el9.x86_64pigsty248.0 KiBpgroonga_19-4.1.0-5PGSTY.el9.x86_64.rpm
pgroonga_194.1.0el9.aarch64pigsty240.0 KiBpgroonga_19-4.1.0-5PGSTY.el9.aarch64.rpm
pgroonga_194.1.0el10.x86_64pigsty250.9 KiBpgroonga_19-4.1.0-3PGSTY.el10.x86_64.rpm
pgroonga_194.1.0el10.aarch64pigsty240.8 KiBpgroonga_19-4.1.0-3PGSTY.el10.aarch64.rpm
postgresql-19-pgroonga4.1.0d12.x86_64pigsty181.5 KiBpostgresql-19-pgroonga_4.1.0-1PGSTY~bookworm_amd64.deb
postgresql-19-pgroonga4.1.0d12.aarch64pigsty163.1 KiBpostgresql-19-pgroonga_4.1.0-1PGSTY~bookworm_arm64.deb
postgresql-19-pgroonga4.1.0d13.x86_64pigsty183.2 KiBpostgresql-19-pgroonga_4.1.0-2PGSTY~trixie_amd64.deb
postgresql-19-pgroonga4.1.0d13.aarch64pigsty164.2 KiBpostgresql-19-pgroonga_4.1.0-2PGSTY~trixie_arm64.deb
postgresql-19-pgroonga4.1.0u22.x86_64pigsty198.0 KiBpostgresql-19-pgroonga_4.1.0-2PGSTY~jammy_amd64.deb
postgresql-19-pgroonga4.1.0u22.aarch64pigsty190.7 KiBpostgresql-19-pgroonga_4.1.0-2PGSTY~jammy_arm64.deb
postgresql-19-pgroonga4.1.0u24.x86_64pigsty192.1 KiBpostgresql-19-pgroonga_4.1.0-2PGSTY~noble_amd64.deb
postgresql-19-pgroonga4.1.0u24.aarch64pigsty185.7 KiBpostgresql-19-pgroonga_4.1.0-2PGSTY~noble_arm64.deb
postgresql-19-pgroonga4.1.0u26.x86_64pigsty194.1 KiBpostgresql-19-pgroonga_4.1.0-2PGSTY~resolute_amd64.deb
postgresql-19-pgroonga4.1.0u26.aarch64pigsty184.5 KiBpostgresql-19-pgroonga_4.1.0-2PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
pgroonga_184.1.0el8.x86_64pigsty247.9 KiBpgroonga_18-4.1.0-3PGSTY.el8.x86_64.rpm
pgroonga_184.1.0el8.aarch64pigsty226.5 KiBpgroonga_18-4.1.0-3PGSTY.el8.aarch64.rpm
pgroonga_184.1.0el9.x86_64pigsty247.7 KiBpgroonga_18-4.1.0-5PGSTY.el9.x86_64.rpm
pgroonga_184.1.0el9.aarch64pigsty240.1 KiBpgroonga_18-4.1.0-5PGSTY.el9.aarch64.rpm
pgroonga_184.1.0el10.x86_64pigsty250.8 KiBpgroonga_18-4.1.0-3PGSTY.el10.x86_64.rpm
pgroonga_184.1.0el10.aarch64pigsty241.2 KiBpgroonga_18-4.1.0-3PGSTY.el10.aarch64.rpm
postgresql-18-pgroonga4.1.0d12.x86_64pigsty182.1 KiBpostgresql-18-pgroonga_4.1.0-1PGSTY~bookworm_amd64.deb
postgresql-18-pgroonga4.1.0d12.aarch64pigsty163.5 KiBpostgresql-18-pgroonga_4.1.0-1PGSTY~bookworm_arm64.deb
postgresql-18-pgroonga4.1.0d13.x86_64pigsty182.4 KiBpostgresql-18-pgroonga_4.1.0-2PGSTY~trixie_amd64.deb
postgresql-18-pgroonga4.1.0d13.aarch64pigsty164.0 KiBpostgresql-18-pgroonga_4.1.0-2PGSTY~trixie_arm64.deb
postgresql-18-pgroonga4.1.0u22.x86_64pigsty197.7 KiBpostgresql-18-pgroonga_4.1.0-2PGSTY~jammy_amd64.deb
postgresql-18-pgroonga4.1.0u22.aarch64pigsty190.9 KiBpostgresql-18-pgroonga_4.1.0-2PGSTY~jammy_arm64.deb
postgresql-18-pgroonga4.1.0u24.x86_64pigsty192.1 KiBpostgresql-18-pgroonga_4.1.0-2PGSTY~noble_amd64.deb
postgresql-18-pgroonga4.1.0u24.aarch64pigsty186.0 KiBpostgresql-18-pgroonga_4.1.0-2PGSTY~noble_arm64.deb
postgresql-18-pgroonga4.1.0u26.x86_64pigsty194.2 KiBpostgresql-18-pgroonga_4.1.0-2PGSTY~resolute_amd64.deb
postgresql-18-pgroonga4.1.0u26.aarch64pigsty184.5 KiBpostgresql-18-pgroonga_4.1.0-2PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
pgroonga_174.1.0el8.x86_64pigsty248.0 KiBpgroonga_17-4.1.0-3PGSTY.el8.x86_64.rpm
pgroonga_174.1.0el8.aarch64pigsty226.5 KiBpgroonga_17-4.1.0-3PGSTY.el8.aarch64.rpm
pgroonga_174.1.0el9.x86_64pigsty247.8 KiBpgroonga_17-4.1.0-5PGSTY.el9.x86_64.rpm
pgroonga_174.1.0el9.aarch64pigsty239.8 KiBpgroonga_17-4.1.0-5PGSTY.el9.aarch64.rpm
pgroonga_174.1.0el10.x86_64pigsty250.9 KiBpgroonga_17-4.1.0-3PGSTY.el10.x86_64.rpm
pgroonga_174.1.0el10.aarch64pigsty241.2 KiBpgroonga_17-4.1.0-3PGSTY.el10.aarch64.rpm
postgresql-17-pgroonga4.1.0d12.x86_64pigsty181.7 KiBpostgresql-17-pgroonga_4.1.0-1PGSTY~bookworm_amd64.deb
postgresql-17-pgroonga4.1.0d12.aarch64pigsty163.8 KiBpostgresql-17-pgroonga_4.1.0-1PGSTY~bookworm_arm64.deb
postgresql-17-pgroonga4.1.0d13.x86_64pigsty182.6 KiBpostgresql-17-pgroonga_4.1.0-2PGSTY~trixie_amd64.deb
postgresql-17-pgroonga4.1.0d13.aarch64pigsty164.2 KiBpostgresql-17-pgroonga_4.1.0-2PGSTY~trixie_arm64.deb
postgresql-17-pgroonga4.1.0u22.x86_64pigsty197.5 KiBpostgresql-17-pgroonga_4.1.0-2PGSTY~jammy_amd64.deb
postgresql-17-pgroonga4.1.0u22.aarch64pigsty190.7 KiBpostgresql-17-pgroonga_4.1.0-2PGSTY~jammy_arm64.deb
postgresql-17-pgroonga4.1.0u24.x86_64pigsty191.5 KiBpostgresql-17-pgroonga_4.1.0-2PGSTY~noble_amd64.deb
postgresql-17-pgroonga4.1.0u24.aarch64pigsty185.9 KiBpostgresql-17-pgroonga_4.1.0-2PGSTY~noble_arm64.deb
postgresql-17-pgroonga4.1.0u26.x86_64pigsty194.0 KiBpostgresql-17-pgroonga_4.1.0-2PGSTY~resolute_amd64.deb
postgresql-17-pgroonga4.1.0u26.aarch64pigsty184.5 KiBpostgresql-17-pgroonga_4.1.0-2PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
pgroonga_164.1.0el8.x86_64pigsty245.8 KiBpgroonga_16-4.1.0-3PGSTY.el8.x86_64.rpm
pgroonga_164.1.0el8.aarch64pigsty224.7 KiBpgroonga_16-4.1.0-3PGSTY.el8.aarch64.rpm
pgroonga_164.1.0el9.x86_64pigsty245.7 KiBpgroonga_16-4.1.0-5PGSTY.el9.x86_64.rpm
pgroonga_164.1.0el9.aarch64pigsty238.0 KiBpgroonga_16-4.1.0-5PGSTY.el9.aarch64.rpm
pgroonga_164.1.0el10.x86_64pigsty248.4 KiBpgroonga_16-4.1.0-3PGSTY.el10.x86_64.rpm
pgroonga_164.1.0el10.aarch64pigsty239.3 KiBpgroonga_16-4.1.0-3PGSTY.el10.aarch64.rpm
postgresql-16-pgroonga4.1.0d12.x86_64pigsty179.4 KiBpostgresql-16-pgroonga_4.1.0-1PGSTY~bookworm_amd64.deb
postgresql-16-pgroonga4.1.0d12.aarch64pigsty161.6 KiBpostgresql-16-pgroonga_4.1.0-1PGSTY~bookworm_arm64.deb
postgresql-16-pgroonga4.1.0d13.x86_64pigsty180.3 KiBpostgresql-16-pgroonga_4.1.0-2PGSTY~trixie_amd64.deb
postgresql-16-pgroonga4.1.0d13.aarch64pigsty162.9 KiBpostgresql-16-pgroonga_4.1.0-2PGSTY~trixie_arm64.deb
postgresql-16-pgroonga4.1.0u22.x86_64pigsty195.4 KiBpostgresql-16-pgroonga_4.1.0-2PGSTY~jammy_amd64.deb
postgresql-16-pgroonga4.1.0u22.aarch64pigsty188.6 KiBpostgresql-16-pgroonga_4.1.0-2PGSTY~jammy_arm64.deb
postgresql-16-pgroonga4.1.0u24.x86_64pigsty190.0 KiBpostgresql-16-pgroonga_4.1.0-2PGSTY~noble_amd64.deb
postgresql-16-pgroonga4.1.0u24.aarch64pigsty183.9 KiBpostgresql-16-pgroonga_4.1.0-2PGSTY~noble_arm64.deb
postgresql-16-pgroonga4.1.0u26.x86_64pigsty191.6 KiBpostgresql-16-pgroonga_4.1.0-2PGSTY~resolute_amd64.deb
postgresql-16-pgroonga4.1.0u26.aarch64pigsty182.4 KiBpostgresql-16-pgroonga_4.1.0-2PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
pgroonga_154.1.0el8.x86_64pigsty245.8 KiBpgroonga_15-4.1.0-3PGSTY.el8.x86_64.rpm
pgroonga_154.1.0el8.aarch64pigsty224.5 KiBpgroonga_15-4.1.0-3PGSTY.el8.aarch64.rpm
pgroonga_154.1.0el9.x86_64pigsty244.9 KiBpgroonga_15-4.1.0-5PGSTY.el9.x86_64.rpm
pgroonga_154.1.0el9.aarch64pigsty237.5 KiBpgroonga_15-4.1.0-5PGSTY.el9.aarch64.rpm
pgroonga_154.1.0el10.x86_64pigsty248.2 KiBpgroonga_15-4.1.0-3PGSTY.el10.x86_64.rpm
pgroonga_154.1.0el10.aarch64pigsty238.5 KiBpgroonga_15-4.1.0-3PGSTY.el10.aarch64.rpm
postgresql-15-pgroonga4.1.0d12.x86_64pigsty179.0 KiBpostgresql-15-pgroonga_4.1.0-1PGSTY~bookworm_amd64.deb
postgresql-15-pgroonga4.1.0d12.aarch64pigsty161.1 KiBpostgresql-15-pgroonga_4.1.0-1PGSTY~bookworm_arm64.deb
postgresql-15-pgroonga4.1.0d13.x86_64pigsty180.6 KiBpostgresql-15-pgroonga_4.1.0-2PGSTY~trixie_amd64.deb
postgresql-15-pgroonga4.1.0d13.aarch64pigsty162.5 KiBpostgresql-15-pgroonga_4.1.0-2PGSTY~trixie_arm64.deb
postgresql-15-pgroonga4.1.0u22.x86_64pigsty194.8 KiBpostgresql-15-pgroonga_4.1.0-2PGSTY~jammy_amd64.deb
postgresql-15-pgroonga4.1.0u22.aarch64pigsty187.9 KiBpostgresql-15-pgroonga_4.1.0-2PGSTY~jammy_arm64.deb
postgresql-15-pgroonga4.1.0u24.x86_64pigsty189.5 KiBpostgresql-15-pgroonga_4.1.0-2PGSTY~noble_amd64.deb
postgresql-15-pgroonga4.1.0u24.aarch64pigsty183.1 KiBpostgresql-15-pgroonga_4.1.0-2PGSTY~noble_arm64.deb
postgresql-15-pgroonga4.1.0u26.x86_64pigsty191.4 KiBpostgresql-15-pgroonga_4.1.0-2PGSTY~resolute_amd64.deb
postgresql-15-pgroonga4.1.0u26.aarch64pigsty182.3 KiBpostgresql-15-pgroonga_4.1.0-2PGSTY~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 by package name

pig install pgroonga -v 19;   # install for PG 19
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

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.1.0 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.5 or later. This source release does not change the separately documented Pigsty dependency-stack limitation.

Table reader