pgvector
Open-source PostgreSQL extension for vector similarity search, next to your relational data.
Quick answer
pgvector is an open-source PostgreSQL extension for vector similarity search, next to your relational data, listed under Data labeling & vector databases. A typical small-business use: vector store for a RAG chatbot in a team that already runs PostgreSQL. The project publishes no official RAM figure, so we do not estimate a monthly server cost. License: PostgreSQL License, which allows internal business use.
Last updated · facts verified against official docs on · sources
Activity data comes from GitHub and was last refreshed Oct 24, 2026.
What is pgvector?
pgvector adds vector, halfvec, bit and sparsevec column types to PostgreSQL, with exact and approximate nearest-neighbour search (HNSW and IVFFlat indexes) using L2, inner product, cosine, L1, Hamming and Jaccard distance. Embeddings live in ordinary tables, so you keep joins, transactions, backups and access control from Postgres. It supports Postgres 13 and newer, is available as an official Docker image built on the Postgres image, and comes preinstalled with many hosted Postgres providers.
Where it fits in a 10–200 person business
- Vector store for a RAG chatbot in a team that already runs PostgreSQL
- Semantic search over products, tickets or documents with SQL filters and joins
- Keep embeddings next to business data instead of running a separate vector database
These use cases are our editorial suggestions, not claims made by the project.
Can a business use pgvector? (license)
| License | PostgreSQL License |
|---|---|
| Type | Permissive: MIT / Apache-2.0: use, modify and sell with few obligations. |
| Internal business use | Allowed under the license text |
| What to watch | Permissive. Internal and commercial use allowed; keep the copyright notice and license text. |
This is a plain-English summary of the license text, not legal advice. Third-party models you run with it have their own licenses.
Data & compliance: does pgvector phone home?
| Telemetry (usage data sent to the vendor) | Not documented |
|---|---|
| Other calls home by default (updates, marketplaces, default cloud services) | Not documented |
| Single sign-on (OIDC / SAML / LDAP) | Not documented |
| Audit log | Not documented |
| Role-based access control (RBAC) | Not documented |
| Data residency / GDPR notes from the project | Not documented |
Checked against the project's own docs and repository on . "Not documented" means we could not find the answer in official sources; it does not mean the feature is missing or that no data is sent. Third-party services you connect (model APIs, vector databases, search engines) have their own data policies. Compare all apps.
What hardware does pgvector need?
The project does not publish a minimum CPU/RAM figure, so we leave the official value blank rather than guess.
No server requirements are published; pgvector runs inside your PostgreSQL server. The README says HNSW indexes build much faster when the graph fits into maintenance_work_mem, and suggests a tool like PgTune for initial settings (for instance shared_buffers typically 25% of the server's memory).
How much does it cost to host pgvector per month?
The project publishes no RAM figure we could verify, so we do not estimate a cost.
How to deploy pgvector
Method: Docker
docker pull pgvector/pgvector:pg18-trixie
# run it like the official postgres image (replace 18 with your Postgres version), then in each database:
# CREATE EXTENSION vector; From the official instructions: github.com/pgvector/pgvector#docker. Always check the source for the current version before you run it.
Known gotchas when self-hosting pgvector
- With approximate indexes, filtering is applied after the index is scanned, so a filtered query can return fewer rows than LIMIT (with HNSW and the default ef_search of 40, a filter matching 10% of rows returns about 4). Enable iterative index scans (0.8.0+) or use partial indexes or partitioning. source
- HNSW and IVFFlat indexes support the vector type only up to 2,000 dimensions (halfvec up to 4,000). For larger embeddings, index a halfvec cast, binary quantization or subvectors. source
- Upgrading the package or image is not enough; run ALTER EXTENSION vector UPDATE; in each database you want to upgrade. source
- Do not set maintenance_work_mem so high that it exhausts the server's memory while building an index. source
Alternatives in Data labeling & vector databases
- Milvus Scalable open-source vector database for semantic search and RAG at large data volumes.
- Qdrant Fast vector database for semantic search and RAG back-ends.
- Chroma Open-source embedding database for vector, full-text and metadata search in RAG apps.
- Label Studio Data labeling tool for text, images, audio and video, used to build and evaluate AI models.
pgvector FAQ
How much RAM does pgvector need?
pgvector does not publish an official RAM figure, so we do not state one. No server requirements are published; pgvector runs inside your PostgreSQL server. The README says HNSW indexes build much faster when the graph fits into maintenance_work_mem, and suggests a tool like PgTune for initial settings (for instance shared_buffers typically 25% of the server's memory).
How much does it cost to self-host pgvector?
The software is free to download. The project publishes no official RAM figure, so we do not estimate a monthly server cost.
Is pgvector free for commercial use?
pgvector is licensed under PostgreSQL License (Permissive). Internal business use is allowed under the license text. Permissive. Internal and commercial use allowed; keep the copyright notice and license text. This is a summary, not legal advice.
What are common problems when self-hosting pgvector?
With approximate indexes, filtering is applied after the index is scanned, so a filtered query can return fewer rows than LIMIT (with HNSW and the default ef_search of 40, a filter matching 10% of rows returns about 4). Enable iterative index scans (0.8.0+) or use partial indexes or partitioning. HNSW and IVFFlat indexes support the vector type only up to 2,000 dimensions (halfvec up to 4,000). For larger embeddings, index a halfvec cast, binary quantization or subvectors. Upgrading the package or image is not enough; run ALTER EXTENSION vector UPDATE; in each database you want to upgrade. Do not set maintenance_work_mem so high that it exhausts the server's memory while building an index.
Is pgvector still maintained?
Yes, it is actively developed. Last commit: Oct 24, 2026. Checked Oct 24, 2026.
How do I install pgvector?
The official method is Docker. The exact commands are in the "How to deploy" section above and in the official instructions: https://github.com/pgvector/pgvector#docker
What are self-hosted alternatives to pgvector?
Other apps in Data labeling & vector databases: Milvus, Qdrant, Chroma, Label Studio.
Sources
- GitHub repository: github.com/pgvector/pgvector
- Official documentation: github.com/pgvector/pgvector#readme
- License text: github.com/pgvector/pgvector/blob/master/LICENSE
- Hardware requirements: github.com/pgvector/pgvector#performance
- Deploy instructions: github.com/pgvector/pgvector#docker
- Gotcha 1: github.com/pgvector/pgvector#filtering
- Gotcha 2: github.com/pgvector/pgvector#hnsw
- Gotcha 3: github.com/pgvector/pgvector#upgrading
- Gotcha 4: github.com/pgvector/pgvector#index-build-time
- Hetzner Cloud pricing (cost estimate): www.hetzner.com/cloud/regular-performance
- GitHub stars, commits and releases: GitHub REST API, fetched
Facts on this page were checked against the project's own repository and docs on 2026-10-24. Spotted something out of date? Tell us.