Retrieval and vector

pgvector

Vector search as a Postgres extension.

made by
pgvector

Magic Ship is one shop in Vancouver, BC, working remotely with clients worldwide. We are not a partner, reseller, or certified vendor of pgvector - we just build with this.

What pgvector is

pgvector adds vector column types to Postgres along with distance operators and HNSW and IVFFlat indexes. Similarity search happens in SQL, so it joins against ordinary tables and inherits the same transactions, backups, and permissions as the rest of the database.

How we use it

It is our default vector store. Chunks live in a table next to their source document and its metadata, so one statement filters by tenant, date, or document type and ranks by cosine distance, with no consistency gap between a document and its embedding. Hybrid retrieval pairs the vector index with Postgres full-text search and fuses the two rankings.

Where it is the wrong choice

At large scale it stops being free: HNSW index builds are slow and memory-hungry, and once recall under highly selective filters or hundreds of millions of vectors is the problem, a dedicated store like Qdrant earns its keep. It also has no built-in reranking or sharding story.

Building something on pgvector?

Send the problem rather than a job spec. You get an answer on scope, on fit, and on whetherpgvector is even the right call for it.

Start a project

pgvector and pgvector are trademarks of their respective owners, used here to say what we work with.