Skip to content

pg_tokenizer

Tokenizers for full-text search

pg_tokenizer · Tokenizers for full-text search

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
2170pg_tokenizerpg_tokenizer1.3.0FTSApache-2.0Rust
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--sLd--NoYesYesYesnono
Preload required. External Lindera 7 format v3 dictionaries.

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXTPIGSTY1.3.019 18 17 16 15pg_tokenizer-
RPMPIGSTY1.3.019 18 17 16 15pg_tokenizer_$v-
DEBPIGSTY1.3.019 18 17 16 15postgresql-$v-pg-tokenizer-
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0
el8.aarch64N/APIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0
el9.x86_64PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0
el9.aarch64PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0
el10.x86_64PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0
el10.aarch64PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0
d12.x86_64PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0
d12.aarch64PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0
d13.x86_64PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0
d13.aarch64PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0
u22.x86_64PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0
u22.aarch64PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0
u24.x86_64PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0
u24.aarch64PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0
u26.x86_64PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0
u26.aarch64PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0PIGSTY 1.3.0
PackageVersionOSORGSIZEFile URL
pg_tokenizer_191.3.0el9.x86_64pigsty16.8 MiBpg_tokenizer_19-1.3.0-1PGSTY.el9.x86_64.rpm
pg_tokenizer_191.3.0el9.aarch64pigsty16.6 MiBpg_tokenizer_19-1.3.0-1PGSTY.el9.aarch64.rpm
pg_tokenizer_191.3.0el10.x86_64pigsty16.7 MiBpg_tokenizer_19-1.3.0-1PGSTY.el10.x86_64.rpm
pg_tokenizer_191.3.0el10.aarch64pigsty16.4 MiBpg_tokenizer_19-1.3.0-1PGSTY.el10.aarch64.rpm
postgresql-19-pg-tokenizer1.3.0d12.x86_64pigsty12.1 MiBpostgresql-19-pg-tokenizer_1.3.0-1PGSTY~bookworm_amd64.deb
postgresql-19-pg-tokenizer1.3.0d12.aarch64pigsty11.8 MiBpostgresql-19-pg-tokenizer_1.3.0-1PGSTY~bookworm_arm64.deb
postgresql-19-pg-tokenizer1.3.0d13.x86_64pigsty12.1 MiBpostgresql-19-pg-tokenizer_1.3.0-1PGSTY~trixie_amd64.deb
postgresql-19-pg-tokenizer1.3.0d13.aarch64pigsty11.8 MiBpostgresql-19-pg-tokenizer_1.3.0-1PGSTY~trixie_arm64.deb
postgresql-19-pg-tokenizer1.3.0u22.x86_64pigsty13.1 MiBpostgresql-19-pg-tokenizer_1.3.0-1PGSTY~jammy_amd64.deb
postgresql-19-pg-tokenizer1.3.0u22.aarch64pigsty12.9 MiBpostgresql-19-pg-tokenizer_1.3.0-1PGSTY~jammy_arm64.deb
postgresql-19-pg-tokenizer1.3.0u24.x86_64pigsty13.1 MiBpostgresql-19-pg-tokenizer_1.3.0-1PGSTY~noble_amd64.deb
postgresql-19-pg-tokenizer1.3.0u24.aarch64pigsty12.8 MiBpostgresql-19-pg-tokenizer_1.3.0-1PGSTY~noble_arm64.deb
postgresql-19-pg-tokenizer1.3.0u26.x86_64pigsty13.1 MiBpostgresql-19-pg-tokenizer_1.3.0-1PGSTY~resolute_amd64.deb
postgresql-19-pg-tokenizer1.3.0u26.aarch64pigsty12.8 MiBpostgresql-19-pg-tokenizer_1.3.0-1PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
pg_tokenizer_181.3.0el8.x86_64pigsty16.8 MiBpg_tokenizer_18-1.3.0-1PGSTY.el8.x86_64.rpm
pg_tokenizer_181.3.0el8.aarch64pigsty16.6 MiBpg_tokenizer_18-1.3.0-1PGSTY.el8.aarch64.rpm
pg_tokenizer_181.3.0el9.x86_64pigsty16.8 MiBpg_tokenizer_18-1.3.0-1PGSTY.el9.x86_64.rpm
pg_tokenizer_181.3.0el9.aarch64pigsty16.6 MiBpg_tokenizer_18-1.3.0-1PGSTY.el9.aarch64.rpm
pg_tokenizer_181.3.0el10.x86_64pigsty16.7 MiBpg_tokenizer_18-1.3.0-1PGSTY.el10.x86_64.rpm
pg_tokenizer_181.3.0el10.aarch64pigsty16.4 MiBpg_tokenizer_18-1.3.0-1PGSTY.el10.aarch64.rpm
postgresql-18-pg-tokenizer1.3.0d12.x86_64pigsty12.1 MiBpostgresql-18-pg-tokenizer_1.3.0-1PGSTY~bookworm_amd64.deb
postgresql-18-pg-tokenizer1.3.0d12.aarch64pigsty11.7 MiBpostgresql-18-pg-tokenizer_1.3.0-1PGSTY~bookworm_arm64.deb
postgresql-18-pg-tokenizer1.3.0d13.x86_64pigsty12.1 MiBpostgresql-18-pg-tokenizer_1.3.0-1PGSTY~trixie_amd64.deb
postgresql-18-pg-tokenizer1.3.0d13.aarch64pigsty11.8 MiBpostgresql-18-pg-tokenizer_1.3.0-1PGSTY~trixie_arm64.deb
postgresql-18-pg-tokenizer1.3.0u22.x86_64pigsty13.2 MiBpostgresql-18-pg-tokenizer_1.3.0-1PGSTY~jammy_amd64.deb
postgresql-18-pg-tokenizer1.3.0u22.aarch64pigsty12.9 MiBpostgresql-18-pg-tokenizer_1.3.0-1PGSTY~jammy_arm64.deb
postgresql-18-pg-tokenizer1.3.0u24.x86_64pigsty13.1 MiBpostgresql-18-pg-tokenizer_1.3.0-1PGSTY~noble_amd64.deb
postgresql-18-pg-tokenizer1.3.0u24.aarch64pigsty12.8 MiBpostgresql-18-pg-tokenizer_1.3.0-1PGSTY~noble_arm64.deb
postgresql-18-pg-tokenizer1.3.0u26.x86_64pigsty13.1 MiBpostgresql-18-pg-tokenizer_1.3.0-1PGSTY~resolute_amd64.deb
postgresql-18-pg-tokenizer1.3.0u26.aarch64pigsty12.8 MiBpostgresql-18-pg-tokenizer_1.3.0-1PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
pg_tokenizer_171.3.0el8.x86_64pigsty16.8 MiBpg_tokenizer_17-1.3.0-1PGSTY.el8.x86_64.rpm
pg_tokenizer_171.3.0el8.aarch64pigsty16.6 MiBpg_tokenizer_17-1.3.0-1PGSTY.el8.aarch64.rpm
pg_tokenizer_171.3.0el9.x86_64pigsty16.8 MiBpg_tokenizer_17-1.3.0-1PGSTY.el9.x86_64.rpm
pg_tokenizer_171.3.0el9.aarch64pigsty16.6 MiBpg_tokenizer_17-1.3.0-1PGSTY.el9.aarch64.rpm
pg_tokenizer_171.3.0el10.x86_64pigsty16.7 MiBpg_tokenizer_17-1.3.0-1PGSTY.el10.x86_64.rpm
pg_tokenizer_171.3.0el10.aarch64pigsty16.4 MiBpg_tokenizer_17-1.3.0-1PGSTY.el10.aarch64.rpm
postgresql-17-pg-tokenizer1.3.0d12.x86_64pigsty12.1 MiBpostgresql-17-pg-tokenizer_1.3.0-1PGSTY~bookworm_amd64.deb
postgresql-17-pg-tokenizer1.3.0d12.aarch64pigsty11.7 MiBpostgresql-17-pg-tokenizer_1.3.0-1PGSTY~bookworm_arm64.deb
postgresql-17-pg-tokenizer1.3.0d13.x86_64pigsty12.1 MiBpostgresql-17-pg-tokenizer_1.3.0-1PGSTY~trixie_amd64.deb
postgresql-17-pg-tokenizer1.3.0d13.aarch64pigsty11.7 MiBpostgresql-17-pg-tokenizer_1.3.0-1PGSTY~trixie_arm64.deb
postgresql-17-pg-tokenizer1.3.0u22.x86_64pigsty13.1 MiBpostgresql-17-pg-tokenizer_1.3.0-1PGSTY~jammy_amd64.deb
postgresql-17-pg-tokenizer1.3.0u22.aarch64pigsty12.9 MiBpostgresql-17-pg-tokenizer_1.3.0-1PGSTY~jammy_arm64.deb
postgresql-17-pg-tokenizer1.3.0u24.x86_64pigsty13.1 MiBpostgresql-17-pg-tokenizer_1.3.0-1PGSTY~noble_amd64.deb
postgresql-17-pg-tokenizer1.3.0u24.aarch64pigsty12.9 MiBpostgresql-17-pg-tokenizer_1.3.0-1PGSTY~noble_arm64.deb
postgresql-17-pg-tokenizer1.3.0u26.x86_64pigsty13.1 MiBpostgresql-17-pg-tokenizer_1.3.0-1PGSTY~resolute_amd64.deb
postgresql-17-pg-tokenizer1.3.0u26.aarch64pigsty12.8 MiBpostgresql-17-pg-tokenizer_1.3.0-1PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
pg_tokenizer_161.3.0el8.x86_64pigsty16.8 MiBpg_tokenizer_16-1.3.0-1PGSTY.el8.x86_64.rpm
pg_tokenizer_161.3.0el8.aarch64pigsty16.6 MiBpg_tokenizer_16-1.3.0-1PGSTY.el8.aarch64.rpm
pg_tokenizer_161.3.0el9.x86_64pigsty16.8 MiBpg_tokenizer_16-1.3.0-1PGSTY.el9.x86_64.rpm
pg_tokenizer_161.3.0el9.aarch64pigsty16.6 MiBpg_tokenizer_16-1.3.0-1PGSTY.el9.aarch64.rpm
pg_tokenizer_161.3.0el10.x86_64pigsty16.7 MiBpg_tokenizer_16-1.3.0-1PGSTY.el10.x86_64.rpm
pg_tokenizer_161.3.0el10.aarch64pigsty16.4 MiBpg_tokenizer_16-1.3.0-1PGSTY.el10.aarch64.rpm
postgresql-16-pg-tokenizer1.3.0d12.x86_64pigsty12.1 MiBpostgresql-16-pg-tokenizer_1.3.0-1PGSTY~bookworm_amd64.deb
postgresql-16-pg-tokenizer1.3.0d12.aarch64pigsty11.7 MiBpostgresql-16-pg-tokenizer_1.3.0-1PGSTY~bookworm_arm64.deb
postgresql-16-pg-tokenizer1.3.0d13.x86_64pigsty12.1 MiBpostgresql-16-pg-tokenizer_1.3.0-1PGSTY~trixie_amd64.deb
postgresql-16-pg-tokenizer1.3.0d13.aarch64pigsty11.7 MiBpostgresql-16-pg-tokenizer_1.3.0-1PGSTY~trixie_arm64.deb
postgresql-16-pg-tokenizer1.3.0u22.x86_64pigsty13.1 MiBpostgresql-16-pg-tokenizer_1.3.0-1PGSTY~jammy_amd64.deb
postgresql-16-pg-tokenizer1.3.0u22.aarch64pigsty12.9 MiBpostgresql-16-pg-tokenizer_1.3.0-1PGSTY~jammy_arm64.deb
postgresql-16-pg-tokenizer1.3.0u24.x86_64pigsty13.1 MiBpostgresql-16-pg-tokenizer_1.3.0-1PGSTY~noble_amd64.deb
postgresql-16-pg-tokenizer1.3.0u24.aarch64pigsty12.8 MiBpostgresql-16-pg-tokenizer_1.3.0-1PGSTY~noble_arm64.deb
postgresql-16-pg-tokenizer1.3.0u26.x86_64pigsty13.1 MiBpostgresql-16-pg-tokenizer_1.3.0-1PGSTY~resolute_amd64.deb
postgresql-16-pg-tokenizer1.3.0u26.aarch64pigsty12.8 MiBpostgresql-16-pg-tokenizer_1.3.0-1PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
pg_tokenizer_151.3.0el8.x86_64pigsty16.8 MiBpg_tokenizer_15-1.3.0-1PGSTY.el8.x86_64.rpm
pg_tokenizer_151.3.0el8.aarch64pigsty16.6 MiBpg_tokenizer_15-1.3.0-1PGSTY.el8.aarch64.rpm
pg_tokenizer_151.3.0el9.x86_64pigsty16.8 MiBpg_tokenizer_15-1.3.0-1PGSTY.el9.x86_64.rpm
pg_tokenizer_151.3.0el9.aarch64pigsty16.6 MiBpg_tokenizer_15-1.3.0-1PGSTY.el9.aarch64.rpm
pg_tokenizer_151.3.0el10.x86_64pigsty16.7 MiBpg_tokenizer_15-1.3.0-1PGSTY.el10.x86_64.rpm
pg_tokenizer_151.3.0el10.aarch64pigsty16.4 MiBpg_tokenizer_15-1.3.0-1PGSTY.el10.aarch64.rpm
postgresql-15-pg-tokenizer1.3.0d12.x86_64pigsty12.1 MiBpostgresql-15-pg-tokenizer_1.3.0-1PGSTY~bookworm_amd64.deb
postgresql-15-pg-tokenizer1.3.0d12.aarch64pigsty11.7 MiBpostgresql-15-pg-tokenizer_1.3.0-1PGSTY~bookworm_arm64.deb
postgresql-15-pg-tokenizer1.3.0d13.x86_64pigsty12.1 MiBpostgresql-15-pg-tokenizer_1.3.0-1PGSTY~trixie_amd64.deb
postgresql-15-pg-tokenizer1.3.0d13.aarch64pigsty11.8 MiBpostgresql-15-pg-tokenizer_1.3.0-1PGSTY~trixie_arm64.deb
postgresql-15-pg-tokenizer1.3.0u22.x86_64pigsty13.1 MiBpostgresql-15-pg-tokenizer_1.3.0-1PGSTY~jammy_amd64.deb
postgresql-15-pg-tokenizer1.3.0u22.aarch64pigsty12.9 MiBpostgresql-15-pg-tokenizer_1.3.0-1PGSTY~jammy_arm64.deb
postgresql-15-pg-tokenizer1.3.0u24.x86_64pigsty13.1 MiBpostgresql-15-pg-tokenizer_1.3.0-1PGSTY~noble_amd64.deb
postgresql-15-pg-tokenizer1.3.0u24.aarch64pigsty12.8 MiBpostgresql-15-pg-tokenizer_1.3.0-1PGSTY~noble_arm64.deb
postgresql-15-pg-tokenizer1.3.0u26.x86_64pigsty13.1 MiBpostgresql-15-pg-tokenizer_1.3.0-1PGSTY~resolute_amd64.deb
postgresql-15-pg-tokenizer1.3.0u26.aarch64pigsty12.8 MiBpostgresql-15-pg-tokenizer_1.3.0-1PGSTY~resolute_arm64.deb

