What is pgvector in Supabase?
Quick Answer: pgvector is an open-source Postgres extension that adds a `vector` column type and similarity search operators (cosine, L2, inner product) for high-dimensional embeddings. Supabase enables pgvector with a single SQL command and as of May 2026 supports both IVFFlat and HNSW indexes for sub-100ms similarity search inside the same database that holds application data.
What pgvector Is
pgvector is an open-source Postgres extension, originally written by Andrew Kane and first released in 2021, that adds vector similarity search capabilities to Postgres. It introduces a vector(N) column type holding N-dimensional floating-point vectors, plus operators for cosine distance, L2 (Euclidean) distance, and inner product.
How Supabase Exposes It
Supabase enables the extension with a single SQL command:
create extension if not exists vector;
Once enabled, application tables can declare embedding columns:
create table documents (
id bigserial primary key,
content text,
embedding vector(1536)
);
Index Types
As of May 2026, pgvector supports two index types:
- IVFFlat: inverted file with flat compression. Fast to build, good recall on small-to-medium datasets
- HNSW (Hierarchical Navigable Small World): slower to build, faster to query, default on new Supabase projects since 2025
For corpora under roughly 1M rows, IVFFlat is usually sufficient. Above that scale, HNSW typically delivers 3-10x lower query latency at the cost of higher index build time and memory usage.
Common Use Cases
Typical Supabase + pgvector applications include:
- Semantic search across documentation or knowledge bases
- Retrieval-augmented generation (RAG) for chat applications
- Recommendation systems based on item embeddings
- Duplicate detection across user-generated content
Why Use pgvector vs a Dedicated Vector DB
Keeping vectors in the same Postgres instance as application data simplifies operations. Backups, restores, and row-level security all use the same database. JOINs across embeddings and structured data (filtering by user_id, tenant_id, or product_category before similarity search) are first-class.
The trade-off appears at very large scale: at billions of vectors with sub-50ms latency requirements, dedicated vector databases like Pinecone, Weaviate, or Qdrant typically outperform pgvector. For the majority of production AI applications below that scale, pgvector is the simpler and cheaper choice.
Related Questions
- What are the best workflow automation tools for technical writers in 2026?
- What are the best AI-native automation tools in 2026?
- What are the best automation tools for finance and AP teams in 2026?
- What are the best automation tools for solo founders in 2026?
- What are the best automation tools for nonprofits in 2026?
Related Tools
Activepieces
No-code workflow automation with self-hosting and AI-powered features
Workflow AutomationAutomatisch
Open-source Zapier alternative
Workflow AutomationBardeen
AI-powered browser automation via Chrome extension
Workflow AutomationCalendly
Scheduling automation platform for booking meetings without email back-and-forth, with CRM integrations and routing forms for lead qualification.
Workflow AutomationRelated Rankings
Best Durable Workflow Engines for Production in 2026
A ranked list of the best durable workflow engines for production deployments in 2026. Durable workflow engines persist execution state to a database so that long-running workflows survive process restarts, deployments, and infrastructure failures. The ranking covers Temporal, Prefect, Apache Airflow, Camunda, Windmill, and n8n. Tools were evaluated on production reliability, developer experience, scalability, open-source health, and documentation quality. The shortlist intentionally mixes code-first engines (Temporal, Prefect, Airflow) with hybrid visual platforms (Camunda, Windmill, n8n) to reflect how production teams actually choose workflow engines in 2026.
Best No-Code Automation Platforms in 2026
A ranked list of no-code automation platforms in 2026. The ranking covers visual workflow builders that allow non-engineering teams to connect SaaS apps, route data, and add conditional logic without writing code. Entries cover proprietary cloud platforms (Zapier, Make, Pipedream, IFTTT) and open-source visual builders (n8n, Activepieces). Scoring reflects integration breadth, pricing accessibility, visual editor ease, reliability and error handling, and self-hosting availability.
Dive Deeper
Migrating 23 Make Scenarios to Self-Hosted n8n: a 3-Week Breakdown
Anonymized retrospective of a DTC ecommerce brand migrating 23 Make scenarios to a self-hosted n8n instance over three weeks. Tooling cost dropped from $348/month on Make Teams to roughly $12/month on a Hetzner VPS, but credential and webhook recreation consumed about 40% of total project time.
Trigger.dev vs Inngest 2026: OSS Durable Runners Compared
Trigger.dev (2022, London) is a fully Apache 2.0 durable runner with task-based authoring, machine-size selection, and first-class self-host. Inngest (2021, San Francisco) is a developer-first event-driven step platform with an open-source dev server and a managed cloud (50K step runs/month free, $20/month Hobby). This 2026 comparison covers license, programming model, pricing, observability, and self-host options.
Inngest vs Temporal 2026: Durable Functions vs Durable Workflows
Inngest (2021, San Francisco) is a developer-first durable functions platform with TypeScript and Python SDKs, 50,000 step runs/month free, and Hobby pricing from $20/month. Temporal (2019) is the heavyweight durable workflow engine with seven-language SDK coverage, Cassandra-backed scale, and Cloud pricing from roughly $200/month at low volume or $2.5-4.5K/month self-host. This 2026 comparison covers programming model, pricing, scale ceiling, and operational footprint.