Skip to content

pgroonga_database

Recovery helper for removing a damaged PGroonga internal database

Overview

PackageVersionCategoryLicenseLanguage
pgroonga4.1.0FTSPostgreSQLC
IDExtensionBinLibLoadCreateTrustRelocSchema
2110pgroongaYesYesNoYesNoNo-
2111pgroonga_databaseNoYesNoYesNoNo-

Version

TypeRepoVersionPG VerPackageDeps
EXTPIGSTY4.1.01817161514pgroonga-
RPMPIGSTY4.1.01817161514pgroonga_$vgroonga-libs, msgpack, xxhash-libs
DEBPIGSTY4.1.01817161514postgresql-$v-pgroongalibgroonga0, `libmsgpackc2
OS / PGPG18PG17PG16PG15PG14
el8.x86_64PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0PIGSTY 4.1.0
el8.aarch64PIGSTY 4.1.0PIGSTY 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

Build

You can build the RPM / DEB packages for pgroonga using pig build:

pig build pkg pgroonga         # build RPM / DEB packages

Install

You can install pgroonga directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:

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

Install the extension using pig or apt/yum/dnf:

Install
pig install pgroonga;          # Install for current active PG version
pig
pig ext install -y pgroonga -v 18  # PG 18
pig ext install -y pgroonga -v 17  # PG 17
pig ext install -y pgroonga -v 16  # PG 16
pig ext install -y pgroonga -v 15  # PG 15
pig ext install -y pgroonga -v 14  # PG 14
dnf
dnf install -y pgroonga_18       # PG 18
dnf install -y pgroonga_17       # PG 17
dnf install -y pgroonga_16       # PG 16
dnf install -y pgroonga_15       # PG 15
dnf install -y pgroonga_14       # PG 14
apt
apt install -y postgresql-18-pgroonga   # PG 18
apt install -y postgresql-17-pgroonga   # PG 17
apt install -y postgresql-16-pgroonga   # PG 16
apt install -y postgresql-15-pgroonga   # PG 15
apt install -y postgresql-14-pgroonga   # PG 14

Create Extension:

CREATE EXTENSION pgroonga_database;

Usage

Sources:

pgroonga_database 4.1.0 is a recovery-only helper for a damaged internal PGroonga database. It provides one SQL function that removes PGroonga files from database and applicable tablespace directories. It does not provide the search access method.

Recovery Workflow

Normal index corruption may be repairable with REINDEX alone. Use this module only when the internal Groonga database itself is damaged and a planned rebuild is necessary. Arrange a recovery window and disconnect every session using PGroonga before proceeding; remaining sessions may crash when their files are removed.

In a fresh administrative connection that has not opened any PGroonga index:

CREATE EXTENSION pgroonga_database;
SELECT pgroonga_database_remove();

Disconnect that connection immediately afterward. In another fresh connection, run REINDEX for every PGroonga index to recreate the internal database from PostgreSQL table data. Resume application traffic only after rebuilding and checking all affected indexes.

Return Value and Boundaries

pgroonga_database_remove() returns true when it reaches the end of its cleanup loop. If a tablespace ownership check fails, the loop stops and the function can still return true; this result alone does not prove that every location was cleaned. Other failures can raise errors. It removes the internal files directly; it neither exports them nor rebuilds indexes. Do not use other PGroonga features in the cleanup connection. This is not a routine vacuum, an uninstall command, or an action that can be made safe merely by wrapping the call in a SQL transaction.

The control file does not mark the extension trusted or relocatable. The C implementation checks tablespace ownership when traversing locations. Use an administrator who owns the required locations and verify that the cleanup and full reindex completed. The module has no preload requirement; enable it only for the recovery task.

Version 4.1.0

The 4.1.0 control version is synchronized with PGroonga. The recovery helper remains a destructive file-removal operation; the disconnect/rebuild procedure above is unchanged.

Was this page helpful?