-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SELECT * FROM pg_vector_index_stat does not work with partitions #477
Comments
It'll be fixed in next version and you could use CREATE OR REPLACE VIEW pg_vector_index_stat AS
SELECT
C.oid AS tablerelid,
I.oid AS indexrelid,
C.relname AS tablename,
I.relname AS indexname,
(_vectors_index_stat(I.oid)).*
FROM pg_class C JOIN
pg_index X ON C.oid = X.indrelid JOIN
pg_class I ON I.oid = X.indexrelid JOIN
pg_am A ON A.oid = I.relam
WHERE A.amname = 'vectors' AND C.relkind = 'r'; to fix the behavior in current version. |
Thanks for the quick reply @usamoi. |
Feel sorry for it. I forgot that the view is changed in development branch since v0.2.1. If you are using v0.2.1, CREATE OR REPLACE VIEW pg_vector_index_stat AS
SELECT
C.oid AS tablerelid,
I.oid AS indexrelid,
C.relname AS tablename,
I.relname AS indexname,
(_vectors_index_stat(I.relfilenode)).*
FROM pg_class C JOIN
pg_index X ON C.oid = X.indrelid JOIN
pg_class I ON I.oid = X.indexrelid JOIN
pg_am A ON A.oid = I.relam
WHERE A.amname = 'vectors' AND C.relkind = 'r'; should work. |
It still produces the same error. But don't worry I will just reinstall the extension. |
Hi,
I noticed that
SELECT * FROM pg_vector_index_stat
does not work when an index for a partitioned table was created. It produces the following error:[XX000] ERROR: pgvecto.rs: The index is not existing in the background worker.
.Here is a reproducer for Postgres 15 and pgvecto.rs 0.2.1 based on the existing partition.slt:
The text was updated successfully, but these errors were encountered: