Explainer

pgvector Tutorial: Vector Search in Postgres

pgvector is a free, open-source Postgres extension that adds a vector column type and similarity search operators, letting you run embeddings queries in a database you probably already run. It's not in our fact sheet as a priced product since it has no cost beyond your existing Postgres instance.

ToolEntry planPaid fromNotesVerified
PineconeFree — Starter$20/mo (Builder)Flat rate. Up to 10 GB storage, 5M write units/mo, 2M read units/mo, 10 indexes per project2026-08-28
QdrantFree — Free Tier (Cloud)Free forever. 0.5 vCPU, 1 GB RAM, 4 GB disk, single node cluster. Includes free cloud inference with selected models2026-08-28

Pricing verified: 2026-08-28 — fromPineconeQdrant

The short definition

pgvector is an open-source extension for Postgres that adds a vector data type and similarity search operators, so you can store embeddings and run nearest-neighbor queries directly inside a database you're probably already running. Instead of standing up a separate vector database service, you add the extension to Postgres and get vector search as one more capability of your existing database.

Because it's a free, open-source extension rather than a hosted product, pgvector doesn't have its own pricing page or fact sheet the way a managed service like Pinecone or Qdrant does — its cost is whatever you're already paying to run Postgres, plus whatever additional resources vector indexes and queries consume on that instance.

How it actually works

Once installed, pgvector adds a vector column type you can use in any table, storing an embedding alongside your regular relational data — a product row can carry its embedding right next to its price and description, in the same table, queried with the same SQL you already write. Similarity search happens through operators pgvector provides for distance calculations, and you can index those columns to keep queries fast as your table grows.

The practical appeal is that you're not managing a second system: your embeddings live in the same database as everything else, transactional consistency works the way it always has in Postgres, and you don't need to keep two data stores in sync. That's a real simplification compared with running a separate vector database alongside your primary Postgres instance, at least until your vector workload outgrows what a single Postgres instance handles comfortably.

Where pgvector doesn't compete directly with dedicated vector databases is in the specialized operational tooling those products build specifically around vector workloads. Pinecone, for instance, separates billing into storage, read units, and write units, and is fully managed so there's no cluster to size, patch, or back up — the free Starter plan alone includes 2 GB of storage, 2M write units, and 1M read units a month across up to 5 indexes, which is a real amount of dedicated infrastructure you're not managing yourself. Qdrant, similarly open source at its core, still offers a managed cloud tier with backup, disaster recovery, and uptime SLAs on its paid Standard and Premium plans, which is more operational tooling than a self-managed Postgres instance running pgvector gives you by default.

When you need it — and when you do not

You need pgvector, specifically, when you already run Postgres, your vector search workload is moderate rather than extreme, and you'd rather avoid adding a second data store to your infrastructure. It's a strong default for a RAG application or semantic search feature bolted onto an existing product that's already Postgres-backed, since the operational simplicity of one database instead of two is a real win in the early stages of a project.

You don't need pgvector, or need to move past it, when your read or write volume genuinely outgrows what a single Postgres instance can serve well, or when you need the specific operational guarantees a dedicated vector database provides — things like Qdrant's 99.5% uptime SLA on its Standard cloud tier, or Pinecone's fully managed scaling with no cluster sizing on your end. At that point, the cost and complexity of running a dedicated vector database becomes worth it, because you're trading a manageable subscription for infrastructure work you'd otherwise be doing yourself inside Postgres.

Cost is also part of this decision, and it cuts both ways. pgvector itself is free, but scaling Postgres to handle a large, read-heavy vector workload has its own infrastructure cost that isn't captured on any vector-database pricing page. Pinecone's Standard tier, by contrast, is metered with a $50/mo minimum and reads costing $16 to $18 per million units once you're past the free tier — a real, documented cost, but one that comes with a fully managed service handling the scaling problem for you.

A useful way to think about the decision is total cost of ownership rather than sticker price alone. pgvector's zero license cost is real, but someone on your team still has to tune indexes, monitor query performance, and handle scaling as your embedding count grows — that's engineering time, even if it doesn't show up as a line item on an invoice. A managed vector database converts that ongoing engineering effort into a subscription, which is worth it once the time spent managing Postgres for vector workloads exceeds what the subscription would cost.

The tools that do this

pgvector is the do-it-yourself option: free, open source, and part of Postgres rather than a separate priced product. For a direct comparison of when pgvector versus a dedicated database like Pinecone makes more sense, see our Pinecone vs pgvector guide, which goes deeper on that specific tradeoff.

If you decide a dedicated vector database is worth it, Pinecone and Qdrant are the two options with verified pricing here. Pinecone's tiered model (free Starter, flat $20/mo Builder, metered Standard from a $50/mo minimum) suits a team that wants predictable, fully managed infrastructure without sizing a cluster themselves. Qdrant keeps pgvector's open-source spirit alive as an option: its self-hosted edition is free, and its cloud free tier is free forever rather than time-limited, though usage-based Standard and Premium cloud pricing isn't published and requires its calculator or a sales conversation. Our Pinecone vs Weaviate and Qdrant vs Weaviate comparisons, plus our best vector database for production RAG guide, cover how these options stack up against each other once you've decided pgvector alone isn't enough.

Frequently asked questions

Is pgvector free?

Yes — pgvector is an open-source Postgres extension with no license cost of its own. Your only cost is whatever you already pay for Postgres hosting, since pgvector doesn't have a separate pricing page or fact sheet the way managed vector databases like Pinecone or Qdrant do.

When should I switch from pgvector to a dedicated vector database?

Switch when read volume, index size, or query latency requirements outgrow what a single Postgres instance handles well. Pinecone's free Starter tier (2 GB storage, 1M read units/mo) or Qdrant's free-forever cloud tier (1 GB RAM, single node) are reasonable next steps to prototype against before committing to a migration.

Does pgvector support the same features as Pinecone or Qdrant?

pgvector adds vector similarity search to Postgres but doesn't include the operational tooling a managed service provides, like Pinecone's fully managed scaling or Qdrant's dedicated backup and disaster recovery on its Standard cloud tier. For basic nearest-neighbor search at moderate scale, pgvector covers the core use case.

Can I use pgvector for a production RAG application?

Yes, for many workloads. pgvector is production-viable as long as your Postgres instance is sized for the read and write load, though at high query volume a purpose-built vector database like Pinecone or Qdrant, both of which publish specific usage-based pricing, is often easier to scale without managing Postgres tuning yourself.