Immich script missing Postgres vector extension #1292

Closed
opened 2025-11-20 05:07:42 -05:00 by saavagebueno · 2 comments
Owner

Originally created by @KalenXI on GitHub (Jun 19, 2025).

Originally assigned to: @vhsdream on GitHub.

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

Immich

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/immich.sh)"

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

📝 Provide a clear and concise description of the issue.

After running the script Immich failed to start with the error “Failed to activate VectorChord extension. Please ensure the Postgres instance has VectorChord installed.” And the service kept restarting itself.
I did elect to install OpenVINO support but not sure if that’s related.

I was able to resolve the error by running sudo apt install postgresql-16-pgvector manually after installation.

🔄 Steps to reproduce the issue.

  1. Install Immich LXC.
  2. Immich fails to start.
  3. Run sudo apt install postgresql-16-pgvector manually to fix.

Paste the full error output (if available).

FATAL [Microservices:DatabaseService] Failed to activate VectorChord extension.
    Please ensure the Postgres instance has VectorChord installed.

    If the Postgres instance already has VectorChord installed, Immich may not have the necessary permissions to activate it.
    In this case, please run 'CREATE EXTENSION IF NOT EXISTS vchord CASCADE' manually as a superuser.
    See https://immich.app/docs/guides/database-queries for how to query the database.
PostgresError: extension "vector" is not available
    at ErrorResponse (/opt/immich/app/node_modules/postgres/cjs/src/connection.js:790:26)
    at handle (/opt/immich/app/node_modules/postgres/cjs/src/connection.js:476:6)
    at Socket.data (/opt/immich/app/node_modules/postgres/cjs/src/connection.js:315:9)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5)
    at TCP.onStreamRead (node:internal/stream_base_commons:189:23) {
  severity_local: 'ERROR',
  severity: 'ERROR',
  code: '0A000',
  detail: 'Could not open extension control file "/usr/share/postgresql/16/extension/vector.control": No such file or directory.',
  hint: 'The extension must first be installed on the system where PostgreSQL is running.',
  file: 'extension.c',
  line: '543',
  routine: 'parse_extension_control_file'
}

🖼️ Additional context (optional).

No response

Originally created by @KalenXI on GitHub (Jun 19, 2025). Originally assigned to: @vhsdream on GitHub. ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? Immich ### 📂 What was the exact command used to execute the script? bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/immich.sh)" ### ⚙️ What settings are you using? - [ ] Default Settings - [x] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 12 ### 📝 Provide a clear and concise description of the issue. After running the script Immich failed to start with the error “Failed to activate VectorChord extension. Please ensure the Postgres instance has VectorChord installed.” And the service kept restarting itself. I did elect to install OpenVINO support but not sure if that’s related. I was able to resolve the error by running `sudo apt install postgresql-16-pgvector` manually after installation. ### 🔄 Steps to reproduce the issue. 1. Install Immich LXC. 2. Immich fails to start. 3. Run `sudo apt install postgresql-16-pgvector` manually to fix. ### ❌ Paste the full error output (if available). ``` FATAL [Microservices:DatabaseService] Failed to activate VectorChord extension. Please ensure the Postgres instance has VectorChord installed. If the Postgres instance already has VectorChord installed, Immich may not have the necessary permissions to activate it. In this case, please run 'CREATE EXTENSION IF NOT EXISTS vchord CASCADE' manually as a superuser. See https://immich.app/docs/guides/database-queries for how to query the database. PostgresError: extension "vector" is not available at ErrorResponse (/opt/immich/app/node_modules/postgres/cjs/src/connection.js:790:26) at handle (/opt/immich/app/node_modules/postgres/cjs/src/connection.js:476:6) at Socket.data (/opt/immich/app/node_modules/postgres/cjs/src/connection.js:315:9) at Socket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:561:12) at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) at Readable.push (node:internal/streams/readable:392:5) at TCP.onStreamRead (node:internal/stream_base_commons:189:23) { severity_local: 'ERROR', severity: 'ERROR', code: '0A000', detail: 'Could not open extension control file "/usr/share/postgresql/16/extension/vector.control": No such file or directory.', hint: 'The extension must first be installed on the system where PostgreSQL is running.', file: 'extension.c', line: '543', routine: 'parse_extension_control_file' } ``` ### 🖼️ Additional context (optional). _No response_
saavagebueno added the bug label 2025-11-20 05:07:42 -05:00
Author
Owner

@MickLesk commented on GitHub (Jun 19, 2025):

@vhsdream

Maybe add PG_MODULE="pgvector" ?

PG_VERSION="16" PG_MODULE="pgvector" setup_postgresql
@MickLesk commented on GitHub (Jun 19, 2025): @vhsdream Maybe add PG_MODULE="pgvector" ? ```bash PG_VERSION="16" PG_MODULE="pgvector" setup_postgresql
Author
Owner

@vhsdream commented on GitHub (Jun 19, 2025):

@MickLesk will do - I think that might have been removed when we were cleaning up/rearranging tools.func stuff.

@vhsdream commented on GitHub (Jun 19, 2025): @MickLesk will do - I think that might have been removed when we were cleaning up/rearranging tools.func stuff.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#1292