ImmichI
Immich8mo ago
Jonsch

PostgresError: operator does not exists

Hi I am trying to setup immich on k8s with cloudnative-pg I have followed this blog and followed the issues found in the helm repo.

---
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
  name: immich-pg
  namespace: immich
spec:
  instances: 2
  bootstrap:
    initdb:
      database: immich
      owner: immich
      postInitSQL:
        - CREATE EXTENSION IF NOT EXISTS "vectors";
        - CREATE EXTENSION IF NOT EXISTS "cube" CASCADE;
        - CREATE EXTENSION IF NOT EXISTS "earthdistance" CASCADE;
  storage:
    size: 5Gi
  imageName: ghcr.io/tensorchord/cloudnative-pgvecto.rs:16.5-v0.3.0
  managed:
    roles:
      - name: immich
        superuser: true
        login: true
  postgresql:
    shared_preload_libraries:
      - "vectors.so"


The main things work except the ml jobs and searching then I get the error in the server:

[Nest] 8  - 05/06/2025, 9:30:36 PM   ERROR [Microservices:{"id":"d65ceb22-7696-4cef-bc3d-cdcd19a8d615","source":"upload"}] Unable to run job handler (duplicateDetection/duplicate-detection): PostgresError: operator does not exist: vectors.vector <=> unknown
PostgresError: operator does not exist: vectors.vector <=> unknown
    at ErrorResponse (/usr/src/app/node_modules/postgres/cjs/src/connection.js:790:26)
    at handle (/usr/src/app/node_modules/postgres/cjs/src/connection.js:476:6)
    at Socket.data (/usr/src/app/node_modules/postgres/cjs/src/connection.js:315:9)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5)
    at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
    at TCP.callbackTrampoline (node:internal/async_hooks:130:17)


had anybody anything similar or should I create an issue?
🏡 Frank Zhao
Notes on deploying Immich on k3s Kubernetes. I use the community Immich Helm chart with Cloudnative Postgres . Pre-requisites Set up Postgres When using the community Immich helm chart, the postgres subchart is deprecated, so we will need to set up our own postgres instances for Immich.
Was this page helpful?