Why Supabase SQL Editor & 64 MB maintenance_work_mem Stall HNSW Builds
Two compounding caps kill CREATE INDEX ... USING hnsw: first, web dashboards and connection poolers (Supavisor port 6543) enforce short statement timeouts; second, once the growing HNSW graph exceeds maintenance_work_mem, pgvector spills random neighbor lookups to disk, slowing index construction by 15x to 40x.
Immediate CLI Fix: Direct Port 5432 Session With Elevated Build Memory
-- Run via direct psql connection (port 5432, NOT transaction pooler 6543)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET maintenance_work_mem = '4GB'; -- Set to 50-70% of free instance RAM
SET max_parallel_maintenance_workers = 4;
CREATE INDEX CONCURRENTLY idx_docs_hnsw_fp16
ON documents
USING hnsw ((embedding::halfvec(1536)) halfvec_cosine_ops)
WITH (m = 16, ef_construction = 64);
Zero-DDL GPU Indexing on Voxell Forge
Stop babysitting multi-hour CREATE INDEX CONCURRENTLY maintenance windows and upgrading OLTP RAM tiers just to build vector graphs. forge-cli up ./docs streams documents directly into GPU-indexed Spaces ($0 Free tier; $39/mo Builder annual) with zero database lock contention.