Weaviate vs pgvector is mostly a question of whether you want a second database. Pick pgvector if your app already runs on Postgres and your vectors belong next to rows you already have: one backup, one set of permissions, SQL joins, and nothing new to operate. Pick Weaviate if search is the product, you need many isolated tenants, or you want filtered vector search and hybrid keyword search to work well with no tuning. Both are open source and free to self host; the cost difference is the extra server you run (or pay Weaviate Cloud to run) versus the Postgres you already pay for.

We checked both projects against their official docs and release pages on October 31, 2026. The current releases are pgvector 0.8.7 (October 1, 2026) and Weaviate 1.40.3 (October 28, 2026). We also ran a small side by side test, described below.

Weaviate vs pgvector at a glance

ItempgvectorWeaviate
What it isExtension inside PostgreSQLStandalone vector database server (Go)
LicensePostgreSQL LicenseBSD 3 Clause core, enterprise code in a separate directory
Data modelA vector column on an ordinary tableCollections of objects with properties and named vectors
Filtered vector searchFilter runs after the index scan; iterative scans since 0.8.0Filter builds an allow list first; ACORN strategy by default
Keyword plus vectorCombine with Postgres full text search yourselfBuilt in hybrid search with one alpha weight
TenantsPartitions or separate tablesOne shard per tenant, with active, inactive and offloaded states
EmbeddingsYour app computes themYour app, or vectorizer modules inside Weaviate
Managed optionAny Postgres host that ships the extensionWeaviate Cloud: free tier, Flex from $45 a month

Architecture: an extension or a second database

pgvector adds a vector type, distance operators and two approximate index types (HNSW and IVFFlat) to Postgres. Your embedding is just another column. A document row, its owner, its permissions and its embedding commit in the same transaction, and they disappear together when the row is deleted. You query with SQL, so joining vector results to users, orders or tickets costs nothing extra.

Weaviate is a separate server with its own storage, schema and API. Your data lives in collections; each object has properties and one or more named vectors. That means a second system to deploy, back up, secure and keep in sync with your main database. In return you get search features built for this job: a filtered search path designed around vectors, hybrid search, tenant shards and optional vectorizer modules, so your app can send plain text and let Weaviate call the embedding model.

For most teams the sync question decides it. If the source of truth is Postgres and you copy it into Weaviate, you now own a pipeline that has to handle updates and deletes. If your data is created for search in the first place (a document index, a memory store for agents), there is nothing to sync and the second database costs less than it seems.

Filtered vector search: where they differ most

Almost every real query has a filter: this user's memories, this workspace's documents, this product category. The two engines handle that in opposite orders.

The pgvector README is direct about it: with approximate indexes, filtering is applied after the index is scanned. With HNSW and the default hnsw.ef_search of 40, a condition that matches 10% of rows returns about 4 rows on average. Weaviate's filtering docs describe the reverse: an inverted index builds an allow list of matching objects first, and the HNSW search only collects results from that list. Since v1.34 the default filter strategy is ACORN, and 1.40 added an optional PathSeer strategy. Weaviate also switches to a flat search when a filter is very restrictive.

We tested this on the box with 20,000 random 8 dimension vectors and a user_id that matched only 20 of them, asking each engine for the 10 nearest matches:

EngineQueryRows returned
pgvector 0.6.2, HNSW indexWHERE user_id = 'rare' ORDER BY embedding <=> ... LIMIT 100
pgvector 0.6.2, no index (exact scan)same query10
Weaviate 1.40.3, HNSW, default strategynear_vector with a user_id filter, limit 1010

The pgvector index found 40 nearest neighbors, none of which belonged to that user, and the filter removed all of them. No error, just an empty result. That is the failure mode to plan for in agent memory, where one user's rows are a tiny fraction of the table.

pgvector has fixes. Since 0.8.0, SET hnsw.iterative_scan = strict_order (or relaxed_order) makes the index keep scanning until it finds enough matching rows or hits hnsw.max_scan_tuples. A plain B tree index on the filter column gives exact results when the filter is selective, a partial HNSW index works for a few fixed values, and partitioning works for many. Our test used the 0.6.2 build that ships inside the pgserver package, which predates iterative scans, so we could not run that fix ourselves; check SELECT extversion FROM pg_extension WHERE extname = 'vector' on your own host before you rely on it. The point stands either way: with pgvector, filtered search works well once you choose the right index and settings, while Weaviate gives the right answer by default.

Multi tenancy and per user isolation

