Updated

pgvector

PostgreSQL extension that adds vector data types and similarity search directly inside a Postgres database.

86 open-source projects declare pgvector in their code; 1 maker's product we track uses it. What makers like most: Vectors live in the Postgres you already run, so there is no second database to sync or operate. Their most common complaint: Latency degrades at very large vector counts, which per-chunk or patch embeddings reach quickly. On GitHub, 16 public pull requests moved projects to pgvector from tools we list, and 3 moved them away.

Open sourceSelf-hostableFree tier

Profile checked

Works with AI agents:llms.txt
Ask your AI about this, with this page as the source:ChatGPT ↗Claude ↗Perplexity ↗

How makers use pgvector

Makers' products we track use pgvector for vector database (1).

What pgvector is used for

Vector Database · Inside your database →Apps already on Postgres that want vector search in the same database, joined with normal tables.Trade-off: Index tuning and memory sizing are your job, and very large indexes can crowd out the rest of the database.
Pinecone53Qdrant18Weaviate16Chroma12turbopuffer8pgvector1Makers' products on each, for vector database

pgvector vs the alternatives makers chose

For vector database, 1 of the 107 makers' products we know the choice of picked pgvector (1%), behind Pinecone (50%).

OptionMakers' productsFree forAt 10,000 usersOpen source
Pinecone53 50%~3,300 users$113/mo · StandardNo
Qdrant18 17%~1,000 users$103/mo · Standard (3 nodes, 0.5 vCPU / 4 GiB each)Yes
Weaviate16 15%~1,000 users$253/mo · FlexYes
Chroma12 11%~760 users$51/mo · StarterYes
turbopuffer8 7%None$21/mo · LaunchNo
LanceDB3 3%——Yes
pgvector1 1%——Yes

For vector database: how many of the 107 makers' products we know the vector database of chose each option, and what each costs at 10,000 users.

Costs are the cheapest plan that fits, from each vendor's pricing page, at the usage our stack planner assumes for a product with that many users. Free for: the users its cheapest plan a business can use stays free for.

When to use pgvector, and when not

Pick pgvector if

Something else fits better if

  • You're prototyping retrieval on your laptop, or want vectors in files with no server: Chroma.
  • You want a hosted index with nothing to operate: Pinecone or turbopuffer.
  • You need an open-source store with heavy filtering or hybrid search, self-hosted or managed: Qdrant or Weaviate.
From each decision's guide, written from what makers' products chose and why.

pgvector is a PostgreSQL extension that lets you store embeddings in an ordinary table column, next to the rows they describe, and find the nearest ones with SQL. Instead of running a separate vector store and keeping IDs in sync between two systems, vectors live in the same database as your users, documents and permissions.

More about pgvector

You enable it with CREATE EXTENSION vector, add a vector(n) column, and order a query by a distance operator (cosine, L2, inner product and others) with a LIMIT. Without an index Postgres compares every row and returns exact results; adding an HNSW or IVFFlat index switches to approximate search, which is faster but can return slightly different rows. Any language with a Postgres client works, and the project keeps helper libraries for Python, Node.js, Ruby, Go, Rust, Java and many more.

What a small team gets is Postgres itself: transactions, JOINs and WHERE clauses in the same query, plus WAL replication and point-in-time recovery. It also offers half-precision, binary and sparse vector types, and pairs with Postgres full-text search for hybrid queries. It runs anywhere Postgres 13+ runs (Docker, Homebrew, apt), and many hosted Postgres providers ship it preinstalled.

The limits: indexes cover up to 2,000 dimensions (4,000 with half precision); filters on an approximate index are applied after the index scan, so selective filters can return fewer rows unless you turn on iterative scans; and scaling beyond one machine means read replicas or a sharding tool such as Citus.

pgvector pros and cons

What makers like most: Vectors live in the Postgres you already run, so there is no second database to sync or operate. Their most common complaint: Latency degrades at very large vector counts, which per-chunk or patch embeddings reach quickly.

Pros

  • Vectors live in the Postgres you already run, so there is no second database to sync or operate. HNHN 2HN 3HN 4
  • Hybrid search is doable in plain SQL by pairing it with a BM25 implementation and rank fusion. HNHN 2

Cons and watch-outs

  • Latency degrades at very large vector counts, which per-chunk or patch embeddings reach quickly. HNHN 2HN 3
  • Index size and dimension limits make ultra-wide embeddings awkward, forcing quantization or split vectors. HNHN 2
  • Heavy vector workloads compose badly with other workloads on the same database server. HNHN 2

Themes that recur in makers' words and Hacker News comments, each linked to what it summarises.

Reliability and open issues

The most wanted open issue on GitHub has 11 👍.

Most wanted on GitHub

Open on 2026-10-04 in pgvector/pgvector, with activity in the last year — issues and feature requests by 👍.

