# pgvector review

> pgvector is an open-source Postgres extension for exact and approximate vector similarity search, storing vectors alongside the rest of your data.

Devtoolwatch Board, the week of Oct 25–31, 2026. Canonical page: https://index.devtoolwatch.com/tools/pgvector/

## TL;DR

pgvector adds vector similarity search to Postgres, so embeddings live in the same database as your other data. It fits developers who already use Postgres and want nearest neighbor search with ACID compliance, JOINs and point-in-time recovery. pgvector supports exact search plus HNSW and IVFFlat approximate indexes.

## pgvector at a glance

- **Category:** [RAG, data and memory](https://index.devtoolwatch.com/categories/rag-data-and-memory/)
- **Maintained by:** pgvector (organization, [@pgvector](https://github.com/pgvector) on GitHub)
- **Language:** C, Perl, Makefile
- **Repository:** [github.com/pgvector/pgvector](https://github.com/pgvector/pgvector)
- **PyPI package:** [pgvector](https://pypi.org/project/pgvector/) 0.5.1
- **Latest release:** [pgvector 0.5.1](https://pypi.org/project/pgvector/) on PyPI, Oct 9, 2026
- **First published:** Apr 20, 2021

## What pgvector does

- pgvector runs exact and approximate nearest neighbor search inside Postgres using SQL operators.
- pgvector stores single-precision, half-precision, binary, and sparse vectors as column types.
- pgvector supports L2, inner product, cosine, L1, Hamming, and Jaccard distance.
- pgvector offers HNSW and IVFFlat approximate indexes with tunable recall and speed settings.
- pgvector provides iterative index scans, starting with 0.8.0, so filtered queries return enough results.
- pgvector can average vectors with AVG, including per group with GROUP BY.
- pgvector works from any language that has a Postgres client.

### How it works

pgvector is a C extension you compile or install into Postgres 13+, then enable per database with CREATE EXTENSION vector. You add vector columns to tables and query them with distance operators such as <-> in ORDER BY ... LIMIT. Indexes are created with standard CREATE INDEX using hnsw or ivfflat. Any Postgres client can use it, and a separate Python package adds pgvector support for Python.

## How to install pgvector

**From PyPI**

```
pip install pgvector
```

### Requirements

- Postgres 13 or later.
- On Windows, C++ support in Visual Studio to build with nmake.
- The Python package requires Python 3.10 or later.

### First steps

1. Enable the extension once in each database: CREATE EXTENSION vector;
2. Create a table with a vector column, such as embedding vector(3).
3. Insert vectors with INSERT, or load them in bulk using COPY in binary format.
4. Query nearest neighbors with ORDER BY embedding <-> '[3,1,2]' LIMIT 5.

## Who pgvector is for

- Teams already on Postgres who want vectors stored with their relational data.
- Applications that need vector search combined with JOINs, transactions, and filtering in SQL.
- Multitenant apps that can isolate tenants through list partitioning or separate tables.

### Limitations

- pgvector indexes support up to 2,000 dimensions for vector, 4,000 for halfvec, and 1,000 non-zero elements for sparsevec.
- pgvector approximate indexes trade some recall for speed, and query results change after adding one.
- pgvector applies filtering after an approximate index scan, so filtered queries can return fewer rows unless iterative scans are enabled.
- pgvector HNSW indexes build more slowly and use more memory than IVFFlat, and builds slow down when the graph exceeds maintenance_work_mem.

## Usage data (the week of Oct 25–31, 2026)

- Board rank: #167 overall, #17 in RAG, data and memory, momentum score 49
- Downloads that week: 9.4M (+7% vs 4-week average)
- New GitHub stars per week (last 12 weeks): Aug 9: 100; Aug 16: 84; Aug 23: 116; Aug 30: 111; Sep 6: 77; Sep 13: 105; Sep 20: 72; Sep 27: 77; Oct 4: 68; Oct 11: 109; Oct 18: 80; Oct 25: 86

## pgvector alternatives

| Rank | Tool | Stars | Downloads/wk |
|---|---|---|---|
| #1 | [XERJ](https://index.devtoolwatch.com/tools/xerj-org-xerj/) | 17.9k | – |
| #2 | [Memvid](https://index.devtoolwatch.com/tools/memvid-memvid/) | 17.3k | – |
| #3 | [LEANN](https://index.devtoolwatch.com/tools/startrail-org-leann/) | 13.7k | – |
| #4 | [Graphify](https://index.devtoolwatch.com/tools/graphify-labs-graphify/) | 140k | 480.7k |
| #5 | [MarkItDown](https://index.devtoolwatch.com/tools/markitdown/) | 193.2k | 4.7M |
| #6 | [Firecrawl](https://index.devtoolwatch.com/tools/firecrawl/) | 197.4k | 2.9M |

## pgvector FAQ

### Is pgvector free and open source?

pgvector's code is on GitHub (pgvector/pgvector), but the repository doesn't declare a standard open-source license. Check its license file before using it commercially.

### How do I install pgvector?

Run `pip install pgvector`. The pgvector package needs Python 3.10 or newer.

### Is pgvector still maintained?

Yes. The pgvector/pgvector repository was last updated on Oct 21, 2026, and the latest release, pgvector 0.5.1 on PyPI, came out on Oct 9, 2026.

### How popular is pgvector?

pgvector has 23.5k GitHub stars as of Nov 1, 2026. It gained 86 new stars in the week of Oct 25–31, 2026, against a 12-week average of 90 a week. Its main package had 9.4M downloads that week, +7% against its own 4-week average. That made it #17 among RAG, data and memory tools on the Devtoolwatch Board.

### pgvector vs Qdrant: how do they compare?

pgvector and Qdrant are both tracked by Devtoolwatch as RAG, data and memory tools. pgvector has 23.5k GitHub stars and Qdrant has 35.4k. In the week of Oct 25–31, 2026, pgvector's main package had 9.4M downloads and Qdrant's had 4.5M. Qdrant is an open-source vector similarity search engine and vector database written in Rust, with filtering on JSON payloads. [Qdrant review](https://index.devtoolwatch.com/tools/qdrant/)

### pgvector vs Milvus: how do they compare?

pgvector and Milvus are both tracked by Devtoolwatch as RAG, data and memory tools. pgvector has 23.5k GitHub stars and Milvus has 46.5k. In the week of Oct 25–31, 2026, pgvector's main package had 9.4M downloads and Milvus's had 1.1M. [Milvus review](https://index.devtoolwatch.com/tools/milvus/)

### What are the best alternatives to pgvector?

Other RAG, data and memory tools on the Devtoolwatch Board in the week of Oct 25–31, 2026, by momentum: XERJ (#1), Memvid (#2), LEANN (#3), Graphify (#4), MarkItDown (#5). The alternatives table above has their numbers.

### Is pgvector a separate database?

No. pgvector is an extension for Postgres, not a separate database. You enable it in each database with CREATE EXTENSION vector and store vectors in regular tables. You keep Postgres features such as ACID compliance, point-in-time recovery, and JOINs.

### How do I use pgvector in PostgreSQL?

pgvector is used through SQL. Run CREATE EXTENSION vector, create a column of type vector(n), and insert vectors as text like '[1,2,3]'. Then query nearest neighbors with ORDER BY embedding <-> '[3,1,2]' LIMIT 5.

### How do I use pgvector in Python?

pgvector works with any language that has a Postgres client. A pgvector package on PyPI adds pgvector support for Python and requires Python 3.10 or later.

### Is pgvector scalable?

pgvector scales through approximate indexes (HNSW or IVFFlat), quantization, parallel index builds, and partitioning. The README suggests binary quantization for faster build times at scale and more maintenance_work_mem for faster HNSW builds.

### Is pgvector fast?

pgvector defaults to exact search, which gives perfect recall. For speed, add an HNSW or IVFFlat index, which trades some recall for speed. Settings like hnsw.ef_search and ivfflat.probes tune that tradeoff.

### Can pgvector filter results with a WHERE clause?

Yes. pgvector supports filtered queries through indexes on the filter column, partial indexes, partitioning, or iterative index scans. With approximate indexes, filtering happens after the scan, so enable hnsw.iterative_scan or ivfflat.iterative_scan to get enough rows.

## Sources

1. [pgvector/pgvector on GitHub](https://github.com/pgvector/pgvector)
2. [pgvector README](https://github.com/pgvector/pgvector/blob/master/README.md)
3. [pgvector on PyPI](https://pypi.org/project/pgvector/)
4. [Hacker News: Pgvector: Open-source vector similarity search for Postgres](https://news.ycombinator.com/item?id=34966045)
5. [Hacker News: pgvector: Open-source vector similarity search for Postgres](https://news.ycombinator.com/item?id=34530923)
6. [Hacker News: I Added TurboQuant to Pgvector](https://news.ycombinator.com/item?id=48712021)
7. [Devtoolwatch Board, the week of Oct 25–31, 2026](https://index.devtoolwatch.com/)
