Skip to content

About

pgvector + timescale/pg_textsearch

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

pgvec-textsearch

PostgresQL docker image with pgvector + timescale/pg_textsearch

Test Environment:

  • DGX Spark (aarch64)

Usage

Building Docker Image

PGVECTOR_VERSION="0.8.2-pg18-trixie"
PG_TEXTSEARCH_VERSION="1.0.0" # requires >=0.5.0 due to text_config parsing issues

DATE_TAG="260330"
IMAGE_TAG="${DATE_TAG}-${PGVECTOR_VERSION}-${PG_TEXTSEARCH_VERSION}"

## Default Image
docker build -t pgvec-textsearch:${IMAGE_TAG} -f docker/Dockerfile.arm .

## Korean image (textsearch_ko)
docker build -t pgvec-textsearch-ko: -f docker/Dockerfile.ko-arm .

Using pre-built image from docker hub

PGVECTOR_VERSION="0.8.2-pg18-trixie"
PG_TEXTSEARCH_VERSION="1.0.0" # requires >=0.5.0 due to text_config parsing issues

DATE_TAG="260330"
IMAGE_TAG="${DATE_TAG}-${PGVECTOR_VERSION}-${PG_TEXTSEARCH_VERSION}"

## Korean image (textsearch_ko)
docker pull id4thomas/pgvec-textsearch-ko:${IMAGE_TAG}

Running DB Image

docker run command:

  • Sample .env (example here)
  • running with docker volume
  • setting shared_preload_libraries=pg_textsearch is needed to use pg_textsearch
    • "pg_textsearch must be loaded via shared_preload_libraries. Add the following to postgresql.conf and restart the server"
docker run -d \
    --env-file ./.env \
    -p ${POSTGRES_PORT:-5432}:5432 \
    -v ${DOCKER_VOLUME_NAME}:/var/lib/postgresql \
    id4thomas/pgvec-textsearch-ko:${IMAGE_TAG} \
    postgres -c shared_preload_libraries=pg_textsearch

You should see logs like

...
2026-01-30 13:19:53.146 KST [50] LOG:  database system is ready to accept connections
 done
server started
CREATE DATABASE


/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/01-init-extension.sql
SET
psql:/docker-entrypoint-initdb.d/01-init-extension.sql:6: INFO:  pg_textsearch v0.5.0-dev installed
CREATE EXTENSION
CREATE EXTENSION
COMMENT


/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/02-init-functions.sql
SET
CREATE FUNCTION


/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/03-init-mecab_ko.sql
SET
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
DO
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
...
PostgreSQL init process complete; ready for start up.

2026-01-30 13:19:53.481 KST [1] LOG:  starting PostgreSQL 18.1 (Debian 18.1-1.pgdg13+2) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
2026-01-30 13:19:53.482 KST [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2026-01-30 13:19:53.482 KST [1] LOG:  listening on IPv6 address "::", port 5432
2026-01-30 13:19:53.483 KST [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2026-01-30 13:19:53.485 KST [78] LOG:  database system was shut down at 2026-01-30 13:19:53 KST
2026-01-30 13:19:53.499 KST [1] LOG:  database system is ready to accept connections

Acknowledgements

This repository is built upon the following works

Tidbits

Original experiments are recorded in id4thomas/psi-king repository

License

License details are recorded here

About

pgvector + timescale/pg_textsearch

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages