GraphCanon updated 3w · GitHub synced 3w · 35 views this month
Decision brief
pgvector extends PostgreSQL with efficient vector similarity searches.
Good fit when
- When you need to perform approximate nearest neighbor or exact nearest neighbor searches on your vectors and prefer to keep the data within a PostgreSQL database.
- For projects requiring customization or integration with Postgres-specific features such as stored procedures, triggers, and complex SQL queries.
Avoid when
- When the requirement is to have a standalone in-memory or distributed vector database system as pgvector remains strictly integrated with PostgreSQL.
- For scenarios where high availability and clustering capabilities without manual intervention (beyond what standard PostgreSQL offers) are necessary.
Observed Jul 11, 2026 · Source: enrich:decision_facts
Verify the decision
Adoption
Package downloads where a registry match exists. GitHub stars (22,375) are secondary evidence.
- Docker Hub pulls (30d)
- 130,121,796·Docker Hub API·3w
Maintenance and security
Full trust report- Maintenance
- Very active (0d since push)
- As of 3w
- Provenance
- Not a fork · Organization account
- As of 3w
- Security (OSV)
- No lockfile
- As of 1mo
Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.
Install
git clone https://github.com/pgvector/pgvectorHow it fits your stack(27)
Typed graph edges - alternatives, integrations, successors, and dependencies. Ranked by relationship type, not raw GitHub stars.
Alternative
Integrates
Related
Relationship graph
Optional deeper exploration of typed edges and category neighbours.
Similar tools
Same-category neighbours not already linked as typed edges.
Evidence and technical details
Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.
Overview
pgvector extends PostgreSQL to enable efficient vector similarity searches.
Capability facts
- Deploy
- Self-host
Source: dockerfile:Dockerfile · Jul 28, 2026
- Docker
- Dockerfile present
Source: dockerfile:Dockerfile · Jul 28, 2026
- Languages
- c
Source: github.language · Jul 28, 2026
Categories
Graph entities
Tags
README
Getting Started
Enable the extension (do this once in each database where you want to use it)
CREATE EXTENSION vector;
Create a vector column with 3 dimensions
CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3));
Insert vectors
INSERT INTO items (embedding) VALUES ('[1,2,3]'), ('[4,5,6]');
Get the nearest neighbors by L2 distance
SELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 5;
Also supports inner product (<#>), cosine distance (<=>), and L1 distance (<+>)
Note: <#> returns the negative inner product since Postgres only supports ASC order index scans on operators
Docker
Get the Docker image with:
docker pull pgvector/pgvector:pg18-trixie
This adds pgvector to the Postgres image (replace 18 with your Postgres server version, and run it the same way).
Supported tags are:
pg18-trixie,0.8.5-pg18-trixiepg18-bookworm,0.8.5-pg18-bookworm,pg18,0.8.5-pg18pg17-trixie,0.8.5-pg17-trixiepg17-bookworm,0.8.5-pg17-bookworm,pg17,0.8.5-pg17pg16-trixie,0.8.5-pg16-trixiepg16-bookworm,0.8.5-pg16-bookworm,pg16,0.8.5-pg16pg15-trixie,0.8.5-pg15-trixiepg15-bookworm,0.8.5-pg15-bookworm,pg15,0.8.5-pg15pg14-trixie,0.8.5-pg14-trixiepg14-bookworm,0.8.5-pg14-bookworm,pg14,0.8.5-pg14pg13-trixie,0.8.5-pg13-trixiepg13-bookworm,0.8.5-pg13-bookworm,pg13,0.8.5-pg13
You can also build the image manually:
git clone --branch v0.8.5 https://github.com/pgvector/pgvector.git
cd pgvector
docker build --pull --build-arg PG_MAJOR=18 -t myuser/pgvector .
If you increase maintenance_work_mem, make sure --shm-size is at least that size to avoid an error with parallel HNSW index builds.
docker run --shm-size=1g ...
For agents
This page has a .md twin and JSON over the API.