
n8n Vector Store: pgvector vs Qdrant vs Pinecone
Use pgvector unless you can name the reason you shouldn't. You already run Postgres for n8n, embeddings end up next to the rows they came from, and the decision stays cheap to reverse. The thing that should actually drive this choice isn't speed — it's filtering. All three n8n vector store nodes expose Metadata Filter in Get Many mode only. Hand the same node to an agent as a tool and the filter field is gone.
The Short Answer, By Situation
Nobody searching this wants a benchmark chart. They want permission to stop deliberating. So:
Already self-hosting n8n? pgvector. The Postgres is running, the backup job exists, and adding a vector column is a smaller change than adding a service. This is where I start every client build, including the one behind the Supabase lead database I wrote up earlier this year.
Filtering is most of the query?Qdrant. If every search is “similar to this, but only for account 42, in Spanish, from the last 90 days,” you want a database that was built around payload filtering rather than one that bolted it on.
Nobody on the team wants to run a database? Pinecone. You pay a real premium per query at scale, and in exchange you never think about an index again. For a small team shipping a client project on a deadline, that trade is often correct.
Prototyping today, deciding later?The Simple Vector Store, in memory, and don't pretend otherwise. It empties on restart. That's fine for the two hours you spend proving the retrieval idea works at all.
The n8n Detail No Benchmark Post Mentions
Every vector store node in n8n has the same set of operation modes: Get Many, Insert Documents, Retrieve Documents (As Vector Store for Chain/Tool), and Retrieve Documents (As Tool for AI Agent). Pinecone adds Update Documents.
Here's the part that changes architectures. In the PGVector node and the Qdrant node, Metadata Filter is listed as an option of Get Many. Not of the tool modes. Same for Pinecone. Switch the node to Retrieve Documents (As Tool for AI Agent) and your configuration surface is a name, a description, a collection, and a limit.
Which means: an agent using a native vector tool searches your entire collection on every call.It cannot scope itself to one tenant, one customer, one project. If you're building anything multi-tenant, that's not a nice-to-have missing, it's the whole security model missing.
| Capability | pgvector | Qdrant | Pinecone |
|---|---|---|---|
| Metadata Filter in Get Many | Yes | Yes | Yes |
| Metadata Filter in agent-tool mode | No | No | No |
| Isolation available in every mode | Collection option | Collection per tenant | Namespace |
| Reranker sub-node in tool modes | Yes | Yes | Yes |
| Update existing documents by ID | No | No | Yes |
| Extra infrastructure to run | None | One container | None |
Read that third row again, because it's the only row that should move your decision. Pinecone's Namespace option is available in all modes. That is a genuine functional advantage inside n8n specifically, and it has nothing to do with recall or p99 latency.
Three Ways To Get Filtered Retrieval Anyway
1. Isolate instead of filter.One namespace per tenant on Pinecone, one collection per tenant on Qdrant, one collection on pgvector. The agent's tool points at a name resolved from the execution context, so there is physically nothing else to retrieve. Cleanest option, and it fails safe. The cost is that cross-tenant queries become impossible and thousands of tenants become thousands of collections.
2. Wrap Get Many in a sub-workflow tool. Build a second workflow that takes a query plus filter values, runs the node in Get Many mode with Metadata Filter populated from those inputs, and returns chunks. Attach it as a Call n8n Sub-Workflow Tool. Now the model passes filter arguments per call — which is exactly what the native tool mode won't let it do. This is what I reach for most, and it's the same pattern I use for tools versus sub-workflows generally.
3. Retrieve before the agent runs.If the scope is known from the trigger — a support ticket for account 42 — don't make the agent decide. Run Get Many first, filtered, and inject the chunks into the system prompt. Fewer moving parts, one fewer model round trip, and no chance the agent forgets to search.
A cheap mistake to avoid:
Metadata is written by the Default Data Loader at insert time. You cannot filter on a field you didn't store, and adding one later means re-embedding the corpus. Decide your filter keys before the first ingestion run, not after the client asks why account 42 can see account 41's documents.
When pgvector Is Obviously Right
Self-hosted n8n already depends on Postgres. Turning on the vector extension gives you a vector store with no new container, no new credential, no new backup target, and no new thing to page you at 2am. That is worth more than most people weigh it at.
With an HNSW index, similarity queries over single-digit-million-row tables land in the tens of milliseconds. Put that in context: your agent's model call takes two to six seconds. Shaving 30 ms off a 4-second turn is not a project. I've never once traced a slow n8n agent back to Postgres — it's always the model, or a tool doing a synchronous HTTP call nobody instrumented, which is the argument for tracing agents properly before optimizing anything.
The real pgvector failure mode isn't speed, it's contention. Vector search is memory-hungry, and if it shares a box with your application queries and n8n's own execution tables, a heavy re-index will absolutely make your workflows feel slow. Same reasoning as picking a memory backend in Postgres vs Redis for agent memory: it's not which is faster, it's what else is on the machine.
When Qdrant Or Pinecone Earns The Move
Qdrant earns it when filtering dominates and you want the vector workload off your application database. It runs as one container, holds low-millisecond latencies at high recall, and its filtering is a first-class part of the query rather than a WHERE clause the planner has to reconcile with an approximate index. The n8n node also lets you pass a Collection Config JSON on insert, so you control how the collection is created instead of accepting a default.
Pineconeearns it two ways. The obvious one is that there's nothing to operate. The n8n-specific one is namespaces in every mode, plus an Update Documents mode the other two nodes don't have — if your corpus changes constantly and you need to correct a single chunk without a full re-ingest, that's a real capability difference, not a marketing one.
What Pinecone costs you is predictability at volume. Self-hosting means your ceiling is the box; serverless means your bill tracks your traffic. Neither is wrong. Just know which one you signed up for, and price it at the query volume you expect in a year — the same math I walk through in n8n Cloud vs self-hosted.
Your Store Isn't Why The Answers Are Wrong
Most “which vector database” questions are really “my RAG gives bad answers” questions wearing a costume. Swapping stores almost never fixes that, because all three run approximate nearest neighbour over the same embeddings you gave them. Garbage chunks in, confidently wrong citations out.
In order, the things that actually moved retrieval quality on my builds: chunk size and overlap in the text splitter, the retrieval limit (the default is usually too small — pull ten and rerank down to four), a reranker node, and the tool description, because the agent decides whether to search at all based on that sentence. A vague description means the model answers from memory and never calls your beautifully tuned store.
None of that is measurable by vibes. Keep a fixed set of twenty real questions with known-good answers, run them after every change, and count. That's the whole idea behind evaluating n8n agents instead of eyeballing them.
If you do one thing today:
Open your vector store node, switch it to Get Many, and run your five worst questions by hand with the limit raised to ten. Read the chunks that come back. You'll know within five minutes whether you have a database problem or a chunking problem — and it's a chunking problem.
Frequently Asked Questions
Which vector store should I use in n8n?
pgvector, unless you already know why not. A self-hosted n8n instance runs on Postgres anyway, so pgvector adds an extension rather than a service, and it keeps embeddings in the same database as the records they came from. It comfortably handles workloads in the low millions of chunks, which is far more than most agency and internal-tool RAG projects ever reach. Move to Qdrant when filtering is the dominant part of the query and you want a database designed around it, or when you want an open-source store you can tune independently of your app database. Move to Pinecone when you would rather pay per query than run anything, or when you need namespaces available in every operation mode.
Why can't I filter by metadata when the vector store is an agent tool in n8n?
Because the option is not there. In the PGVector, Qdrant and Pinecone vector store nodes, Metadata Filter is documented as an option of the Get Many operation mode only. When you switch the node to Retrieve Documents as Tool for AI Agent, you get a name, a description, the collection or table, and a limit — no filter field. The practical consequence is that a native vector tool searches the whole collection every time, so multi-tenant scoping has to come from isolation, a Pinecone namespace or a per-tenant collection, or from wrapping a Get Many node in a sub-workflow tool that accepts the filter values as parameters.
Is pgvector fast enough for production RAG?
For the sizes most n8n workflows deal with, yes. With an HNSW index, pgvector answers similarity queries on single-digit-million vector tables in the tens of milliseconds, and that is not the slow part of your agent — the model call is, by two orders of magnitude. A 40 ms retrieval sitting in front of a 4-second generation is not worth a migration. Where pgvector genuinely starts to hurt is heavy filtered search at high concurrency on the same box that serves your application queries, because they compete for the same shared buffers and the same CPU.
Do I need a separate workflow to load documents into the vector store?
You should have one, yes. Ingestion and retrieval have nothing in common operationally: ingestion is bursty, slow, expensive in embedding tokens and needs to be re-runnable, while retrieval is fast, cheap and constant. Keeping them in one workflow means every re-index risks the live path. Build a separate ingestion workflow that loads, splits, embeds and upserts, make it idempotent so a rerun replaces rather than duplicates chunks, and let the agent workflow only ever read.
Can I switch vector stores later without redoing everything?
The n8n side is easy and the data side is the work. All the vector store nodes take the same embeddings sub-node and the same document loader, so swapping the node itself is a ten-minute job. What does not move for free is the data: you re-embed and re-upsert everything, which costs embedding tokens and time proportional to your corpus, and any metadata filter syntax you hardcoded has to be rewritten for the new store. Keep the original documents and their metadata somewhere you can re-run ingestion from, and the switch stays a chore instead of a rebuild.
Need a RAG agent that retrieves the right rows for the right customer?
I build n8n RAG stacks that hold up when a second tenant shows up — scoped retrieval, idempotent ingestion, rerankers where they earn their keep, and an eval set so you can prove a change helped. If your agent answers well in the demo and confidently wrong in production, that gap is usually four decisions deep and I can find it.
Related Posts
n8n
n8n AI Agent Streaming Not Working (2026 Fixes)
Streaming in n8n is two switches, not one: the trigger has to be in streaming response mode and the AI Agent node has to still have its own streaming option on. Turn off either and n8n silently falls back to request/response and delivers the whole answer in one payload at the end. The six real causes — including the buffering reverse proxy that makes it work on localhost and fail on your domain — plus the chunk format and the order I check them in.
n8n
n8n Human-in-the-Loop AI Agent Approvals (2026)
n8n's human-in-the-loop step pauses an agent before a tool runs and waits for a person to click Approve or Deny. It works, and it breaks in five specific ways: the approval link is a bearer token so possession is authority, the gate belongs to the tool rather than the agent, an unanswered approval waits forever unless you set a limit, the pending execution is only as durable as your database, and a Deny is just a string the model is free to ignore. The five failure modes and the gate I run instead.
n8n
n8n Cloud vs Self-Hosted in 2026: The Real Math
n8n removed active-workflow limits from every plan in 2026, so the old reason to self-host is gone. What you buy now is a monthly execution allowance and a concurrency ceiling — and the jump from Pro to Business is 4x the executions for 13x the price. Measured numbers from my own instance: 179 workflows, ~5,600 executions a month, a median run under one second, and why AI agent workflows break the concurrency assumption entirely.