[Guide] Fix pgvecto.rs "shared_preload_libraries" error after Immich v3.0.1 upgrade #29577
minto3792
started this conversation in
Community Guides
Replies: 1 comment
|
Thanks a lot! It worked perfectly for me. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey everyone! After upgrading to Immich v3.0.1, I ran into a persistent crash loop with the microservices worker. Took some digging to figure out what was going on, so I'm sharing the fix here to save others the headache.
The Problem
After upgrading, my microservices worker kept dying with this error:
The server would start, immediately fail the vector reindexing checks, kill the microservices worker, and take down the API with it. Infinite restart loop.
Root Cause
Immich v3.0.1 requires both
vchord.soandvectors.so(pgvecto.rs) to be preloaded in PostgreSQL. If yourshared_preload_librariesonly loads one of them, any queries hitting the missing extension will fail.This commonly happens if:
commandin docker-compose that only referencesvchord.sopostgresql.auto.confand your docker-compose commandBackground Context
If you're coming from an older Immich version, you may have previously migrated to vectorchord following the official guide:
👉 Migrating to VectorChord (Immich Docs)
That migration guide was created when Immich was transitioning from pgvector to vectorchord. However, Immich v3.0.1 now requires both extensions to coexist — vchord for its vector operations and pgvecto.rs for certain index types. If you only loaded one after following the older migration steps, that's likely why you're hitting this error now.
How to Diagnose
Run these commands to check your current setup:
If
SHOW shared_preload_librariesreturns onlyvchord.sobutvectors.soexists in your container, you've found the issue.The Fix
Step 1: Update docker-compose.yml
Modify your
commandto load both extensions:Key change:
shared_preload_librariesnow includes bothvchord.soANDvectors.so, separated by a comma.Step 2: Clean up conflicting settings
If you previously ran
ALTER SYSTEMcommands, clear them out:Step 3: Restart services
Step 4: Confirm it's working
Check your logs — you should see the microservices worker start cleanly:
No more "pgvecto.rs must be loaded" errors, and the vector reindexing checks should pass without warnings.
Verification Checklist
✅
SHOW shared_preload_librariesreturnsvchord.so,vectors.so✅ No "must be loaded via shared_preload_libraries" errors in logs
✅ Microservices worker starts successfully
✅ Vector reindexing completes without warnings
✅ Immich web UI accessible
Why This Happens
The official migration guide helped many of us transition from pgvector to vectorchord in earlier versions. At that time, the guidance was to load
vchord.soand remove references tovectors.so. Immich v3.0.1 changed this — it now uses both extensions for different purposes, so you need both loaded simultaneously. If you still have the old single-extension config from the migration, this upgrade will break until you update it.Hope this helps someone avoid the headache! If you're still stuck, double-check that you're not overriding the command somewhere else (environment variables, separate config files, etc.) and that your PostgreSQL image actually has both extensions installed.
Cheers 🍻
All reactions