Who switches

More projects move to pgvector: 16 pull requests in, 3 out; the most come from Qdrant and leave for Pinecone.

Moving to pgvectorMoving away
pgvector
Qdrant → pgvector9 PRs
Chroma → pgvector7 PRs
pgvector → Pinecone3 PRs

Public pull requests on GitHub since Oct 2024 whose title says "X to Y" — real code changes moving a project from one tool to another, by developers in general.

Who uses it

1 makers' products, each linked to the source that shows it, and 86 open-source projects that declare it in their code.

Job posting 1Declared in code 86How evidence is collected →
Aix-DB
Aix-DBAix-DB 基于 LangChain/LangGraph 框架,结合 MCP Skills 多智能体协作架构,实现自然语言到数据洞察的端到端转换。Vector DatabaseIn its code · source ↗
LangBot
LangBotProduction-grade platform for building agentic IM bots - 生产级多平台智能机器人开发平台/ Agent、知识库编排、插件…Vector DatabaseIn its code · source ↗

Open source: a project that declares pgvector as a dependency in its public code — verifiable, but not necessarily a live product.

What its projects tell coding agents

43 of the 60 open-source products built with pgvector that were worked on in the last 180 days keep instruction files for coding agents — 72%, against 53% of all the projects we read. AGENTS.md is in 32, CLAUDE.md in 30.

1,230words in the median file
uvthe package manager most named, in 19 of 41 files
83%say how to test a change
Named more in these files than in other projects' — in how many of the 41:
What AGENTS.md files say about other tools →What open-source products tell their coding agents →

Alternatives to pgvector

All alternatives by situation →

Further reading

Questions makers ask about pgvector

What is pgvector used for?

PostgreSQL extension that adds vector data types and similarity search directly inside a Postgres database. Makers' products we track use it for vector database (1).

What are the pros and cons of pgvector?

Pros makers name: Vectors live in the Postgres you already run, so there is no second database to sync or operate. Hybrid search is doable in plain SQL by pairing it with a BM25 implementation and rank fusion. Cons: Latency degrades at very large vector counts, which per-chunk or patch embeddings reach quickly. Index size and dimension limits make ultra-wide embeddings awkward, forcing quantization or split vectors. Heavy vector workloads compose badly with other workloads on the same database server.

What are the alternatives to pgvector?

For vector database, the other options makers' products we track chose most are Pinecone (53), Qdrant (18), Weaviate (16), Chroma (12), turbopuffer (8), LanceDB (3). Open source or self-hostable among them: Qdrant, Weaviate, Chroma, LanceDB. Each alternative, with the situation it fits, is on the pgvector alternatives page.

Do developers switch to or away from pgvector?

On GitHub, 16 public pull requests moved projects to pgvector from tools we list, most from Qdrant (9), Chroma (7); 3 moved them away, most to Pinecone (3).

When should you use pgvector?

You already use Postgres and have up to a few million vectors (vector database). Something else fits better if: you're prototyping retrieval on your laptop, or want vectors in files with no server, pick Chroma; you want a hosted index with nothing to operate, pick Pinecone or turbopuffer.

Is pgvector available on hosted Postgres?

Many hosted Postgres providers include it, and the README links to a maintained list of them. It also comes preinstalled in Postgres.app and has packages for Docker, Homebrew, apt and yum. source ↗

Can I index embeddings with more than 2,000 dimensions?

Not with the standard vector type. Half-precision vectors or half-precision indexing reach 4,000 dimensions, binary quantization reaches 64,000, and you can also index subvectors or reduce dimensionality. source ↗

Does the vector index have to fit in memory?

No, but queries are faster when it does. Half-precision indexing or binary quantization make the index smaller. source ↗

Are replication and point-in-time recovery supported?

Yes. pgvector writes through the Postgres write-ahead log, so standard replication and point-in-time recovery cover vector data too. source ↗

Why does a filtered query return fewer results after I add an HNSW index?

With approximate indexes the filter runs after the index scan, so only part of the candidates match. Since version 0.8.0 you can enable iterative index scans to keep scanning until enough rows are found, or add a regular index on the filter column. source ↗

Can I combine keyword and vector search?

Yes. Use it alongside Postgres full-text search and merge the two result lists, for example with Reciprocal Rank Fusion or a cross-encoder. source ↗

How should I handle many tenants in one table?

Tenants sharing one approximate index can affect each other's recall and speed. For isolation the README suggests list partitioning by tenant or separate tables. source ↗

Is pgvector free?

Yes — it is free, open-source software.

Is pgvector open source or self-hostable?

Open source, and you can self-host it. source ↗

Can AI coding agents work with pgvector?

It serves an llms.txt docs index.

Who uses pgvector?

1 makers' products we track, each with a source, and 86 open-source projects declare it in their code. source ↗