PostgreSQL with pgvector, VectorChord, pgvecto.rs, pg_textsearch, and TimescaleDB extensions
1.4K
Custom PostgreSQL image with vector search, full-text search and time-series extensions pre-installed.
Base image is pinned to
postgres:17-bookwormon purpose. The floatingpostgres:17tag has moved to Debian 13 (trixie / gcc 14), which miscompiles pgvector 0.8.0 and segfaults onCREATE EXTENSION vector. bookworm matches the originally-deployed image, so rebuilds stay compatible with existing databases. Re-test pgvector before changing this.
| Extension | Version | Schema | Purpose |
|---|---|---|---|
| pgvector | 0.8.0 | public | Vector similarity search (VectorChord prerequisite) |
| VectorChord | 1.1.1 | public | High-performance vector indexing (current Immich extension) |
| pgvecto.rs | 0.3.0 | vectors | Legacy vector search — deprecated, retained only for migrating older Immich databases |
| pg_textsearch | 1.3.1 | public | BM25 full-text search |
| TimescaleDB | 2.28.1 | public | Hypertables & time-series |
cube and earthdistance ship with PostgreSQL itself (Immich uses them too).
services:
postgres:
image: zyetta/postgres:17
environment:
- POSTGRES_USER=myuser
- POSTGRES_PASSWORD=mypassword
command:
- postgres
- -c
# vchord.so alone is enough for Immich. Add the rest only if you actually
# CREATE EXTENSION them.
- shared_preload_libraries=vchord.so,pg_textsearch,timescaledb
Which extensions need a shared_preload_libraries entry:
| Extension | Needs preload? | Library name |
|---|---|---|
| pgvector | no | — |
| VectorChord | yes | vchord.so |
| pgvecto.rs | yes | vectors.so |
| pg_textsearch | yes | pg_textsearch |
| TimescaleDB | yes | timescaledb |
-- Vector search
CREATE EXTENSION vector;
CREATE EXTENSION vchord CASCADE; -- pulls in vector
-- Full-text search / time-series
CREATE EXTENSION pg_textsearch; -- requires pg_textsearch preloaded
CREATE EXTENSION timescaledb; -- requires timescaledb preloaded
-- Legacy pgvecto.rs (deprecated; only to migrate an old Immich database)
CREATE EXTENSION vectors; -- requires vectors.so preloaded
Current/stable Immich runs on VectorChord and needs, in the public schema:
CREATE EXTENSION vchord CASCADE; -- pulls in vector (pgvector 0.7–0.9; image ships 0.8.0)
CREATE EXTENSION earthdistance CASCADE; -- pulls in cube
with shared_preload_libraries=vchord.so. PostgreSQL must be >= 14, < 19
(this image is 17). pgvecto.rs (vectors) is deprecated by Immich and only
needed to migrate a database that still uses it — it remains installed for that
purpose but is not required for new installs.
latest - Latest build17 - PostgreSQL 17 (what deployments pull)17-pgvector0.8.0-vchord1.1.1-pgvectors0.3.0-pgts1.3.1-ts2.28.1 - fully pinned versionsdocker build -t zyetta/postgres:17 .
Dockerfile and update the ARG versions (and re-test — see the base
image note above before touching FROM)mainContent type
Image
Digest
sha256:395b710c7…
Size
425.3 MB
Last updated
3 months ago
docker pull zyetta/postgres