High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(docs): more vchord details (#18435)
Matthew Momjian0b8fc7b4930e
diff --git a/docs/docs/administration/postgres-standalone.md b/docs/docs/administration/postgres-standalone.mdindex bbdd06847b..95a281d0e1 100644--- a/docs/docs/administration/postgres-standalone.md+++ b/docs/docs/administration/postgres-standalone.md@@ -80,11 +80,14 @@ The easiest option is to have both extensions installed during the migration:2. Install `pgvector` (`>= 0.7.0, < 1.0.0`). The easiest way to do this is on Debian/Ubuntu by adding the [PostgreSQL Apt repository][pg-apt] and then running `apt install postgresql-NN-pgvector`, where `NN` is your Postgres version (e.g., `16`)3. [Install VectorChord][vchord-install]4. Add `shared_preload_libraries= 'vchord.so, vectors.so'` to your `postgresql.conf`, making sure to include _both_ `vchord.so` and `vectors.so`. You may include other libraries here as well if needed-5. If Immich does not have superuser permissions, run the SQL command `CREATE EXTENSION vchord CASCADE;` using psql or your choice of database client-6. Start Immich and wait for the logs `Reindexed face_index` and `Reindexed clip_index` to be output-7. If Immich does not have superuser permissions, run the SQL command `DROP EXTENSION vectors;`-8. Remove the `vectors.so` entry from the `shared_preload_libraries` setting-9. Uninstall pgvecto.rs (e.g. `apt-get purge vectors-pg14` on Debian-based environments, replacing `pg14` as appropriate). `pgvector` must remain install as it provides the data types used by `vchord`+5. Restart the Postgres database+6. If Immich does not have superuser permissions, run the SQL command `CREATE EXTENSION vchord CASCADE;` using psql or your choice of database client+7. Start Immich and wait for the logs `Reindexed face_index` and `Reindexed clip_index` to be output+8. If Immich does not have superuser permissions, run the SQL command `DROP EXTENSION vectors;`+9. Drop the old schema by running `DROP SCHEMA vectors;`+10. Remove the `vectors.so` entry from the `shared_preload_libraries` setting+11. Restart the Postgres database+12. Uninstall pgvecto.rs (e.g. `apt-get purge vectors-pg14` on Debian-based environments, replacing `pg14` as appropriate). `pgvector` must remain installed as it provides the data types used by `vchord`If it is not possible to have both VectorChord and pgvecto.rs installed at the same time, you can perform the migration with more manual steps:@@ -129,11 +132,5 @@ ALTER TABLE face_search ALTER COLUMN embedding SET DATA TYPE vector(512);Note that VectorChord itself uses pgvector types, so you should not uninstall pgvector after following these steps.-### Common errors--#### Permission denied for view--If you get the error `driverError: error: permission denied for view pg_vector_index_stat`, you can fix this by connecting to the Immich database and running `GRANT SELECT ON TABLE pg_vector_index_stat TO <immichdbusername>;`.-[vchord-install]: https://docs.vectorchord.ai/vectorchord/getting-started/installation.html[pg-apt]: https://www.postgresql.org/download/linux/#generic