Source

pig build pkg pg_tokenizer;		# 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 pg_tokenizer;		# install by package name

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

Config this extension to shared_preload_libraries:

shared_preload_libraries = 'pg_tokenizer';

Create this extension with:

CREATE EXTENSION pg_tokenizer;

Usage

Sources:

On PostgreSQL 15–19, pg_tokenizer 1.3.0 converts text into tokens, integer IDs or native tsvector values for GIN, GiST and BM25 indexes. Installation requires shared preloading. The SQL objects use the fixed tokenizer_catalog schema.

Analyze and Index Text

Have an administrator add the library to the existing preload list and restart PostgreSQL:

shared_preload_libraries = 'pg_tokenizer'
CREATE EXTENSION pg_tokenizer;
SET search_path = public, tokenizer_catalog;

SELECT create_text_analyzer('fts_words', $$
character_filters = ["to_lowercase"]
pre_tokenizer = "unicode_segmentation"
$$);
SELECT apply_text_analyzer('Cat dog cat', 'fts_words');
SELECT analyze_to_tsvector('Cat dog cat', 'fts_words');

CREATE TABLE fts_documents (id bigint PRIMARY KEY, passage text, terms tsvector);
INSERT INTO fts_documents VALUES
    (1, 'Cat dog cat', analyze_to_tsvector('Cat dog cat', 'fts_words'));
