fix: add postInitApplicationSQL for pgvector, app role isn't superuser

immich-server crash-looped on "permission denied to create extension
vector" - pgvector's control file isn't marked trusted, and CNPG's
app owner role isn't superuser (enableSuperuserAccess: false).
Documents the fix for future cluster rebuilds; the live cluster
already had CREATE EXTENSION run manually via the postgres pod's
local socket.
This commit is contained in:
Story Crater Bot
2026-08-25 18:49:09 -07:00
parent 0e57444909
commit abed329636
+8
View File
@@ -32,6 +32,14 @@ spec:
encoding: UTF8 encoding: UTF8
localeCollate: C localeCollate: C
localeCType: C localeCType: C
# CREATE EXTENSION vector requires superuser (pgvector's control file
# isn't marked trusted) and the "app" owner role isn't one
# (enableSuperuserAccess: false, repo convention) - postInitApplicationSQL
# runs as superuser during initdb, before the app ever connects. Only
# fires on a fresh bootstrap; the live cluster already had this run
# manually once (kubectl exec ... psql -U postgres -c 'CREATE EXTENSION').
postInitApplicationSQL:
- "CREATE EXTENSION IF NOT EXISTS vector;"
enableSuperuserAccess: false enableSuperuserAccess: false
resources: resources:
requests: { memory: "512Mi", cpu: "250m" } requests: { memory: "512Mi", cpu: "250m" }