The pgvector projectVector Database
pgvector
Postgres extension that stores vectors with the rest of your data and searches them exactly or with HNSW and IVFFlat indexes. Free under the PostgreSQL License, self-installed or on managed hosts such as Neon, Supabase, Cloud SQL, Amazon RDS and Azure.
The 30-Second Take
Pick pgvector if your application data already lives in Postgres and your vectors belong beside it.
Teams that moved to pgvector report one less database to run. Instacart reports 6% fewer zero-result searches after moving from FAISS.
- Best fit
- Teams whose application data already lives in Postgres and who want vectors in the same tables, transactions and backups.
- Main constraint
- Filters apply after the approximate index scan, and the planner can skip the index, so filtered queries need tuning as data grows.
- First move
- Test your filtered queries with EXPLAIN on production-sized data.
Why
Watch your filtered queries, since filters apply after the approximate index scan. Mem0's filtered vector queries never used their HNSW indexes. The company moved its vectors out at about a terabyte.
21 practitioners, 33 sources reviewed, Updated Nov 1, 2026How this is measured
- Operating stack
- AI Application Platform
Comparisons
How does pgvector compare with the alternatives?
pgvector vs Pinecone
- Vector Databases
pgvector keeps vectors in your own Postgres, free under the PostgreSQL License, while Pinecone is a managed service with plan minimums. Teams that moved to pgvector report one less database to run.
pgvector vs Qdrant
- Vector Databases
pgvector keeps vectors in the Postgres you already run, while Qdrant runs as its own database, self-hosted or on Qdrant Cloud. Qdrant indexes filters into its search, and pgvector filters after the index scan unless iterative scans are on.
Operator Insights
What are teams learning from building on pgvector and running it in production?
Ankit MittalEngineerInstacart
Instacart's search retrieval across retailer catalogs, rebuilt on Postgres.
Instacart tech blog, published Read the write-up (opens Instacart tech blog in a new tab)
Observation
Instacart moved semantic search from FAISS to pgvector, and a production A/B test showed a 6% drop in searches with zero results thanks to better recall.
- Takeaway
- Prove throughput on a lab cluster that mimics production before migrating, and measure recall as well as speed, since recall is where Instacart gained.
- What happened
- To migrate from FAISS to pgvector, Instacart first built a lab-scale cluster that mimicked production traffic to confirm pgvector could handle its throughput and latency. Offline, pgvector was marginally slower than FAISS for larger retailers and had better recall. In a production A/B test, searches with zero results dropped 6%, and keeping retrieval in one datastore let Instacart filter documents by attributes, which its FAISS setup could not.
- Public engineering write-up
- Measured results reported
- Published May 28, 2025
Deployment details
Instacart's search retrieval across retailer catalogs, rebuilt on Postgres.
- Public engineering write-up
- Measured results reported
- Published May 28, 2025
- Team
- Instacart search
- Workload
- Semantic search retrieval with attribute filtering across retailer catalogs
- Product version
- pgvector in Postgres, after a lab-scale prototype cluster
- Measurement
- 6% drop in searches with zero results in a production A/B test
Aashi DuttSenior technical content writer, writing Mem0's accountMem0
Mem0's agent memory service, with vectors and relational data in Aurora PostgreSQL and multi-tenant filters on every query.
Mem0 blog, published Read the post (opens Mem0 blog in a new tab)
Observation
Mem0's HNSW indexes failed to serve its production queries: the Postgres planner chose 8-to-14-second sequential scans over a 1,153 GB table once selective tenant filters entered, and Mem0 moved its vectors to turbopuffer.
- Takeaway
- Check with EXPLAIN that filtered vector queries use the index at production size. Mem0 says teams under roughly 10 million vectors with simple queries probably should not migrate.
- What happened
- Mem0's HNSW indexes recorded 0 scans in production while every vector query fell back to an 8-to-14-second sequential scan over a 1,153 GB table. Mem0's own diagnosis: the Postgres query planner correctly decided a sequential scan was cheaper than the HNSW index once selective multi-tenant filters entered the query, and the post says this is not a pgvector bug and that the planner was doing its job. The unused indexes cost 325 GB of storage, and Mem0 moved its vectors to turbopuffer and kept relational data in Postgres, where retrieval now averages about 110 to 120 ms.
- Public organization write-up (Mem0's own blog)
- Measured results reported
- Published Jul 30, 2026, updated Sep 28, 2026
Deployment details
Mem0's agent memory service, with vectors and relational data in Aurora PostgreSQL and multi-tenant filters on every query.
- Public organization write-up (Mem0's own blog)
- Measured results reported
- Published Jul 30, 2026, updated Sep 28, 2026
- Team
- Mem0
- Workload
- Multi-tenant vector search for agent memory over a 1,153 GB table
- Product version
- pgvector HNSW indexes on Aurora PostgreSQL
- Measurement
- 0 index scans; 8 to 14 second sequential scans; 325 GB of unused index storage
Buying and deployment
What a team building on it should verify before production traffic grows.
Sourced from pgvector documentation
Signals
What is the current evidence saying about pgvector?
A current read of what teams report publicly about running pgvector in their own Postgres and on managed hosts, with each finding linked to its sources.
Practitioner sentiment, teams and leaders
−29 Negative net
of 24 sources that take a side, each author counted once. Small sample.
How this figure is madeCurrent sentiment
Positive, mixed and negative sources
The score counts them as 4 positive, 7 mixed and 10 negative votes, one per author.
Teams report pgvector in production at Discourse and Instacart, and Mem0 moved its vectors out when the planner skipped its indexes under tenant filters. Filters and the query planner, release regressions and host versions draw most of the reports.
Run a pilot on your own documents and filters to measure recall against exact search, query latency at your filter selectivity, and memory per million vectors.
Evidence field. All 33 sources, one mark each.
Arrange by
Each mark is one source: positive, mixed, negative, no opinion stated, or documentation (not counted).
| Group | Sources | Positive | Mixed | Negative | No opinion stated and not counted in the score | Documentation, checked and not counted |
|---|---|---|---|---|---|---|
| Positive | 5 | 5 | 0 | 0 | 0 | 0 |
| Mixed | 8 | 0 | 8 | 0 | 0 | 0 |
| Negative | 11 | 0 | 0 | 11 | 0 | 0 |
| Documentation | 7 | 0 | 0 | 0 | 0 | 7 |
| Outside this group | 2 | 1 | 1 | 0 | 0 | 0 |
| Quarter | Sources |
|---|---|
| Q1 2025 | 1 |
| Q2 2025 | 1 |
| Q3 2025 | 2 |
| Q4 2025 | 7 |
| Q1 2026 | 6 |
| Q2 2026 | 2 |
| Q3 2026 | 6 |
| Q4 2026 | 1 |
| Documentation, checked | 7 |
By sentiment
7 documentation pages check facts and are not counted; 2 sit outside this group.
Hover a mark for a quick look, click it or press Enter to open its source.Tap a mark to open its source, then step to its neighbors with Previous and Next.
What practitioners praise
Each mark is a source on it; filled marks praise it.
For teams and technical leaders, no capability reaches 5 sources from 3 authors.
Most common concerns
Top concern of 2. Each mark is a source on it; filled marks raise it.
All 33 sources behind these findings
- READMEpgvector (Official), Product documentation, checked Nov 1, 2026
- Neon docs: pgvectorpgvector (Official), Product documentation, checked Nov 1, 2026
- Microsoft Learn: pgvector on Azure Database for PostgreSQLpgvector (Official), Product documentation, checked Nov 1, 2026
- Google Cloud: Cloud SQL extensionspgvector (Official), Product documentation, checked Nov 1, 2026
- AWS What's New: Amazon RDS supports pgvectorpgvector (Official), Product documentation, checked Nov 1, 2026
- Supabase docs: pgvectorpgvector (Official), Product documentation, checked Nov 1, 2026
- LICENSEpgvector (Official), Product documentation, checked Nov 1, 2026
- GitHub issue by nlundeeNikolai Maasø Lunde (nlundee), Digdir (GitHub profile) (self-described: Genki, Digdir's shared generative AI platform for the Norwegian public sector, on Azure), GitHub issue, published Oct 29, 2026
- GitHub issue by jitokimjito (jitokim), Applied AI Engineer, Lbox (GitHub profile) (self-described: Hybrid sparse and dense retrieval on self-managed Postgres), GitHub issue, published Sep 10, 2026
- Hacker News comment by GluberGluber, Hacker News commenter (self-described: Production RAG on busy Postgres clusters), Hacker News comment, published Aug 19, 2026
- Hacker News comment by GluberGluber, Hacker News commenter (self-described: Designing production document RAG systems), Hacker News comment, published Aug 19, 2026
- Mem0 blog: How we cut vector search latency by 70xAashi Dutt, senior technical content writer at Mem0 (self-described: Mem0's production vector search on Aurora PostgreSQL), Engineering blog post, published Jul 30, 2026
- Hacker News comment by rkochanowskirkochanowski, Hacker News commenter (self-described: Storing embeddings at half precision), Hacker News comment, published Jul 4, 2026
- GitHub issue by itaispiegelitaispiegel (Itai Spiegel), GitHub issue reporter (self-described: Migration-time index builds in CI from the official Docker image), GitHub issue, published Jul 1, 2026
- GitHub issue by jippiChristian Winther (jippi), previously Staff Engineer at SeatGeek (GitHub profile) (self-described: Upgrading to Postgres 18 with pgvector in the stack), GitHub issue, published Jun 14, 2026
- Hacker News comment by TuringNYCTuringNYC, CTO and SVP at an advertising holding company (HN profile) (self-described: An enterprise AI creative platform on Azure Postgres), Hacker News comment, published Jun 6, 2026
- GitHub issue by spyderdfxMikhail Nelaev (spyderdfx), Ruby on Rails Developer, abak-press (GitHub profile) (self-described: Image-similarity search over binary hashes), GitHub issue, published Mar 29, 2026
- GitHub issue by R3gardlessSongYoungUk (R3gardless), Kakao (GitHub profile) (self-described: Benchmarking pgvector with VectorDBBench on Cohere-10M), GitHub issue, published Mar 9, 2026
- GitHub issue by alonzivalonziv, GitHub issue reporter (self-described: Retrieve-then-rerank on AWS RDS db.m8g.4xlarge), GitHub issue, published Mar 5, 2026
- Hacker News comment by gomobooKyle Ingraham (gomoboo), software developer building Customelon (Kyle Ingraham's own site) (self-described: A niche RAG site on a single server), Hacker News comment, published Jan 28, 2026
- Hacker News comment by eb0laeb0la, Hacker News commenter (self-described: A small RAG system handed over to an operations team), Hacker News comment, published Jan 15, 2026
- Hacker News comment by juanrejuanre, former startup CTO building aweb (HN profile) (self-described: Retrieval for internal company apps through their llmemory library), Hacker News comment, published Jan 15, 2026
- Clarvo blog: Optimizing filtered vector queriesMiro Keimiöniemi (m1r0k3), Clarvo (self-described: Clarvo's production recommendation queries), Engineering blog post, published Nov 4, 2025
- GitHub issue by detrinDaniel Herman (detrin), Machine Learning Engineer, Cisco (GitHub profile) (self-described: High-QPS vector search on one Postgres instance), GitHub issue, published Nov 4, 2025
- Hacker News comment by xfalcoxRafael dos Santos Silva (xfalcox), Discourse (GitHub profile) (self-described: Discourse, running pgvector across thousands of hosted databases), Hacker News comment, published Nov 3, 2025
- Hacker News comment by xfalcoxRafael dos Santos Silva (xfalcox), Discourse (GitHub profile) (self-described: Sizing index storage for Discourse's hosted fleet), Hacker News comment, published Nov 3, 2025
- Hacker News comment by whakim: Halcyon, with trillions of embeddingswhakim, Halcyon (in the comment) (self-described: Halcyon, with trillions of embeddings), Hacker News comment, published Nov 3, 2025
- Alex Jacobs: The case against pgvectorAlex Jacobs, practitioner blog (self-described: Planning production RAG with real-time inserts and filters on Postgres), Practitioner blog post, published Oct 29, 2025
- GitHub issue by igm503Ian Myers (igm503), Machine Learning Engineer, Shiftsmart (GitHub profile) (self-described: Recency-filtered similarity search over about 3 million vectors), GitHub issue, published Oct 26, 2025
- Hacker News comment by BrandiATMuhkuhJurgen Brandstetter (BrandiATMuhkuh), head of AI and engineering, Howie.systems (HN profile) (self-described: Indexing client documents on Supabase with pgvector), Hacker News comment, published Aug 20, 2025
- GitHub issue by JoranDoxJoranDox, GitHub issue reporter (self-described: Filtered recommendation queries on pgvector), GitHub issue, published Jul 23, 2025
- Instacart tech blog: search infrastructure on PostgresAnkit Mittal, Engineer at Instacart (self-described: Instacart's search retrieval, moved from FAISS to pgvector), Engineering blog post, published May 28, 2025
- Hacker News comment by whakim: A RAG startup whose embeddings grew by orders of magnitudewhakim, first employee at Halcyon (in the comment) (self-described: A RAG startup whose embeddings grew by orders of magnitude), Hacker News comment, published Mar 9, 2025
Mar 2025 to Oct 2026.
26 sources from practitioners, by month and sentiment.
Where It Fits
Where does pgvector belong in the stack?
pgvector is Core across Data, supports Operate, and touches Model, Build, and Evaluate.
- Business area
- Product & Engineering
- Function
- Software Development
- Operating stack
- AI Application Platform
- Primary role
- Vector Search in Postgres
Model
Model APIs: Touches
Model APIs, touches. pgvector stores and queries the vectors your application generates, and you can generate them in one language and query them in another. It calls no model itself.
Model gateway: Touches
Model gateway, touches. pgvector runs inside the database and routes no model traffic.
Build
Orchestration: Touches
Orchestration, touches. Frameworks reach pgvector through Postgres clients: the README lists pgvector-python, pgvector-node and pgvector-java among its libraries. The agent logic stays in the framework.
Tool use: Touches
Tool use, touches. Any language with a Postgres client can use pgvector, so an agent's retrieval tool queries it with SQL.
Data
Retrieval: Core
Retrieval, core. This is pgvector's primary role: it stores single-precision, half-precision, binary and sparse vectors in Postgres and searches them exactly by default, or with HNSW and IVFFlat indexes and iterative scans for filtered queries.
Evaluate
Evaluation: Touches
Evaluation, touches. Exact nearest neighbor search, the default, gives perfect recall to compare an approximate index against. Scoring answers stays with an evaluation product.
Operate
Observability: Touches
Observability, touches. pgvector runs in Postgres, so query plans and logs are Postgres's own. Application tracing stays with an observability tool.
Cloud deployment: Supports
Cloud deployment, supports. Neon, Supabase, Cloud SQL, Amazon RDS and Azure Database for PostgreSQL offer pgvector, each with its own release and enablement steps, and it also installs on Postgres 13 or later you run yourself.
Guardrails: Touches
Guardrails, touches. The pgvector project documents no security controls of its own, so check them with the Postgres host. It names security@pgvector.org for security issues.
Market mapThe layers pgvector covers, and who else owns each one.
Retrieval & grounding
Cloud deployment & capacity
Model APIs
Model gateways & routing
- LiteLLM
- OpenRouter
- Portkey
- Vercel AI Gateway
Orchestration & agent frameworks
4 more layers on the full map. Core, Supports and Touches describe coverage. They say nothing about quality.