CREATE INDEX fts_documents_gin ON fts_documents USING gin (terms);
SELECT id FROM fts_documents WHERE terms @@ 'cat <-> dog'::tsquery;

apply_text_analyzer returns text[]; analyze_to_tsvector uses those strings as lexemes with positions. Analyzer definitions are catalog data, so these functions are STABLE. Store their output in an ordinary column and maintain it on writes; do not use them directly in an expression index or stored generated column.

CREATE FUNCTION fts_documents_set_terms() RETURNS trigger
LANGUAGE plpgsql AS $$
BEGIN
    NEW.terms := tokenizer_catalog.analyze_to_tsvector(NEW.passage, 'fts_words');
    RETURN NEW;
END;
$$;
CREATE TRIGGER fts_documents_terms
BEFORE INSERT OR UPDATE OF passage ON fts_documents
FOR EACH ROW EXECUTE FUNCTION fts_documents_set_terms();

The phrase example uses known analyzer lexemes. The extension does not supply a general tsquery builder: query terms must use the same analysis and representation as stored documents. Positions describe the final token sequence, not character offsets in the source text. Filters can change phrase distances. PostgreSQL limits still apply: long lexemes are skipped, positions above 16,383 are clamped, and each lexeme retains at most 256 positions.

Chinese Text and Model Tokenization

