Skip to content
Tool Review · Vector Databases & AI Search

pgvector

pgvector is an open source PostgreSQL extension that adds vector data types, distance operators and HNSW and IVFFlat indexes, so embeddings can be stored and searched with SQL next to relational data.

Free Research-based review
Last verified November 2026. Version checked: 0.8.7 (1 October 2026). Features and pricing for commercial products change; check the vendor site for the latest details.
Vendor
pgvector open source project (Andrew Kane and contributors)
Price
Free
Platforms
Linux, macOS, Windows, Docker, Managed PostgreSQL services
Licence
PostgreSQL License (permissive, BSD-style)
Product type
PostgreSQL extension (open source, PostgreSQL License)
Works with
PostgreSQL 13 and laterAmazon RDS and Aurora PostgreSQLGoogle Cloud SQL and AlloyDBAzure Database for PostgreSQLSupabaseNeon

At a glance

Product typePostgreSQL extension, not a standalone database
Vector index typesHNSW and IVFFlat; exact search without an index
Hybrid searchNot built in; combine with PostgreSQL full-text search in SQL (documented in the README)
Metadata filteringSQL WHERE clauses; partial indexes, partitioning and iterative scans for filtered queries
Embedding integrationNone built in: embeddings are generated by your application or another tool
Scaling and multitenancySingle PostgreSQL instance plus read replicas; README points to Citus for sharding and to partitioning or separate tables for tenants
Deployment (managed or self-hosted)Self-hosted PostgreSQL or most managed PostgreSQL services
Licensing and pricing modelPostgreSQL License, free; cost is the PostgreSQL server
Short answer

pgvector is the obvious first option for teams that already run PostgreSQL and want similarity search without another database. It is free, widely offered by managed PostgreSQL services, and supports exact and approximate search; check the version your provider ships and plan for filtered queries, where approximate indexes can return fewer rows than requested.

How we know: This profile is research-based: types, index limits, operators, versions and licence were checked on 7 November 2026 against the pgvector README, CHANGELOG and LICENSE on GitHub, the Amazon RDS for PostgreSQL extension list and the Microsoft Learn pgvector guide. We have not run pgvector for this profile, so no recall or latency figures are given.

Overview

pgvector is an extension for PostgreSQL 13 and later that adds a vector column type and operators for nearest-neighbour search. The extension is installed with CREATE EXTENSION vector (the extension name is vector, not pgvector). It supports single-precision, half-precision, binary and sparse vectors, exact search by default, and approximate search through HNSW or IVFFlat indexes. Version 0.8.7 was released on 1 October 2026.

Because it is an extension, not a separate database, vectors live in ordinary tables and inherit PostgreSQL transactions, joins, backups, replication and access control. Most managed PostgreSQL services include it, though versions differ by provider: see managed PostgreSQL compared for the versions each service lists.

Key features

  • Vector types: vector and halfvec (up to 16,000 dimensions), bit (binary) and sparsevec (up to 16,000 non-zero elements)
  • Distance operators for L2 (<->), negative inner product (<#>), cosine (<=>), L1 (<+>), and Hamming and Jaccard for bit vectors
  • HNSW indexes: up to 2,000 dimensions for vector, 4,000 for halfvec, 64,000 for bit and 1,000 non-zero elements for sparsevec
  • IVFFlat indexes with the same vector, halfvec and bit limits (no sparsevec)
  • Iterative index scans (since 0.8.0) so filtered approximate queries can keep scanning until enough rows match
  • Exact nearest-neighbour search by default, with full SQL filtering, joins and transactions
  • Client support listed for more than 30 languages, including Python, JavaScript, Java, Go, Rust, Ruby, C# and PHP

Integrations and ecosystem

Amazon RDS and Aurora PostgreSQLGoogle Cloud SQL and AlloyDBAzure Database for PostgreSQLSupabaseNeonDocker images for PostgreSQL 13 to 18Client libraries for Python, Node.js, Java, Go, Ruby and more

Pros and cons

Pros

  • No extra database to run: vectors sit beside relational data with full SQL and ACID transactions
  • Permissive PostgreSQL License and no cost for the extension
  • Available on the major managed PostgreSQL services
  • Several vector types, including half-precision and binary for smaller indexes

Cons

  • Index dimension limits (2,000 for vector, 4,000 for halfvec) below the 16,000 the type allows
  • With approximate indexes, filtering is applied after the index scan, so queries can return fewer rows unless iterative scans are used
  • Managed services often lag the latest release (Amazon RDS listed 0.8.2 while 0.8.7 was current)
  • Scale-out depends on PostgreSQL itself or extensions such as Citus

Pricing

pgvector itself is free and open source. You pay only for the PostgreSQL server it runs on: your own hardware, or a managed PostgreSQL service such as Amazon RDS, Cloud SQL, Azure Database for PostgreSQL, Supabase or Neon, priced by that provider.

Pricing checked on the vendor's official page on 7 November 2026. Prices change; confirm before buying.

Who it is best for

Teams already on PostgreSQL that want semantic search or RAG retrieval over millions of rows without adding a separate vector database.

Typical use cases

  • Retrieval for RAG chatbots over documents stored in PostgreSQL
  • Semantic product or content search alongside relational filters such as price or category
  • Recommendations based on similar items or users
  • Duplicate and near-duplicate detection on text or image embeddings

Who should look elsewhere

  • Workloads that need built-in embedding generation, managed sharding across many nodes or vector-specific tooling out of the box; consider a dedicated vector database such as Pinecone or Qdrant.

Verdict

Our take

pgvector is a practical default for vector search when PostgreSQL is already the system of record, and its licence and managed-service availability make it low-risk to adopt. Larger or heavily filtered workloads need care with index choice and iterative scans, and very large deployments may justify a dedicated vector database.

Frequently asked questions

Is pgvector free?

Yes. pgvector is open source under the PostgreSQL License. You pay only for the PostgreSQL server or managed service that runs it.

Should I use HNSW or IVFFlat in pgvector?

pgvector supports both. HNSW builds a graph index and does not need training data; IVFFlat divides vectors into lists and should be created after the table has data. Both have the same 2,000-dimension limit for the vector type, and only HNSW indexes sparsevec.

Which managed services support pgvector?

Amazon RDS and Aurora PostgreSQL, Google Cloud SQL and AlloyDB, Azure Database for PostgreSQL, Supabase and Neon all document it. Versions differ: on 7 November 2026 the Amazon RDS extension list showed 0.8.2. On Azure you first add vector to the azure.extensions allow-list.

Is pgvector a replacement for Pinecone?

It can be for many applications that already use PostgreSQL. Pinecone is a managed vector database service with its own scaling and pricing model, while pgvector runs inside your PostgreSQL server and scales with it.

Sources

Checked November 2026.

Listed in: Vector Databases & AI Search.

How we research reviews and what star ratings mean: our editorial method.

Compare your options

Browse the full tools directory or see the head to head comparisons.