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
Related Tools
Supabase
Open-source Firebase alternative with PostgreSQL, auth, Edge Functions, and vector embeddings
ETL & Data PipelinesActivepieces
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 AutomationRelated Rankings
Best Automation Platforms for AI Orchestration 2026
This ranking answers one question: how many real business applications can an AI agent act on out of the box? It evaluates nine platforms as of August 2026 on the reach they give an agent, not on the workflow logic they can express. That boundary is deliberate, because two neighbouring pages on this site answer different questions. Best Process Orchestration Platforms 2026 scores multi-step process control, error handling and state management. Best AI Agent Platforms 2026 scores building and hosting the agent itself. This page scores the layer between them: the connective tissue that lets an agent already built elsewhere reach the applications a business actually runs on. A platform that leads one of those pages can place low here, and two of them do. Scores derive from application and action catalogue counts, the exposure model each platform uses to publish those catalogues to an agent, setup effort, failure handling and cost per agent action. Every figure was retrieved from a vendor-owned surface on 11 August 2026 unless an earlier date is stated against it.
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.
Dive Deeper
Client Portals vs Workflow Orchestration Platforms: What Changes When External Parties Act Inside a Process
What changes when a client or supplier has to act inside your process, not just watch it? This guide compares four client portals with four orchestration platforms on how outsiders get in, whether you pay for them and what the audit log records, from vendor sources read 14 and 15 September 2026.
Moxo vs Zapier in 2026: Human Approval Steps, External Participants and Pricing
Moxo and Zapier both put a person in front of an automated decision, from opposite ends: Moxo builds the process out of human steps and attaches AI, while Zapier pauses an automation for a reviewer through its Human in the Loop app. This guide compares approvers, rejection, AI approval, audit logs, governance and pricing, verified 14 and 15 September 2026.
Keystroke vs n8n in 2026: Agent-Built TypeScript vs the Visual Canvas
Keystroke, launched in July 2026 by Y Combinator W24 company Sprint Labs, is a code-first automation platform where AI coding agents write workflows as TypeScript in the user's repository. n8n, founded in 2019, is the most widely deployed source-available visual workflow platform, with 200,000+ users and a $2.5 billion valuation. This comparison covers the agent-authored versus canvas building models, durable execution, licensing (Elastic License 2.0 vs the Sustainable Use License), verified July 2026 pricing including Keystroke's usage metering, and the maturity gap between a days-old platform and an established ecosystem.