Jieba is an analyzer pre-tokenizer. It can produce native Chinese lexemes without training a model:

SELECT create_text_analyzer('zh_words', $$
[pre_tokenizer.jieba]
mode = "search"
enable_hmm = true
$$);
SELECT analyze_to_tsvector('PostgreSQL全文检索', 'zh_words');

SELECT create_tokenizer('bert_tokens', $$
model = "bert_base_uncased"
$$);
SELECT tokenize('hello hello', 'bert_tokens');
SELECT tokenize_to_tsvector('hello hello', 'bert_tokens');

tokenize returns integer[]; tokenize_to_tsvector stores the model IDs as decimal lexemes. The two native vector functions preserve repeated output tokens without decoding the model or applying another PostgreSQL normalization step. A normal language query such as plainto_tsquery does not reproduce model IDs. Use matching vectors with the BM25 query constructor, or construct a native query from the matching lexemes.

Function and Configuration Index

InterfacePurpose
create_text_analyzer, drop_text_analyzerManage TOML pipelines of character filters, a pre-tokenizer, and token filters.
create_tokenizer, drop_tokenizerCombine an analyzer with a vocabulary or subword model.
create_custom_model_tokenizer_and_triggerTrain a custom vocabulary, backfill integer token IDs, and create maintenance triggers; an optional seventh filter argument selects corpus rows.
create_huggingface_model, create_lindera_modelImport a Hugging Face tokenizer definition or configure a Lindera dictionary.
create_stopwords, create_synonymCreate named dictionaries for analyzer filters.
add_preload_model, remove_preload_model, list_preload_modelsManage or inspect model preloading; changes require authorized administrators and a restart.
llmlingua2, bert_base_uncased, wiki_tocken, gemma2bBuilt-in model names.

