Comments (1)
FDW problems
At step CREATE SERVER
:
CREATE SERVER foreign_server
FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host 'host.docker.internal', port '28816', dbname 'vectors', sslmode 'disable', use_remote_estimate 'true', extensions 'vector');
GRANT USAGE ON FOREIGN SERVER foreign_server TO local_user;
- If not config the
extensions='vector'
atCREATE SERVER
step of local machine- Then a full table scan will be sent to remote, unable to use an index
postgres=> EXPLAIN verbose select * from foreign_test ORDER BY embedding <-> '[0.40671515, 0.24202824, 0.37059402]' LIMIT 1;
QUERY PLAN
---------------------------------------------------------------------------------------------------
Limit (cost=4881.00..4881.00 rows=1 width=44)
Output: id, embedding, ((embedding <-> '[0.40671515,0.24202824,0.37059402]'::vector))
-> Sort (cost=4881.00..5131.00 rows=100000 width=44)
Output: id, embedding, ((embedding <-> '[0.40671515,0.24202824,0.37059402]'::vector))
Sort Key: ((foreign_test.embedding <-> '[0.40671515,0.24202824,0.37059402]'::vector))
-> Foreign Scan on public.foreign_test (cost=100.00..4381.00 rows=100000 width=44)
Output: id, embedding, (embedding <-> '[0.40671515,0.24202824,0.37059402]'::vector)
Remote SQL: SELECT id, embedding FROM public.test
- If config the
extensions='vector'
atCREATE SERVER
step of local machine- It requires the extension at "local" and "remote" is installed in same schema
postgres=> EXPLAIN verbose select * from foreign_test ORDER BY embedding <-> '[0.40671515, 0.24202824, 0.37059402]' LIMIT 1;
ERROR: operator does not exist: vectors.vector public.<-> unknown
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
CONTEXT: remote SQL command: EXPLAIN SELECT id, embedding FROM vectors.test ORDER BY (embedding OPERATOR(public.<->) '[0.40671515,0.24202824,0.37059402]') ASC NULLS LAST
The remote operator should be vectors.<->
instead of public.<->
, but the local pgvector
is installed at public
.
https://github.com/postgres/postgres/blob/43a9cab4844b9c933f1a24e24a38311ee24deefd/contrib/postgres_fdw/deparse.c#L3418
pgvecto.rs
can be only installed at schema vectors
, but pgvector
can be installed any schema.
For example, in supabase, pgvector
is installed at schema extensions
.
Alternatives
- multiply images
from pgvecto.rs.
Related Issues (20)
- 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
- feat: Support vector aggregation function HOT 1
- feat: ANN benchmark HOT 3
- bench(fdw): Latency HOT 4
- fix(bench): Fix ZillizBench HOT 1
- feat: Add pgvecto.rs to vector hub HOT 2
- unknown x86 target feature HOT 2
- install patched pgrx failed HOT 4
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.