Wrong vector extension name in error message #2216

Closed
opened 2026-02-05 05:43:52 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @AlexanderS on GitHub (Feb 21, 2024).

Hi,

if the creation of the vector extension fails, there is an error message suggesting to use the other extension via the environment variable. The error message contains the wrong name for the vector extension:

Failed to activate pgvecto.rs extension.
Please ensure the Postgres instance has pgvecto.rs installed.
If the Postgres instance already has pgvecto.rs installed, Immich may not have the necessary permissions to activate it.
In this case, please run 'CREATE EXTENSION IF NOT EXISTS vectors' manually as a superuser.
See https://immich.app/docs/guides/database-queries for how to query the database.
Alternatively, if your Postgres instance has pgvector, you may use this instead by setting the environment variable 'DB_VECTOR_EXTENSION=vector'.
Note that switching between the two extensions after a successful startup is not supported.
The exception is if your version of Immich prior to upgrading was 1.90.2 or earlier.
In this case, you may set either extension now, but you will not be able to switch to the other extension following a successful startup.

If you try to start the server with DB_VECTOR_EXTENSION=vector set, it will fail with the following message:

Error: Config validation error: "DB_VECTOR_EXTENSION" must be one of [pgvector, pgvecto.rs]
    at ConfigModule.forRoot (server/node_modules/@nestjs/config/dist/config.module.js:86:23)
    at Object.<anonymous> (server/infra/infra.module.js:57:35)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (server/infra/index.js:19:14)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)

Starting the server with DB_VECTOR_EXTENSION=pgvector does work.

The OS that Immich Server is running on

Debian

Version of Immich Server

v1.95.1

Platform with the issue

  • Server
  • Web
  • Mobile
Originally created by @AlexanderS on GitHub (Feb 21, 2024). Hi, if the creation of the vector extension fails, there is an error message suggesting to use the other extension via the environment variable. The error message contains the wrong name for the vector extension: ``` Failed to activate pgvecto.rs extension. Please ensure the Postgres instance has pgvecto.rs installed. If the Postgres instance already has pgvecto.rs installed, Immich may not have the necessary permissions to activate it. In this case, please run 'CREATE EXTENSION IF NOT EXISTS vectors' manually as a superuser. See https://immich.app/docs/guides/database-queries for how to query the database. Alternatively, if your Postgres instance has pgvector, you may use this instead by setting the environment variable 'DB_VECTOR_EXTENSION=vector'. Note that switching between the two extensions after a successful startup is not supported. The exception is if your version of Immich prior to upgrading was 1.90.2 or earlier. In this case, you may set either extension now, but you will not be able to switch to the other extension following a successful startup. ``` If you try to start the server with `DB_VECTOR_EXTENSION=vector` set, it will fail with the following message: ``` Error: Config validation error: "DB_VECTOR_EXTENSION" must be one of [pgvector, pgvecto.rs] at ConfigModule.forRoot (server/node_modules/@nestjs/config/dist/config.module.js:86:23) at Object.<anonymous> (server/infra/infra.module.js:57:35) at Module._compile (node:internal/modules/cjs/loader:1233:14) at Module._extensions..js (node:internal/modules/cjs/loader:1287:10) at Module.load (node:internal/modules/cjs/loader:1091:32) at Module._load (node:internal/modules/cjs/loader:938:12) at Module.require (node:internal/modules/cjs/loader:1115:19) at require (node:internal/modules/helpers:130:18) at Object.<anonymous> (server/infra/index.js:19:14) at Module._compile (node:internal/modules/cjs/loader:1233:14) ``` Starting the server with `DB_VECTOR_EXTENSION=pgvector` does work. ### The OS that Immich Server is running on Debian ### Version of Immich Server v1.95.1 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile
Author
Owner

@alextran1502 commented on GitHub (Feb 21, 2024):

what is your setup look like?

@alextran1502 commented on GitHub (Feb 21, 2024): what is your setup look like?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2216