PostgresError: relation "pg_vector_index_stat" does not exist after upgrade to v1.130.x #5682

Closed
opened 2026-02-05 11:39:20 +03:00 by OVERLORD · 8 comments
Owner

Originally created by @blockbasti on GitHub (Mar 26, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

After upgrading to v1.130, immich server doesn't start anymore, because pg_vector_index_stat does not exist. A downgrade to v1.129 fixes the issue. Also a backup has been restored, which didn't fix the issue. Setting the permissions as stated in the docs doesn't help either, because the whole relation is gone.

The OS that Immich Server is running on

k3s 1.31 on Ubuntu 24.04

Version of Immich Server

v1.130

Version of Immich Mobile App

v1.129.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

-

Your .env content

-

Reproduction steps

  1. Have an existing immich installation with version v1.129
  2. Upgrade to v1.130

Relevant log output

Initializing Immich v1.130.2
Detected CPU Cores: 4
Starting api worker
Starting microservices worker
[Nest] 7  - 03/26/2025, 4:55:21 PM     LOG [Microservices:EventRepository] Initialized websocket server
Query failed : {
  durationMs: 2.2266209999997955,
  error: PostgresError: relation "pg_vector_index_stat" does not exist
      at ErrorResponse (/usr/src/app/node_modules/postgres/cjs/src/connection.js:788:26)
      at handle (/usr/src/app/node_modules/postgres/cjs/src/connection.js:474:6)
      at Socket.data (/usr/src/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: '42P01',
    position: '24',
    file: 'parse_relation.c',
    line: '1449',
    routine: 'parserOpenTable'
  },
  sql: 'SELECT idx_status FROM pg_vector_index_stat WHERE indexname = $1',
  params: [ 'clip_index' ]
}
Query failed : {
  durationMs: 0.7454499999994368,
  error: PostgresError: relation "pg_vector_index_stat" does not exist
      at ErrorResponse (/usr/src/app/node_modules/postgres/cjs/src/connection.js:788:26)
      at handle (/usr/src/app/node_modules/postgres/cjs/src/connection.js:474:6)
      at Socket.data (/usr/src/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: '42P01',
    position: '24',
    file: 'parse_relation.c',
    line: '1449',
    routine: 'parserOpenTable'
  },
  sql: 'SELECT idx_status FROM pg_vector_index_stat WHERE indexname = $1',
  params: [ 'face_index' ]
}

Additional information

No response

Originally created by @blockbasti on GitHub (Mar 26, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug After upgrading to v1.130, immich server doesn't start anymore, because `pg_vector_index_stat` does not exist. A downgrade to v1.129 fixes the issue. Also a backup has been restored, which didn't fix the issue. Setting the permissions as stated in the docs doesn't help either, because the whole relation is gone. ### The OS that Immich Server is running on k3s 1.31 on Ubuntu 24.04 ### Version of Immich Server v1.130 ### Version of Immich Mobile App v1.129.0 ### Platform with the issue - [x] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML - ``` ### Your .env content ```Shell - ``` ### Reproduction steps 1. Have an existing immich installation with version v1.129 2. Upgrade to v1.130 ### Relevant log output ```shell Initializing Immich v1.130.2 Detected CPU Cores: 4 Starting api worker Starting microservices worker [Nest] 7 - 03/26/2025, 4:55:21 PM LOG [Microservices:EventRepository] Initialized websocket server Query failed : { durationMs: 2.2266209999997955, error: PostgresError: relation "pg_vector_index_stat" does not exist at ErrorResponse (/usr/src/app/node_modules/postgres/cjs/src/connection.js:788:26) at handle (/usr/src/app/node_modules/postgres/cjs/src/connection.js:474:6) at Socket.data (/usr/src/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: '42P01', position: '24', file: 'parse_relation.c', line: '1449', routine: 'parserOpenTable' }, sql: 'SELECT idx_status FROM pg_vector_index_stat WHERE indexname = $1', params: [ 'clip_index' ] } Query failed : { durationMs: 0.7454499999994368, error: PostgresError: relation "pg_vector_index_stat" does not exist at ErrorResponse (/usr/src/app/node_modules/postgres/cjs/src/connection.js:788:26) at handle (/usr/src/app/node_modules/postgres/cjs/src/connection.js:474:6) at Socket.data (/usr/src/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: '42P01', position: '24', file: 'parse_relation.c', line: '1449', routine: 'parserOpenTable' }, sql: 'SELECT idx_status FROM pg_vector_index_stat WHERE indexname = $1', params: [ 'face_index' ] } ``` ### Additional information _No response_
Author
Owner

@alextran1502 commented on GitHub (Mar 26, 2025):

Hmm, can you try this?

https://immich.app/docs/administration/postgres-standalone#common-errors

@alextran1502 commented on GitHub (Mar 26, 2025): Hmm, can you try this? https://immich.app/docs/administration/postgres-standalone#common-errors
Author
Owner

@alextran1502 commented on GitHub (Mar 26, 2025):

Are you on the same version of pgvecto.rs as the docker-compose file? v0.2.0

What is your postgres version?

@alextran1502 commented on GitHub (Mar 26, 2025): Are you on the same version of pgvecto.rs as the docker-compose file? v0.2.0 What is your postgres version?
Author
Owner

@blockbasti commented on GitHub (Mar 26, 2025):

Hmm, can you try this?

https://immich.app/docs/administration/postgres-standalone#common-errors

ERROR: relation "pg_vector_index_stat" does not exist

Are you on the same version of pgvecto.rs as the docker-compose file? v0.2.0

What is your postgres version?

ghcr.io/tensorchord/cloudnative-pgvecto.rs:16-v0.3.0

@blockbasti commented on GitHub (Mar 26, 2025): > Hmm, can you try this? > > https://immich.app/docs/administration/postgres-standalone#common-errors `ERROR: relation "pg_vector_index_stat" does not exist` > Are you on the same version of pgvecto.rs as the docker-compose file? v0.2.0 > > What is your postgres version? `ghcr.io/tensorchord/cloudnative-pgvecto.rs:16-v0.3.0`
Author
Owner

@alextran1502 commented on GitHub (Mar 26, 2025):

Did you update to 0.3.0 recently?

@alextran1502 commented on GitHub (Mar 26, 2025): Did you update to 0.3.0 recently?
Author
Owner

@blockbasti commented on GitHub (Mar 26, 2025):

Did you update to 0.3.0 recently?

Nope, has been running for a while. Also downgrading the image back to v.1.129.0 starts without issue.

@blockbasti commented on GitHub (Mar 26, 2025): > Did you update to 0.3.0 recently? Nope, has been running for a while. Also downgrading the image back to v.1.129.0 starts without issue.
Author
Owner

@mertalev commented on GitHub (Mar 27, 2025):

There's really no change related to vector indices between 1.129.0 and 1.130.0. I feel like this has to be a deployment-related issue rather than something inherent to Immich.

@mertalev commented on GitHub (Mar 27, 2025): There's really no change related to vector indices between 1.129.0 and 1.130.0. I feel like this has to be a deployment-related issue rather than something inherent to Immich.
Author
Owner

@mertalev commented on GitHub (Mar 27, 2025):

FWIW I don't think those errors are why Immich is crashing. The errors are logged to console, but the errors are handled and this particular one can show up if there has never been a vector index created in this DB (i.e. it's completely fresh). But it wouldn't cause Immich to crash since it's caught.

@mertalev commented on GitHub (Mar 27, 2025): FWIW I don't think those errors are why Immich is crashing. The errors are logged to console, but the errors are handled and this particular one can show up if there has never been a vector index created in this DB (i.e. it's completely fresh). But it wouldn't cause Immich to crash since it's caught.
Author
Owner

@etnoy commented on GitHub (Mar 28, 2025):

I have the same error messages in my instance but they appear benign

@etnoy commented on GitHub (Mar 28, 2025): I have the same error messages in my instance but they appear benign
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#5682