How do I fix 'database "immich" has a collation version mismatch'?
Solved๐๏ธServerโQuestion
Hello, I run Immich server version 1.11.8 on TrueNAS Scale 25.10.1, installed from the TrueNAS application repository. The app version is 2.4.1. The first installation was around two years ago, and since then the database and file system has been updated a few times. I've just followed the instruction and updated, so now it's running Postgres 18. Everything works well, and I like the app. I was checking the logs of the docker applications and saw this message from Immich server: 2026-01-18 09:00:35.070179+00:00Postgres notice: { 2026-01-18 09:00:35.070472+00:00severity_local: 'WARNING', 2026-01-18 09:00:35.070513+00:00severity: 'WARNING', 2026-01-18 09:00:35.070543+00:00code: '01000', 2026-01-18 09:00:35.070572+00:00message: 'database "immich" has a collation version mismatch', 2026-01-18 09:00:35.070600+00:00detail: 'The database was created using collation version 2.41, but the operating system provides version 2.36.', 2026-01-18 09:00:35.070629+00:00hint: 'Rebuild all objects in this database that use the default collation and run ALTER DATABASE immich REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.', 2026-01-18 09:00:35.070657+00:00file: 'postinit.c', 2026-01-18 09:00:35.070685+00:00line: '470', 2026-01-18 09:00:35.070712+00:00routine: 'CheckMyDatabase'
How do I do that? I suppose there are CLI commands I can run to do this, but I don't know which and where. Probably the server container shell, but I'm not sure