The custom-model helper still fills integer arrays, not native vectors. Its filter is a trusted SQL Boolean expression over source columns: only true rows participate, the vocabulary remains append-only, and rows leaving the filter keep their previous target value. Do not pass untrusted SQL. Keep a separate vector-maintenance step when using native full-text indexes.

Upgrade, Permissions, and Backups

Install the 1.0.0 files and restart PostgreSQL before updating each database:

ALTER EXTENSION pg_tokenizer UPDATE TO '1.0.0';

Upgrade paths from 0.1.0 and 0.1.1 preserve catalog rows, custom-model IDs, and the six-argument helper. The upgrade refuses to proceed while expression indexes, generated columns, partition keys, or extended statistics depend on the old immutable analyzer function; replace these uses with maintained columns first. Committed definition changes now invalidate backend caches according to SQL snapshots, but never rewrite stored token arrays or vectors.

Lindera 6 changes dictionary token IDs. Rebuild external dictionaries with Lindera 6, regenerate affected stored tokens/vectors, and rebuild indexes. Native RPM/DEB builds do not embed Lindera dictionaries; provide the external dictionary yourself. Back up those files and the cluster’s pg_tokenizer/preload_models directory separately from a logical dump.

pg_database_owner receives access to database-local catalogs and functions; application roles need explicit grants. Object ownership still controls removal. Cluster preload changes are nontransactional and restricted separately. Vocabulary writers introducing new tokens serialize per model; retry SQLSTATE 40001 under repeatable-read or serializable isolation. Definition-changing APIs disallow two-phase prepare.

