Replies: 6 comments 4 replies
-
You're missing the search path sql noted in the cloudnative-pgvecto.rs README. |
Beta Was this translation helpful? Give feedback.
-
Same Error
Use below
|
Beta Was this translation helpful? Give feedback.
-
@RS185734 I made it work... The trick was NOT to create extension 'vector' on postInitApplicationSQL as all the commands here are executed with superuser permissions. The extension is then created by the migrations on the regular app (or immich) user. apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: immich-pg
namespace: immich
spec:
instances: 1
imageName: ghcr.io/tensorchord/cloudnative-pgvecto.rs:16.3-v0.2.1
superuserSecret:
name: immich-pg-superuser
enableSuperuserAccess: true
startDelay: 30
stopDelay: 100
primaryUpdateStrategy: unsupervised
primaryUpdateMethod: restart ##@@ Cannot use switchover with 1 instance
postgresql:
shared_preload_libraries:
- "vectors.so"
enableAlterSystem: true
storage:
size: 8Gi
monitoring:
enablePodMonitor: false
bootstrap:
initdb:
database: immich
owner: immich
secret:
name: immich-pg-user
dataChecksums: true
postInitApplicationSQL:
- ALTER SYSTEM SET search_path TO "$user", public, vectors;
- SET search_path TO "$user", public, vectors;
- CREATE EXTENSION IF NOT EXISTS "vectors";
- CREATE EXTENSION IF NOT EXISTS "cube";
- CREATE EXTENSION IF NOT EXISTS "earthdistance";
- ALTER SCHEMA vectors OWNER TO "immich";
- GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA vectors TO "immich";
- GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "immich";
# - CREATE EXTENSION IF NOT EXISTS "vector";
# - ALTER ROLE "immich" WITH "superuser"; |
Beta Was this translation helpful? Give feedback.
-
Thanks, @dgsardina For the manifests, For someone who is importing PostgreSQL from the immich chart use below
|
Beta Was this translation helpful? Give feedback.
-
@RS185734 I was not able to backup the native Any suggestions? |
Beta Was this translation helpful? Give feedback.
-
On my side, I checked the Immich documentation, and it says:
So, I added the line to grant superuser rights. To be safe, I left the two lines required by pgvecto.rs that I already had. My instance is now working. Previously, it complained about permissions issues while creating the vectors extension. From the solution above, I see that I was probably missing the My Cluster bootstrap section (CloudNativePG) :
I leave my error message here, so others can find this discussion thread:
|
Beta Was this translation helpful? Give feedback.
-
Someone successfully run db with cloudnative-pg Operator?
Trying it with custom image but always is something else missing / not working.
Currently immich-server stucks with:
Beta Was this translation helpful? Give feedback.
All reactions