Pinecone Alternative: Migrate to pgvector in an Afternoon
Pinecone's $50/month minimum killed hobby RAG. This Pinecone alternative walks you through migrating to pgvector with vec2pg, schema, code, and cost math.
A vector database is a database that stores embeddings, the lists of numbers a machine learning model produces to represent the meaning of text, images, or audio, and finds the stored items closest to a query vector using approximate nearest-neighbor indexes. Powabase keeps vectors in pgvector inside each project's own Postgres, with retrieval built in.
Last reviewed: September 24, 2026
First, an embedding model turns each piece of content, such as a paragraph, product description, or image, into a vector with hundreds or thousands of dimensions. Content with similar meaning lands close together in that space, so "cancel my subscription" sits near "how do I stop billing" even though they share no words. The database stores each vector next to an ID and metadata. At query time you embed the question with the same model and ask for the k nearest vectors by a distance metric, usually cosine distance, inner product, or Euclidean (L2) distance. Comparing the query against every row is exact but slow at scale, so vector databases build approximate nearest-neighbor (ANN) indexes. The two most common are HNSW, a layered graph that is fast and accurate but memory-hungry, and IVF, which clusters vectors and searches only the nearest clusters. Both trade a little recall for a large speedup. Filtering by metadata, such as tenant, date, or document type, is the other half of the job, and it is where many implementations differ.
The main use today is retrieval-augmented generation (RAG): find the passages most relevant to a question and hand them to a language model so it answers from your data instead of its training set. The same nearest-neighbor query also powers semantic search over docs or tickets, recommendations ("items like this one"), deduplication and near-duplicate detection, image and multimodal search, clustering and classification, and long-term memory for agents, where past conversations and facts are embedded and recalled when relevant. In most of these, vector similarity alone isn't enough. Exact terms such as product codes, names, and error messages are better matched by keyword search, which is why production retrieval usually combines both (hybrid search) and then reorders the top results with a reranking model.
There are two broad categories. Dedicated vector databases are built around vector search. Pinecone is a managed service with serverless indexes, sparse and dense vectors for hybrid search, and optional integrated embedding (see Powabase vs Pinecone). Weaviate (BSD-3-Clause), Qdrant (Apache-2.0, written in Rust), and Milvus (Apache-2.0, an LF AI & Data project) are open source and available both self-hosted and as managed clouds. The second category adds vector search to a database you already run. pgvector is the open-source Postgres extension: a vector column type, HNSW and IVFFlat indexes, and cosine, inner product, L2, and other distances, with Postgres transactions, joins, and point-in-time recovery. Other general-purpose databases, including Firestore, MongoDB Atlas, and Elasticsearch, now offer vector search too. A third option is to not run a vector store directly at all and use a platform that manages retrieval end to end on top of one of these.
A dedicated vector database is built for one job and it scales that job well. Its engine, sharding, and memory handling are tuned for very large collections and high query rates, and managed options take indexing and capacity planning off your plate. The cost is a second system. Your app data lives in one database and its embeddings in another, so every insert, update, delete, and permission change has to reach both, and the two can drift apart. pgvector keeps embeddings in the same Postgres as the rows they describe. One transaction writes both. A single query can join vectors to users, filter by tenant with Row Level Security, and combine the similarity score with SQL conditions. Backups, access control, and monitoring are the ones you already have. pgvector does have limits. Indexed vector columns top out at 2,000 dimensions (4,000 with halfvec), HNSW indexes want memory, and approximate indexes apply filters after the scan, which pgvector 0.8.0 improved with iterative index scans. For most apps, up to many millions of vectors, pgvector is enough and simpler to run.
Usually not. The vector store is one part of a RAG system, and rarely the hard one. Retrieval quality depends more on how documents are extracted (tables, scans, and layout), how they are chunked, whether you combine vector and keyword search, and whether you rerank the candidates. A separate vector database answers none of those questions and adds a sync problem on top: when a document is edited, deleted, or reshared, the change has to reach the vector store before the next query. Keeping embeddings in Postgres next to documents and permissions avoids that class of bug. Reach for a dedicated vector database when your collection is in the hundreds of millions or billions of vectors, when query volume would overwhelm your primary database, or when you need features only a specialized engine has. Otherwise, start with pgvector, measure recall and latency on your own data, and move only if the numbers tell you to. If you'd rather not run retrieval as its own service, use a backend as a service built for AI apps that keeps it on the same Postgres.
How Powabase does it
Powabase makes the vector database part of the backend instead of another service. Every project runs its own Postgres instance with pgvector installed, and knowledge bases index into it. Upload a file and Powabase extracts, chunks, embeds, and indexes it, then serves retrieval over the same REST API as the rest of your app. When you need your own schema, create a vector column on any table and query it with SQL or PostgREST.
FAQ
Pinecone's $50/month minimum killed hobby RAG. This Pinecone alternative walks you through migrating to pgvector with vec2pg, schema, code, and cost math.
Store agent memory in Postgres without a separate vector store. Learn how one database handles everything your AI agent needs to remember.
Master multi-tenant RAG tenant isolation with proven strategies to keep data secure, prevent leakage, and scale confidently across all your customers.