Fix immich-pg: use VectorChord with correct config
- Use cloudnative-vectorchord:17.7-1.0.0 image (not pgvecto.rs) - Add shared_preload_libraries at postgresql level (not parameters) - Create vector, vchord, cube, earthdistance extensions Immich v1.133.0+ uses VectorChord as successor to pgvecto.rs. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f1f4575554
commit
367b86710e
2 changed files with 14 additions and 8 deletions
|
|
@ -115,8 +115,8 @@ PostgreSQL cluster for Immich with pgvecto.rs extension for AI-powered vector se
|
|||
|
||||
- **Instances**: 1 (single-node for minikube)
|
||||
- **Storage**: 10Gi on `standard` storage class
|
||||
- **Image**: `ghcr.io/tensorchord/cloudnative-pgvecto.rs:17.5` (includes pgvecto.rs)
|
||||
- **Extensions**: `vectors`, `earthdistance`
|
||||
- **Image**: `ghcr.io/tensorchord/cloudnative-vectorchord:17.7-1.0.0` (includes VectorChord)
|
||||
- **Extensions**: `vector`, `vchord`, `cube`, `earthdistance`
|
||||
|
||||
### Connection
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
# PostgreSQL Cluster for Immich
|
||||
# Uses tensorchord/cloudnative-vectorchord for pgvecto.rs extension (required by Immich for AI features)
|
||||
# Uses VectorChord (successor to pgvecto.rs) for AI-powered vector search
|
||||
# See: https://github.com/immich-app/immich/discussions/9060
|
||||
# Managed by CloudNativePG operator
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
|
|
@ -8,9 +9,9 @@ metadata:
|
|||
namespace: databases
|
||||
spec:
|
||||
instances: 1
|
||||
# cloudnative-pgvecto.rs image includes pgvecto.rs extension for vector similarity search
|
||||
# See: https://github.com/tensorchord/cloudnative-pgvecto.rs
|
||||
imageName: ghcr.io/tensorchord/cloudnative-pgvecto.rs:17.5
|
||||
# VectorChord image for PostgreSQL 17
|
||||
# See: https://github.com/tensorchord/VectorChord
|
||||
imageName: ghcr.io/tensorchord/cloudnative-vectorchord:17.7-1.0.0
|
||||
|
||||
storage:
|
||||
size: 10Gi
|
||||
|
|
@ -22,7 +23,10 @@ spec:
|
|||
database: immich
|
||||
owner: immich
|
||||
postInitSQL:
|
||||
- CREATE EXTENSION IF NOT EXISTS vectors;
|
||||
# Extensions required by Immich
|
||||
- CREATE EXTENSION IF NOT EXISTS vector;
|
||||
- CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
|
||||
- CREATE EXTENSION IF NOT EXISTS cube CASCADE;
|
||||
- CREATE EXTENSION IF NOT EXISTS earthdistance CASCADE;
|
||||
|
||||
# Resource limits for minikube environment
|
||||
|
|
@ -36,11 +40,13 @@ spec:
|
|||
|
||||
# PostgreSQL configuration
|
||||
postgresql:
|
||||
# VectorChord requires vchord.so in shared_preload_libraries
|
||||
shared_preload_libraries:
|
||||
- "vchord.so"
|
||||
parameters:
|
||||
max_connections: "50"
|
||||
shared_buffers: "128MB"
|
||||
password_encryption: "scram-sha-256"
|
||||
# Note: shared_preload_libraries is managed by the vectorchord image
|
||||
pg_hba:
|
||||
# Allow connections from k8s pods
|
||||
- host all all 0.0.0.0/0 scram-sha-256
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue