pgvecto-rs Docker 镜像下载 - 轩辕镜像
pgvecto-rs 镜像详细信息和使用指南
pgvecto-rs 镜像标签列表和版本信息
pgvecto-rs 镜像拉取命令和加速下载
pgvecto-rs 镜像使用说明和配置指南
Docker 镜像加速服务 - 轩辕镜像平台
国内开发者首选的 Docker 镜像加速平台
极速拉取 Docker 镜像服务
相关 Docker 镜像推荐
热门 Docker 镜像下载

pgvecto-rs 镜像详细信息
pgvecto-rs 镜像标签列表
pgvecto-rs 镜像使用说明
pgvecto-rs 镜像拉取命令
Docker 镜像加速服务
轩辕镜像平台优势
镜像下载指南
相关 Docker 镜像推荐
pgvecto-rs 镜像详细说明
pgvecto-rs 使用指南
pgvecto-rs 配置说明
pgvecto-rs 官方文档
pgvecto.rs
pgvecto.rs is a Postgres extension that provides vector similarity search functions. It is written in Rust and based on pgrx.
Comparison with pgvector
Checkout pgvecto.rs vs pgvector for more details.
| Feature | pgvecto.rs | pgvector |
|---|---|---|
| Filtering | Introduces VBASE method for vector search and relational query (e.g. Single-Vector TopK + Filter + Join). | When filters are applied, the results may be incomplete. For example, if you originally intended to limit the results to 10, you might end up with only 5 results with filters. |
| Vector Dimensions | Supports up to 65535 dimensions. | Supports up to 2000 dimensions. |
| SIMD | SIMD instructions are dynamically dispatched at runtime to maximize performance based on the capabilities of the specific machine. | Added CPU dispatching for distance functions on Linux x86-64" in 0.7.0. |
| Data Types | Introduces additional data types: binary vectors, FP16 (16-bit floating point), and INT8 (8-bit integer). | - |
| Indexing | Handles the storage and memory of indexes separately from PostgreSQL | Relies on the native storage engine of PostgreSQL |
| WAL Support | Provides Write-Ahead Logging (WAL) support for data, index support is working in progress. | Provides Write-Ahead Logging (WAL) support for index and data. |
Documentation
- Getting Started
- Overview
- Installation
- Usage
- Indexing
- Search
- Administration
- Configuration
- Upgrading from older versions
- Developers
- Development Tutorial
Quick start
For new users, we recommend using the Docker image to get started quickly.
shdocker run \ --name pgvecto-rs-demo \ -e POSTGRES_PASSWORD=mysecretpassword \ -p 5432:5432 \ -d tensorchord/pgvecto-rs:pg16-v0.2.1
Then you can connect to the database using the psql command line tool. The default username is postgres, and the default password is mysecretpassword.
shpsql -h localhost -p 5432 -U postgres
Run the following SQL to ensure the extension is enabled.
sqlDROP EXTENSION IF EXISTS vectors; CREATE EXTENSION vectors;
pgvecto.rs introduces a new data type vector(n) denoting an n-dimensional vector. The n within the brackets signifies the dimensions of the vector.
You could create a table with the following SQL.
sql-- create table with a vector column CREATE TABLE items ( id bigserial PRIMARY KEY, embedding vector(3) NOT NULL -- 3 dimensions );
[!TIP]
vector(n)is a valid data type only if $1 \leq n \leq 65535$. Due to limits of PostgreSQL, it's possible to create a value of typevector(3)of $5$ dimensions andvectoris also a valid data type. However, you cannot still put $0$ scalar or more than $65535$ scalars to a vector. If you usevectorfor a column or there is some values mismatched with dimension denoted by the column, you won't able to create an index on it.
You can then populate the table with vector data as follows.
sql-- insert values INSERT INTO items (embedding) VALUES ('[1,2,3]'), ('[4,5,6]'); -- or insert values using a casting from array to vector INSERT INTO items (embedding) VALUES (ARRAY[1, 2, 3]::real[]), (ARRAY[4, 5, 6]::real[]);
We support three operators to calculate the distance between two vectors.
<->: squared Euclidean distance, defined as $\Sigma (x_i - y_i) ^ 2$.<#>: negative dot product, defined as $- \Sigma x_iy_i$.<=>: cosine distance, defined as $1 - \frac{\Sigma x_iy_i}{\sqrt{\Sigma x_i^2 \Sigma y_i^2}}$.
sql-- call the distance function through operators -- squared Euclidean distance SELECT '[1, 2, 3]'::vector <-> '[3, 2, 1]'::vector; -- negative dot product SELECT '[1, 2, 3]'::vector <#> '[3, 2, 1]'::vector; -- cosine distance SELECT '[1, 2, 3]'::vector <=> '[3, 2, 1]'::vector;
You can search for a vector simply like this.
sql-- query the similar embeddings SELECT * FROM items ORDER BY embedding <-> '[3,2,1]' LIMIT 5;
A simple Question-Answering application
Please check out the Question-Answering application tutorial.
Half-precision floating-point
vecf16 type is the same with vector in anything but the scalar type. It stores 16-bit floating point numbers. If you want to reduce the memory usage to get better performance, you can try to replace vector type with vecf16 type.
Roadmap 🗂️
Please check out ROADMAP. Want to jump in? Welcome discussions and contributions!
- Chat with us on 💬 ***
- Have a look at
good first issue 💖issues!
Contribute 😊
We welcome all kinds of contributions from the open-source community, individuals, and partners.
- Join our *** community!
- To build from the source, please read our contributing documentation and development tutorial.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Alex Chi 💻 | AuruTus 💻 | Avery 💻 🤔 | Ben Ye 📖 | Ce Gao 💼 🖋 📖 | Jinjing Zhou 🎨 🤔 📆 | Joe Passanante 💻 |
Keming 🐛 💻 📖 🤔 🚇 | Mingzhuo Yin 💻 ⚠️ 🚇 | Usamoi 💻 🤔 | cutecutecat 💻 | odysa 📖 💻 | yi wang 💻 | yihong 💻 |
盐粒 Yanli 💻 | ||||||
|
| ||||||
This project follows the all-contributors specification. Contributions of any kind welcome!
Acknowledgements
Thanks to the following projects:
- pgrx - Postgres extension framework in Rust
- pgvector - Postgres extension for vector similarity search written in C
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务
常见问题
免费版仅支持 Docker Hub 加速,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
免费版仅支持 docker.io;专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
轩辕镜像下载加速使用手册
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
登录仓库拉取
通过 Docker 登录认证访问私有仓库
Linux
在 Linux 系统配置镜像加速服务
Windows/Mac
在 Docker Desktop 配置镜像加速
Docker Compose
Docker Compose 项目配置加速
K8s Containerd
Kubernetes 集群配置 Containerd
宝塔面板
在宝塔面板一键配置镜像加速
群晖
Synology 群晖 NAS 配置加速
飞牛
飞牛 fnOS 系统配置镜像加速
极空间
极空间 NAS 系统配置加速服务
爱快路由
爱快 iKuai 路由系统配置加速
绿联
绿联 NAS 系统配置镜像加速
威联通
QNAP 威联通 NAS 配置加速
Podman
Podman 容器引擎配置加速
Singularity/Apptainer
HPC 科学计算容器配置加速
其他仓库配置
ghcr、Quay、nvcr 等镜像仓库
专属域名拉取
无需登录使用专属域名加速
需要其他帮助?请查看我们的 常见问题 或 官方QQ群: 13763429