#Upgrade error pgvecto.rs 0.3.0

1 messages · Page 1 of 1 (latest)

pliant moat
#

Hello,

I am getting following error:

  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'typecmds.c',
  line: '247',
  routine: 'DefineType'
}
api worker exited with code 1
Starting api worker
[Nest] 2655  - 11/05/2024, 9:50:49 AM     LOG [Api:EventRepository] Initialized websocket server
[Nest] 2655  - 11/05/2024, 9:50:49 AM     LOG [Api:DatabaseService] Updating pgvecto.rs extension to 0.3.0
[Nest] 2655  - 11/05/2024, 9:50:49 AM    WARN [Api:DatabaseService] The pgvecto.rs extension can be updated to 0.3.0.
    Immich attempted to update the extension, but failed to do so.
    This may be because Immich does not have the necessary permissions to update the extension.

    Please run 'ALTER EXTENSION vectors UPDATE' manually as a superuser.
    See https://immich.app/docs/guides/database-queries for how to query the database.
QueryFailedError: type "svector" already exists
    at PostgresQueryRunner.query (/app/immich/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async DataSource.query (/app/immich/server/node_modules/typeorm/data-source/DataSource.js:350:20)
    at async /app/immich/server/dist/repositories/database.repository.js:93:13
    at async EntityManager.transaction (/app/immich/server/node_modules/typeorm/entity-manager/EntityManager.js:73:28)
    at async DatabaseRepository.updateVectorExtension (/app/immich/server/dist/repositories/database.repository.js:84:9)
    at async DatabaseService.updateExtension (/app/immich/server/dist/services/database.service.js:131:41)
    at async /app/immich/server/dist/services/database.service.js:84:17
    at async /app/immich/server/dist/repositories/database.repository.js:197:23 {
  query: "ALTER EXTENSION vectors UPDATE TO '0.3.0'",
  parameters: undefined,
  driverError: error: type "svector" already exists
      at /app/immich/server/node_modules/pg/lib/client.js:535:17
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async PostgresQueryRunner.query (/app/immich/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25)
      at async DataSource.query (/app/immich/server/node_modules/typeorm/data-source/DataSource.js:350:20)
      at async /app/immich/server/dist/repositories/database.repository.js:93:13
      at async EntityManager.transaction (/app/immich/server/node_modules/typeorm/entity-manager/EntityManager.js:73:28)
      at async DatabaseRepository.updateVectorExtension (/app/immich/server/dist/repositories/database.repository.js:84:9)
      at async DatabaseService.updateExtension (/app/immich/server/dist/services/database.service.js:131:41)
      at async /app/immich/server/dist/services/database.service.js:84:17
      at async /app/immich/server/dist/repositories/database.repository.js:197:23 {
    length: 86,
    severity: 'ERROR',
    code: '42710',
    detail: undefined,
torpid pikeBOT
#

:wave: Hey @pliant moat,

Thanks for reaching out to us. Please follow the recommended actions below; this will help us be more effective in our support effort and leave more time for building Immich immich.

References

Checklist

  1. :ballot_box_with_check: I have verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: I have read applicable release notes.
  3. :ballot_box_with_check: I have reviewed the FAQs for known issues.
  4. :ballot_box_with_check: I have reviewed Github for known issues.
  5. :ballot_box_with_check: I have tried accessing Immich via local ip (without a custom reverse proxy).
  6. :ballot_box_with_check: I have uploaded the relevant logs, docker compose, and .env files, making sure to use code formatting.
  7. :ballot_box_with_check: I have tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable

(an item can be marked as "complete" by reacting with the appropriate number)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

torpid pikeBOT
pliant moat
uneven river
#

It sounds like you are running your own version of postgres, so have you tried running that command?

#

you also haven't posted any of the things the bot asked for

pliant moat
#

Hello yes. That is the docker compose logs.

#

tensorchord/pgvecto-rs:pg16-v0.3.0

uneven river
#

#7310 this is about the update to 0.2.0 but might be applicable to your situation

uneven river
#

odds are it has already been updated to 0.3.0

#

however you are using an unsupported deployment and we have not tested this fully yet so might be limited in our ability to help

#

it might be easier to restore from a backup back to 0.2.0

pliant moat
#

UPDATE pg_catalog.pg_extension SET extversion = '0.3.0' where extname = 'vectors';

#

Nope seems like something broke: [Nest] 1147 - 11/05/2024, 11:44:47 AM WARN [Api:DatabaseService] Could not run vector reindexing checks. If the extension was updated, please restart the Postgres instance. QueryFailedError: pgvecto.rs: The extension is upgraded so all index files are outdated. ADVICE: Delete all index files. Please read `https://docs.pgvecto.rs/admin/upgrading.html` at PostgresQueryRunner.query (/app/immich/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async DataSource.query (/app/immich/server/node_modules/typeorm/data-source/DataSource.js:350:20) at async DatabaseRepository.shouldReindex (/app/immich/server/dist/repositories/database.repository.js:136:25) at async DatabaseService.checkReindexing (/app/immich/server/dist/services/database.service.js:143:17) at async /app/immich/server/dist/services/database.service.js:92:13 at async /app/immich/server/dist/repositories/database.repository.js:197:23 { query: 'SELECT idx_status FROM pg_vector_index_stat WHERE indexname = $1', parameters: [ 'clip_index' ], driverError: error: pgvecto.rs: The extension is upgraded so all index files are outdated. ADVICE: Delete all index files. Please read `https://docs.pgvecto.rs/admin/upgrading.html` at /app/immich/server/node_modules/pg/lib/client.js:535:17 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async PostgresQueryRunner.query (/app/immich/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) at async DataSource.query (/app/immich/server/node_modules/typeorm/data-source/DataSource.js:350:20) at async DatabaseRepository.shouldReindex (/app/immich/server/dist/repositories/database.repository.js:136:25) at async DatabaseService.checkReindexing (/app/immich/server/dist/services/database.service.js:143:17) at async /app/immich/server/dist/services/database.service.js:92:13 at async /app/immich/server/dist/repositories/database.repository.js:197:23 { length: 234, severity: 'ERROR', code: 'XX000', detail: undefined, hint: undefined, position: undefined, internalPosition: undefined, internalQuery: undefined, where: undefined, schema: undefined, table: undefined, column: undefined, dataType: undefined, constraint: undefined, file: 'error.rs', line: '125', routine: 'vectors::error::check_client' }, length: 234, severity: 'ERROR', code: 'XX000', detail: undefined, hint: undefined, position: undefined, internalPosition: undefined, internalQuery: undefined, where: undefined, schema: undefined, table: undefined, column: undefined, dataType: undefined, constraint: undefined, file: 'error.rs', line: '125', routine: 'vectors::error::check_client' } api worker exited with code 1 Starting api worker

uneven river
pliant moat
#

Yes something is botched. Might need to open a ticket on pgvecto

#

Error in query: ERROR: type "svector" already exists

blissful solstice
#

Did you run SELECT pgvectors_upgrade(); as instructed in that docs page?

pliant moat
blissful solstice
#

@dark sable any idea?

dark sable
#

Is the search path set to include vectors? Does vectors.pgvectors_upgrade() work?

pliant moat
blissful solstice
#

Looks like that worked

#

What does Immich do now?

dark sable
#

Nice, you should restart postgres after that

pliant moat
#

Yes seems like that did the magic restarted both postgress and immich. Thanks again