Immich: Difference between revisions
Updated the immich hardware acceleration docs to reflect the changes in https://github.com/NixOS/nixpkgs/pull/376339 |
added fixes for 25.05 upgrade issue |
||
Line 40: | Line 40: | ||
}; | }; | ||
}} | }} | ||
== Troubleshooting == | |||
=== Fixing postgresql database issue after 25.05 upgrade === | |||
==== Postgresql collation version mismatch ==== | |||
After upgrading you might run into an issue like this, leading to immich-server continuously failing and restarting: <syntaxhighlight>Jul 01 14:23:12 server2 immich[178592]: Postgres notice: { | |||
Jul 01 14:23:12 server2 immich[178592]: severity_local: 'WARNING', | |||
Jul 01 14:23:12 server2 immich[178592]: severity: 'WARNING', | |||
Jul 01 14:23:12 server2 immich[178592]: code: '01000', | |||
Jul 01 14:23:12 server2 immich[178592]: message: 'database "immich" has a collation version mismatch', | |||
Jul 01 14:23:12 server2 immich[178592]: detail: 'The database was created using collation version 2.39, but the operating system provides version 2.40.', | |||
Jul 01 14:23:12 server2 immich[178592]: hint: 'Rebuild all objects in this database that use the default collation and run ALTER DATABASE immich REFRESH COLLATION VERSION,> | |||
Jul 01 14:23:12 server2 immich[178592]: file: 'postinit.c', | |||
Jul 01 14:23:12 server2 immich[178592]: line: '477', | |||
Jul 01 14:23:12 server2 immich[178592]: routine: 'CheckMyDatabase' | |||
Jul 01 14:23:12 server2 immich[178592]: }</syntaxhighlight>To fix this, run <code>sudo -u immich psql -d immich</code> and execute these to commands:<syntaxhighlight lang="sql" line="1"> | |||
ALTER DATABASE immich REFRESH COLLATION VERSION; | |||
REINDEX DATABASE immich; | |||
</syntaxhighlight> | |||
==== Upgrading pgvecto.rs ==== | |||
If you still run into issues after restarting postgresql and immich-server services, some additional postgresql database changes might be necessary to [https://web.archive.org/web/20240910231531/https://docs.pgvecto.rs/admin/upgrading.html#upgrading upgrade pgvecto.rs table]: | |||
Run <code>sudo -u postgresql psql</code> and execute consecutively:<syntaxhighlight lang="sql" line="1"> | |||
CREATE EXTENSION IF NOT EXISTS unaccent; | |||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; | |||
CREATE EXTENSION IF NOT EXISTS vectors; | |||
CREATE EXTENSION IF NOT EXISTS cube; | |||
CREATE EXTENSION IF NOT EXISTS earthdistance; | |||
CREATE EXTENSION IF NOT EXISTS pg_trgm; | |||
ALTER EXTENSION vectors UPDATE; | |||
SELECT pgvectors_upgrade(); | |||
</syntaxhighlight>Finally, restart postgresql and immich: <code>systemctl restart postgresql && systemctl restart immich-server</code> | |||
[[Category:Server]] | [[Category:Server]] | ||
[[Category:Web Applications]] | [[Category:Web Applications]] |