Code Monkey home page Code Monkey logo

Comments (5)

VoVAllen avatar VoVAllen commented on May 27, 2024

Have you run the create index before? It's a bit weird. Can you try restarting the database to see whether the issue still exists?

from pgvecto.rs.

ergo70 avatar ergo70 commented on May 27, 2024

I have stopped the server, removed the data directory and set up a completely fresh cluster with:

./initdb -k -D ../data/ -E UTF8 --no-locale -U postgres -W

My postgresql.auto.conf:

# Do not edit this file manually!
# It will be overwritten by the ALTER SYSTEM command.
shared_preload_libraries = 'vectors.so'
search_path = '"$user", public, vectors'

The error persists.

from pgvecto.rs.

VoVAllen avatar VoVAllen commented on May 27, 2024

Can you try remove all the file under pgdata/pg_vectors?

from pgvecto.rs.

ergo70 avatar ergo70 commented on May 27, 2024

As said before, I started with a empty, freshly initialized $PGDATA directory. However, I think I have found a way to reproduce it:

postgres=# CREATE TABLE items (
                id int4 GENERATED ALWAYS AS IDENTITY,
                embedding vector(5) NOT NULL
            );
postgres=# insert into items (embedding) values ('[1,2,3,4,5]');
INSERT 0 1
postgres=# CREATE INDEX ON items USING vectors (embedding vector_cos_ops);
CREATE INDEX

No problems.

postgres=# drop table items;
DROP TABLE
postgres=# CREATE UNLOGGED TABLE items (
                id int4 GENERATED ALWAYS AS IDENTITY,
                embedding vector(5) NOT NULL
            );
postgres=# insert into items (embedding) values ('[1,2,3,4,5]');
INSERT 0 1
postgres=# CREATE INDEX ON items USING vectors (embedding vector_cos_ops);
ERROR:  pgvecto.rs: The index is already existing in the background worker.

It's the UNLOGGED.

Since UNLOGGED is a supported directive for CREATE TABLE since PostgreSQL v9.1 (https://www.postgresql.org/docs/9.1/sql-createtable.html) I'd say, this is a bug. Or is it documented behavior?

best regards

Ernst-Georg

from pgvecto.rs.

usamoi avatar usamoi commented on May 27, 2024

It's intended behavior in 0.2.x. It's solved in #414 and it will work in 0.3.0.

from pgvecto.rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.