An ordinary pg_dump now includes analyzer, tokenizer, model, stopword, and synonym definitions, together with custom vocabulary tables, sequences, and source triggers. The shipped lucene_english, nltk_english, and iso_english lists are reserved and recreated by extension installation; use another name for a custom list.

Version 1.2.0

Version 1.2.0 supports PostgreSQL 15–19 and upgrades directly from 1.1.0 while preserving SQL APIs, catalog definitions and custom vocabulary IDs. Install matching files, replace external Lindera system dictionaries with Lindera 7 format v3 on every node while PostgreSQL is stopped, restart, then run ALTER EXTENSION pg_tokenizer UPDATE; in each database. PostgreSQL 14 must first move to a supported major.

Lindera segmentation, token IDs, regex boundaries and Unicode tables can change output. Regenerate affected stored token arrays or vectors from source text and rebuild their indexes before switching queries. This release’s GitHub binaries embed IPADIC; check the contents of separately supplied native packages.

Preload names and the regular-file format remain compatible. Startup now skips symlinks, special files and invalid configurations. Move intended preload contents into real directories and regular files before restarting; keep their separate backup. Definition caches continue to follow the caller’s SQL snapshot.

Caching and upgrading to 1.3.0

Repeated tokenization on a primary can reuse validated definitions. Older snapshots, physical standbys and newly promoted primaries read the definition visible to their snapshot. Custom vocabularies allocate IDs only for new terms. analyze_to_tsvector and tokenize_to_tsvector build binary vectors directly and preserve lexeme ordering and position limits.

To upgrade from 1.2.0, install matching packages on every node, restart PostgreSQL, then run ALTER EXTENSION pg_tokenizer UPDATE; in each target database on the primary. Existing definitions, custom vocabulary IDs, views and triggers survive the upgrade. Pigsty RPM and DEB packages use external Lindera 7 format v3 dictionaries.

Table reader