Comments (4)
Sorry for the problem. This is likely due to the problem of NULL vector in the index which we fixed in 0.2.1. Another way to reset pgvecto.rs is to manually delete all the file under pgdata/pg_vectors
. This will remove all the indexes there. Your data is in the postgres storage and won't be affected. Only indexes are deleted by this way. Then everything should work. You only need to do the REINDEX
on all the vector columns
from pgvecto.rs.
I saw v0.2.1
was available this morning: ghcr.io/tensorchord/cloudnative-pgvecto.rs:16.2-v0.2.1
. Upgraded to that:
postgres=# \c immich
You are now connected to database "immich" as user "postgres".
immich=# SELECT pgvectors_upgrade();
WARNING: pgvecto.rs is upgraded. Restart PostgreSQL to take effects.
pgvectors_upgrade
-------------------
(1 row)
$ kubectl cnpg restart postgres16 -n cloudnative-pg
postgres16 restarted
I restarted it 2 more times. This is still postgres:
UTC","user_name":"app","database_name":"immich","process_id":"5399","connection_from":"10.42.4.226:39502","session_id":"65e71836.1517","session_line_num":"1","command_tag":"SELECT","session_start_time":"2024-03-05 13:03:50 UTC","virtual_transaction_id":"9/28","transaction_id":"0","error_severity":"ERROR","sql_state_code":"XX000","message":"called `Result::unwrap()` on an `Err` value: NoSuchType(\"vectors.vector_index_stat\")","query":"\n SELECT idx_status\n FROM pg_vector_index_stat\n WHERE indexname = $1","backend_type":"client backend","query_id":"0"}}
Immich, still crash looping on this:
[Nest] 7 - 03/05/2024, 1:07:15 PM WARN [DatabaseService] Could not run vector reindexing checks. If the extension was updated, please restart the Postgres instance.
/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219
throw new QueryFailedError_1.QueryFailedError(query, parameters, err);
^
QueryFailedError: called `Result::unwrap()` on an `Err` value: NoSuchType("vectors.vector_index_stat")
at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DataSource.query (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:350:20)
at async DatabaseRepository.shouldReindex (/usr/src/app/dist/infra/repositories/database.repository.js:127:25)
at async /usr/src/app/dist/domain/database/database.service.js:41:21
at async /usr/src/app/dist/infra/repositories/database.repository.js:185:23 {
query: '\n' +
' SELECT idx_status\n' +
' FROM pg_vector_index_stat\n' +
' WHERE indexname = $1',
parameters: [ 'clip_index' ],
driverError: error: called `Result::unwrap()` on an `Err` value: NoSuchType("vectors.vector_index_stat")
at /usr/src/app/node_modules/pg/lib/client.js:526:17
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25)
at async DataSource.query (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:350:20)
at async DatabaseRepository.shouldReindex (/usr/src/app/dist/infra/repositories/database.repository.js:127:25)
at async /usr/src/app/dist/domain/database/database.service.js:41:21
at async /usr/src/app/dist/infra/repositories/database.repository.js:185:23 {
Not sure what to try next.
from pgvecto.rs.
hmm... seems reindex database;
did the trick.
immich=# \dx
List of installed extensions
Name | Version | Schema | Description
---------------+---------+------------+----------------------------------------------------------------------------------------------
cube | 1.5 | public | data type for multidimensional cubes
earthdistance | 1.1 | public | calculate great-circle distances on the surface of the Earth
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
uuid-ossp | 1.1 | public | generate universally unique identifiers (UUIDs)
vectors | 0.2.1 | vectors | vectors: Vector database plugin for Postgres, written in Rust, specifically designed for LLM
(5 rows)
immich=# reindex database;
REINDEX
Immich server restarted OK after that.
from pgvecto.rs.
Thanks for your response, we have seen it's not very clear for upgrading to v0.2.1
.
We will add the step to REINDEX
at our upgrading docs soon.
from pgvecto.rs.
Related Issues (20)
- ci: build aarch64 release with given aarch64 bindings
- pgvecto.rs 0.2.1 much slower than pgvector 0.6.1? HOT 9
- test: Test pgvecto.rs FDW against postgres with pgvector HOT 3
- chore: upgrade script for 0.3.0 HOT 3
- Unexpected behavior with NULL HOT 1
- epic
- epic: Release 0.3.0 HOT 1
- benchmark: INT8 benchmark HOT 1
- test: 0.3 release test HOT 1
- chore: sync return when index creation
- Need a docker compose example HOT 4
- epic: Support SDKs in different programming languages HOT 4
- bug(cnpg): type "vector" does not exist HOT 1
- The default max_stack_depth parameter in the container image may be too small HOT 12
- How could I use AzureOpenAI to build LlamaIndex? HOT 2
- vector type not found in the database - pgvecto_rs.psycopg register_vector HOT 5
- copy with BINARY FORMAT fails with cannot find a dumper for type vector HOT 3
- sdk: Sparse vector indices type mismatch between sdk and function signature with numpy.ndarray
- How to find index size ? HOT 3
- Execute pg_resetwal in docker Unraid HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgvecto.rs.