pgvector, vector search inside Postgres, for production teams.
pgvector is a PostgreSQL extension, so JusDB looks after the database and the vector workload on it: index choice, recall testing, upgrades, replication, and incidents. Our engineers work on Amazon RDS, Aurora, Google Cloud SQL, AlloyDB, Azure, Kubernetes, and your own servers. 24x7 on-call is available under your service agreement.
Or request a free audit of one database instance. Already in an incident? See how incidents are handled.
- NDA before access
- Read-only by default
- Changes measured against your baseline
pgvector version status
Pick the version you run
pgvector 0.8.7
Newest releaseReleased on 1 October 2026, it fixes a buffer overflow in IVFFlat index builds in 0.8.6 and earlier.
Amazon RDS, Aurora, and Azure list 0.8.2, and Cloud SQL 0.8.5, so the fix reaches you when your provider ships it.
Schedule extension updatespgvector 0.8.0 to 0.8.6
Upgrade advised0.8.0 added iterative index scans in October 2024. 0.8.2 fixed a parallel HNSW build overflow, and 0.8.3 a possible HNSW index corruption during vacuum.
Upgrading means running ALTER EXTENSION vector UPDATE in each database once your platform offers the new version.
Plan the extension upgradepgvector 0.7 and older
Missing fixes0.7.0 added halfvec, sparsevec, and bit indexing in April 2024, but not iterative index scans.
Without them, a filtered query can fall short of its LIMIT, and 0.6.0 to 0.7.4 also carry the parallel HNSW build overflow fixed in 0.8.2.
Keep 0.7 running while you upgradePostgreSQL 13 and 14
Support endingPostgreSQL 13 reached end of life on 13 November 2025, and 14 reaches it on 12 November 2026.
pgvector 0.9.0, still unreleased, drops support for both, so we plan the PostgreSQL upgrade first.
Plan the PostgreSQL upgradeVersion status from the pgvector changelog, the PostgreSQL versioning policy, and the extension lists for Amazon RDS, Aurora, Cloud SQL, and Azure, checked 28 October 2026.
- Platforms
- Amazon RDS, Aurora, Google Cloud SQL, AlloyDB, Azure Flexible Server, your own servers, and Kubernetes
- High availability
- Streaming replication, point-in-time recovery, and Patroni or your provider's failover
- Incidents
- Initial-response targets are set in your service agreement. See the targets
Symptoms
Eight pgvector problems we are asked to fix
Each one has a cause we can measure. The scoping call starts from your symptom and the pgvector and PostgreSQL versions you run.
Search results changed after an index was added because HNSW and IVFFlat are approximate indexes that trade some recall for speed, and nobody checked them against exact search.
A query asks for 100 neighbors and gets 40 because, without iterative scans, an HNSW index returns at most hnsw.ef_search rows, 40 by default.
Similarity queries read the whole table because the ORDER BY sorts on an expression such as 1 minus the cosine distance, and the index serves only a bare distance operator, ascending, with a LIMIT.
An HNSW build runs for hours after the graph outgrows maintenance_work_mem, and a pgvector notice says building will take significantly more time.
IVFFlat recall is poor from the first day because the index was built before the table held enough rows for its number of lists.
One tenant's data degrades another tenant's results because tenants share one approximate index, so each tenant's vectors affect the others' recall and speed.
Vacuum on embedding tables runs for hours because every re-embedded row leaves a dead row version, and vacuuming HNSW indexes can take a while without a reindex first.
pgvector stays on an old version after an engine upgrade because engine upgrades do not update most extensions, and nobody ran ALTER EXTENSION vector UPDATE.
If one of these is costing your team time, a scoping call is the place to start.
Book a 30-min scoping call (opens Google Calendar in a new tab)Filtering
How an untested filter loses pgvector results
An HNSW index picks the nearest candidates first, 40 by default (hnsw.ef_search), and PostgreSQL applies your WHERE clause afterwards. When the filter matches 10% of rows, a query for 10 rows returns about 4 on average, with no error.
One filtered query, three outcomes
Choose a state to see which rows come back.
What the application sees
The application asks for the 10 nearest chunks and gets 10.
HNSW index
Returns the 40 nearest candidates (hnsw.ef_search)
40 candidates
WHERE clause
No filter on this query
All pass
Result
ORDER BY distance, LIMIT 10
10 rows
Every candidate qualifies, so the query fills its LIMIT. Recall still depends on the build settings and hnsw.ef_search.
What the application sees
The prompt gets 4 chunks instead of 10, and nothing logs an error.
HNSW index
Picks the same 40 candidates before the filter runs
40 candidates
WHERE tenant_id
Matches 10% of rows
About 4 pass
Result
ORDER BY distance, LIMIT 10
4 rows
The index does not know about the filter, so most of its 40 candidates belong to other tenants and are dropped.
What the application sees
The application gets 10 rows whenever enough matches turn up before a scan limit.
HNSW index
Iterative scan, in pgvector 0.8.0 and later, reads further candidates
Scans further
WHERE tenant_id
Checks each further candidate as it arrives
Matches add up
Result
Stops at 10 rows or at a scan limit
10 rows
With hnsw.iterative_scan set to strict_order, the scan stops at 10 matching rows, about 20,000 visited tuples (hnsw.max_scan_tuples), or its memory limit (work_mem by default). A filter that matches very few rows can still return fewer than 10.
We design around your filters before we tune the index. A filter that matches few rows gets a B-tree index for exact search, and a few fixed values get partial HNSW indexes. A tenant that needs isolation gets its own list partition, so other tenants' vectors cannot affect its recall.
We measure recall by rerunning sample queries as exact searches (enable_indexscan off) and comparing the rows. We alert when a vector query's rows per call in pg_stat_statements fall below its LIMIT, and test hnsw.ef_search and the iterative scan limits on a copy before changing production.
What we cover
Full-spectrum pgvector engineering
Every change starts from evidence: recall measured against exact search, EXPLAIN (ANALYZE, BUFFERS), and pg_stat_statements.
Index optimization
We choose HNSW or IVFFlat from recall, speed, and memory tests on your own vectors.
- HNSW m and ef_construction, or IVFFlat lists, set from measured recall
- Builds sized to maintenance_work_mem, with parallel workers
- Indexes created concurrently, so writes are not blocked
Query performance
We read the plans of your slowest similarity queries before changing anything.
- EXPLAIN (ANALYZE, BUFFERS) on real queries
- Iterative scans tested with your real filters
- Distance operator matched to the embedding model
Hybrid search
Vector and full-text results from one database, under the same tenant filters and permissions.
- Full-text search on a stored tsvector column with a GIN index
- Results merged with Reciprocal Rank Fusion
- Relevance checked against queries your team has judged
Embedding management
We tag each vector with its model, so vectors from two models are not compared by mistake.
- One index per model and dimension count
- halfvec indexes for models up to 4,000 dimensions
- Binary quantization with re-ranking for large tables
High availability setup
pgvector writes to the write-ahead log (WAL), so vector tables and indexes replicate and restore with the rest of PostgreSQL.
- Streaming replicas for read scale-out and failover
- Patroni, or your provider's failover, drilled
- Point-in-time restores tested on a copy
Migration and upgrades
Moves to pgvector and version upgrades, each with a tested way back (a rollback plan).
- From Pinecone, Weaviate, or Milvus, with recall compared on your data
- COPY bulk loads, with indexes built after the load
- pgvector updates planned around security fixes
Incident support
A critical (P1) page, answered within your agreement's target
JusDB keeps your recovery procedures (runbooks) written down, so an incident starts from a known plan instead of a blank page.
Initial-response targets
2 to 4 hours
Business hours
During covered business hours
15 minutes
24x7 on-call
P1 incidents
Production database down, primary unreachable, data corruption risk, or active failover event.
Severe latency spike, replication lag climbing rapidly, connection exhaustion, or degraded HA node.
Non-critical slow query regression, staging issue, backup warning, or replication check alert.
Configuration question, index advisory, planned schema review, or general operational request.
Our engineering team is in India; business-hours coverage is Mon–Fri 09:00–18:00 IST (UTC+5:30), and 24x7 on-call is available under your service agreement.
Initial-response targets, not resolution guarantees. The target for your engagement is set in your service agreement.
What happens on a P1 page
Page
You page the on-call engineer
Through the escalation path your service agreement names.
Triage
Root cause from EXPLAIN and pg_stat_statements
Unexpected sequential scans, filtered queries short of rows, slow builds, and memory pressure, traced to the query or setting behind them.
Mitigate
Stabilize first, from the runbook
Raise hnsw.ef_search or turn on iterative scans for the affected query, rebuild an index concurrently, or shed load, then fix the cause.
After
A review after every P1
What happened, why, and the change that stops it happening again.
Before and between incidents
- Your setup, written down firstDuring onboarding we record your PostgreSQL and pgvector versions, vector columns, indexes, distance operators, and recall baseline, so an incident starts with context.
- One escalation path, in writingYour service agreement names how to reach the on-call engineer, in which hours, and who approves a rebuild or failover.
- Reviews between incidentsWe review recall, slow similarity queries, index size against memory, vacuum, and replication, and report open risks with next steps.
- Version dates trackedWe track pgvector releases and security fixes, your provider's versions, and PostgreSQL end-of-life dates, and plan upgrades before support ends.
Process
How a pgvector engagement runs, step by step
Written findings come before any change. Your team approves production changes, except routine actions you have pre-approved.
Scoping call
Your vector workload, PostgreSQL and pgvector versions, platforms, and what you need covered.
Read-only review under NDA
Our engineers use named accounts with only the permissions the review needs, such as pg_monitor, then read your configuration, index definitions, pg_stat_statements, and query plans. We sample recall on a replica or a copy.
A written report before any change
Each finding comes with the change we propose, how we will measure it, and a way to undo it (a rollback plan).
Changes, then handover
We rehearse index rebuilds and upgrades on a copy, apply them in the windows you approve, measure recall and latency against the baseline, and hand over updated operating instructions (runbooks).
Step one is a 30-minute scoping call.
Book a 30-min scoping call (opens Google Calendar in a new tab)Ways to work
Choose the pgvector service your team needs
Start with the responsibility you need covered. Each engagement has its own scope, deliverables, access requirements, and acceptance criteria.
Projects
Scoped pgvector projects
A defined piece of work with written findings, hands-on changes, and validation against your baseline.
- PostgreSQL consultingArchitecture decisions, such as where pgvector fits beside your other data, scoped as one project.
- Performance tuningSlow similarity queries, index settings, and memory, measured before and after.
- Migration and upgradesMoves to pgvector, and pgvector and PostgreSQL upgrades, with a rollback plan.
- Cloud migrationMoves between your servers and managed PostgreSQL, with pgvector versions checked first.
- High availabilityReplication, failover drills, and tested point-in-time restores for the PostgreSQL under your vectors.
- Security auditRoles, extension versions, encryption, and audit settings, with a written report.
Ongoing
Ongoing coverage and support
JusDB monitors the databases, carries out the agreed maintenance, and responds to incidents during the coverage the proposal names. The team keeps a change record, recovery procedures, and a review after every P1.
Where your pgvector runs, and the tools around it
Your team and ours
What managed PostgreSQL with pgvector still leaves to your team
Managed cloud databases automate much of the infrastructure layer, but your team still owns query performance, capacity, cost, and incident decisions.
| Question | Managed cloud service | Your own servers or Kubernetes |
|---|---|---|
| Which pgvector version you run | Only the versions the provider ships, which can trail the newest pgvector release. | Any release you build or install, 0.8.7 included. |
| Indexes, queries, and recall | Yours. The provider runs the platform, not your indexes or queries. | Yours. |
| Backups and restores | Automated backups and point-in-time restore include vector tables and indexes. Testing a restore is still your team's job. | Your team runs pgBackRest or Barman and keeps the WAL archive a point-in-time restore needs. |
| Failover | The provider runs it. Your application and pooler still have to reconnect. | You run it: Patroni with etcd or Consul, and HAProxy in front. |
| Moving off later | A logical dump or logical replication to another PostgreSQL with pgvector. The target builds the vector indexes again, which takes time. | Physical backups and streaming replication copy the indexes as they are, within one PostgreSQL major version. |
Your team keeps control
- Set business priorities, application requirements, and release plans
- Approve production changes, except routine actions you have pre-approved
- Own your cloud accounts, access policies, and vendor relationships
- Decide when maintenance can happen and how quickly service must recover
- Move the work in-house or to another provider after your agreement's notice period, with your data returned or deleted and the transition help your agreement sets out (Terms, section 8)
JusDB handles the agreed database work
- Monitor database health, investigate alerts, and involve the right people
- Review query performance, replication, capacity, and backup health
- Carry out approved changes and update the operating instructions they affect
- Report completed work, open risks, and recommended next steps
Weighing a managed service against running PostgreSQL and pgvector yourself? We compare both against your workload on a scoping call.
Book a 30-min scoping call (opens Google Calendar in a new tab)Further reading
pgvector and PostgreSQL guides, and a configuration tool
A guide to pgvector in production, one on costly queries, and a server settings tool.
Guide
PostgreSQL as a vector database
Exact search as the baseline, HNSW or IVFFlat from measured tradeoffs, iterative scans, halfvec, and hybrid search.
Guide
pg_stat_statements for query analysis
Setting it up, and finding the statements that cost your database the most time.
Tool
PostgreSQL configuration optimizer
Enter memory, cores, workload, and storage for an explained postgresql.conf, in your browser.
FAQ
Common pgvector questions
What buyers ask about pgvector, from its limits to managed services.
Still have a question?
Ask it on a scoping call. No production access needed.
Book a 30-min scoping call (opens Google Calendar in a new tab)Why choose pgvector over Pinecone, Weaviate, or Milvus?
JusDB recommends pgvector when your application data already lives in PostgreSQL, because embeddings then share its transactions, joins, row-level security, backups, and replication. A separate vector database can fit better when vector search must scale or fail over on its own. We test recall, latency, and cost on your data before you choose.
How many vectors can pgvector handle?
JusDB sizes pgvector by memory and latency targets, not by a vector count. PostgreSQL limits each table or partition to 32 TB by default. Queries usually run faster when the index fits in memory, so we shrink it with halfvec or binary quantization. Beyond one server, we add replicas or Citus sharding.
What embedding dimensions does pgvector support?
JusDB works within pgvector's documented limits. The vector type stores up to 16,000 dimensions, but HNSW and IVFFlat index it only up to 2,000. Indexes reach 4,000 dimensions with halfvec, 64,000 with binary quantization to bit, and 1,000 non-zero elements with sparsevec on HNSW. OpenAI's text-embedding-3-large returns 3,072 dimensions by default, so we index it as halfvec or shorten it with OpenAI's dimensions parameter.
Can pgvector handle real-time embedding updates?
Yes. JusDB runs pgvector with ordinary inserts, updates, and deletes, and an HNSW index takes new rows as they arrive, with no training step. A higher ef_construction slows inserts, and each update leaves a dead row version, which vacuum can take a while to clear on HNSW indexes. IVFFlat fixes its lists at build time, so we rebuild it concurrently when your data shifts enough to lower recall.
Do you support pgvector on managed PostgreSQL services?
Yes. JusDB works with pgvector on Amazon RDS, Aurora, Google Cloud SQL, AlloyDB, and Azure Database for PostgreSQL flexible server. Each provider decides which pgvector versions you can install. On 28 October 2026 the newest listed were 0.8.2 on RDS, Aurora, and Azure, 0.8.5 on Cloud SQL, and a Google build of 0.8.5 on AlloyDB. The newest pgvector release was 0.8.7. Supabase also offers the extension, and a software upgrade in its project settings brings newer versions.
Next step
Talk to a pgvector engineer about your databases
Tell us what is slow, fragile, or due to change. The first 30-minute call covers your databases, current ownership, and required coverage. No production access is needed. Or request a free audit of one database instance, subject to availability: mutual NDA before read-only access, a prioritized report within one week after access is ready, and no obligation.
NDA before access, read-only by default, and written scope first
Compare with other databases
If you are weighing alternatives, these are the databases most often compared with this one.
PostgreSQL
pgvector is a PostgreSQL extension, so its speed and recovery depend on the PostgreSQL underneath: memory, vacuum, replication, and upgrades.
OpenSearch
The OpenSearch k-NN plugin offers vector search beside full-text search, compared with pgvector when search is the main workload.
Elasticsearch
Dense vector fields with k-nearest-neighbor search, compared with pgvector when you need text and vector relevance in one query.
MongoDB
MongoDB Atlas Vector Search keeps embeddings beside documents, compared with pgvector when application data is already document-shaped.