For a SaaS app or a multiuser agent, tenant isolation matters for privacy and for recall. The pgvector README warns that sharing one approximate index between tenants means one tenant's vectors can affect recall and speed for the others, and recommends list partitioning or separate tables. Postgres row level security can then guard access, which is a real advantage if your access rules already live in the database.

Weaviate builds tenancy into the collection. Each tenant gets its own shard and its own vector index, and deleting a tenant deletes its data. Per the Weaviate data docs, a node can hold 50,000 or more active shards, and tenants can be set inactive or offloaded to S3 when idle. In our test a query on a tenant enabled collection without a tenant name was refused with an error rather than searching everyone's data, which is the safe default you want for agent memory.

Hybrid search: keywords plus vectors

Agents often search for exact strings: an error code, a function name, a ticket number. Pure vector search is weak at that, so both tools offer hybrid search, with different amounts of assembly.

In Weaviate it is one call. hybrid() runs BM25 and vector search together and merges them, by default with relative score fusion (since v1.24), and alpha sets the weight: 0 is keyword only, 1 is vector only. In our test with alpha=0.5, the object that won on keywords and the one that won on vectors each scored 0.5, which shows how the scores are normalized before mixing.

In Postgres you build it from parts. The pgvector README points to Postgres full text search for the keyword side and to reciprocal rank fusion or a cross encoder to merge the two lists. We wrote the fusion as one SQL statement with two ranked subqueries; it is about ten lines and worked as expected, putting the row that matched both the keyword and the vector first. You own the ranking logic.

Scale and operations

pgvector scales the way Postgres does. The README suggests halfvec and binary quantization to shrink the working set, scaling up the instance, read replicas, and sharding through Citus or PgDog. HNSW indexes on the vector type cover up to 2,000 dimensions; halfvec indexes go to 4,000 and binary vectors to 64,000. The next release, 0.9.0, is listed in the changelog as unreleased and drops Postgres 13 and 14.

Weaviate scales by adding nodes, with replication and tenant placement handled by the server, plus compression and an HFresh index on its cloud. The tradeoff is a second system to learn and monitor.

We found no official head to head benchmark between the two and did not run one, so we make no speed claim.

Cost

Both are free to self host. pgvector adds nothing to your bill beyond the Postgres you already run, though large HNSW indexes want memory. Weaviate self hosted costs the servers you put it on. The Weaviate Cloud pricing page lists an always free cluster with 100,000 objects, 1 GB memory, 10 GB disk and one collection with up to 3 tenants, a Flex plan with a $45 monthly minimum, and Premium from $400 a month. For a managed Postgres, check whether your host ships pgvector and which version, since that decides whether you get iterative scans.

Which should you choose?

  • You already run Postgres: pgvector. Turn on iterative scans or add a filter index, and keep one database.
  • Per user agent memory with many users: Weaviate tenants, or pgvector with partitions and row level security if your users already live in Postgres.
  • Search is the product and you need hybrid ranking: Weaviate.
  • You want the database to call the embedding model: Weaviate vectorizer modules. With pgvector your app does it.
  • Neither feels right: compare Qdrant and the rest in our best open source vector database roundup, or read what Weaviate is in more depth.

LangChain has vector store integrations for both, and the retrieval step in our LangGraph RAG pipeline guide works with either. If your agent's memory needs more than search, our Mem0 vs Letta vs Zep comparison covers memory layers that sit on top of these stores.

FAQ

Is pgvector faster than Weaviate?

We found no official head to head benchmark and did not run one. What we did measure is correctness under a narrow filter: pgvector 0.6.2's HNSW index returned no rows, while Weaviate returned the full result. Newer pgvector releases add iterative scans for this case.

Can pgvector replace a vector database?

For many apps, yes. If your data is already in Postgres and you need similarity search with filters and joins, pgvector avoids a second system. A dedicated database earns its place when you need many isolated tenants, built in hybrid search, vectorizer modules or scale beyond one Postgres instance.

Is Weaviate free?

The core is open source and free to self host. Weaviate Cloud has an always free cluster limited to 100,000 objects and one collection, and paid plans start at a $45 monthly minimum on Flex.

Not as one function. You combine a pgvector similarity query with Postgres full text search and merge the two ranked lists, usually with reciprocal rank fusion. The pgvector README links example code for both fusion and cross encoder ranking.

Which is better for AI agent memory?

For a single app on Postgres, pgvector with per user filtering done right is simple and cheap. For many users who each need private, fast recall, Weaviate's tenant shards and filter first search remove a class of bugs. Either way, test a query for a user with very few memories before you ship.