Skip to content
Database

pg_vectorsearch Makes Index Builds Worth a Fresh Look

pg_vectorsearch brings partitioned vector indexing to PostgreSQL; I'd test its build-time gains against missing filters and unfinished rebalancing before adopting it.

Topic
Database
Reading time
9 min
Length
1,994 words
Published
Nov 8, 2026
01:26 pm IST
In this article
  1. PRISM trades graph traversal for compressed partitions
  2. The build-time result deserves a careful comparison
  3. Can pg_vectorsearch replace pgvector today?
  4. Evaluating PRISM against an existing retrieval workload
  5. Check eligibility before building an index
  6. Create the demonstrated index in the test environment
  7. Compare retrieval quality before celebrating speed
  8. Measure maintenance with changing data
  9. Missing filters are an application boundary, not a tuning task
  10. Rebalancing is the maintenance gap I’d watch

pg_vectorsearch is Tiger Data’s new open source PostgreSQL extension for vector similarity search. Instead of graph-based indexing, its PRISM index uses partitioning and compression, with the aim of cutting memory requirements and index build times. It works with existing pgvector columns. There are some fairly hard boundaries, though: it is currently alpha, requires PostgreSQL 18 or later, and does not yet support filtered vector searches combining WHERE and ORDER BY. I’d put it in a controlled retrieval experiment. I wouldn’t treat it as a production replacement yet.

What catches my attention in the pg_vectorsearch release is how the index organizes vectors and then reads them back. I’d rather investigate a different resource profile than start from the assumption that every search problem needs a larger machine. That makes the architecture interesting to me. Still, the missing filtering and unfinished rebalancing would weigh more heavily in my adoption decision than the headline benchmark does.

PRISM trades graph traversal for compressed partitions

pgvector’s HNSW index uses a graph-based approximate nearest-neighbor algorithm. PRISM takes a different route: it groups similar vectors into partitions and stores them as compressed lists packed into PostgreSQL database pages. During a search, it narrows the work to relevant partitions, then scans the compressed vectors sequentially. It is scanning those lists rather than following connections from one neighboring vector to another.

Behind that arrangement are hierarchical clustering, compressed vector scanning, and RaBitQ quantization, combined to reduce expensive distance calculations. Vectors near partition boundaries are duplicated to improve recall. The storage machinery is not separate from PostgreSQL, either: PRISM relies on PostgreSQL’s native storage, logging, and concurrency mechanisms. That is part of the architecture, not something I’d leave out of the comparison.

I like that last point, but I want to keep two claims apart. Using PostgreSQL’s existing mechanisms is an architectural choice. Getting acceptable retrieval quality, predictable latency, and manageable maintenance for my application is a result I would still have to establish. I wouldn’t let my preference for the former stand in for testing the latter.

So I don’t read this proposal as simply “a faster graph.” The data is arranged differently, with the intention of reducing index size and avoiding costly random memory or disk access. That is the trade I’d investigate. Expecting HNSW’s behavior with a better build time would, I think, be the wrong starting point for the evaluation.

The build-time result deserves a careful comparison

Tiger Data’s own benchmark used 100 million vectors. PRISM built an index in 1 hour and 40 minutes on a machine with 128 GB of memory; HNSW took 42 hours on a machine with 512 GB of memory. Those are substantial reported differences. They are also vendor benchmark results, not independently validated measurements, and I’d keep that qualification attached to the numbers when discussing them.

There is more to inspect here than a timing figure on its own. The benchmark uses an open source tool, measures recall@10 against exact search results, and compares the indexes under the same PostgreSQL configuration and instance types. HNSW uses pgvector’s 16-bit halfvec representation. That methodology gives me something to examine, but it does not turn the result into a forecast for my dataset.

A build-time result is not a blanket claim about query performance. I would keep index construction, query latency, and retrieval quality as separate acceptance criteria throughout the evaluation, even if the build result is the reason I started looking. A faster build would be valuable to me. It would not compensate for retrieved passages that no longer answer the questions my application receives.

The memory figures need the same restraint. I wouldn’t translate them straight into a hosting-cost promise without working through the resources needed during index construction, the search workload, and whatever rebuilding the changing data requires. Those all belong in my cost decision. The benchmark earns PRISM a test; it doesn’t do that calculation for me.

Can pg_vectorsearch replace pgvector today?

I wouldn’t describe this as a complete pgvector replacement. The extension supports existing pgvector columns, and the demonstrated change is to install pg_vectorsearch and create a PRISM index on a vector column. That compatibility is useful. It is not evidence that every query I already run, or every operational assumption I already depend on, will carry over unchanged.

The entry conditions are specific: PostgreSQL 18 or later, vectors with up to 1968 dimensions, and no filtered vector searches combining WHERE and ORDER BY until general availability. I’d check all of those before starting an evaluation. None is a loose end I’d be comfortable postponing until after a benchmark has gone well and made the index look attractive.

Take a newsroom search feature. I’d check editorial visibility requirements before touching the index, because the proposed retrieval query may need to constrain which documents are eligible. An unfiltered similarity-search demonstration would not tell me that such a feature is ready. This is the point where a promising database experiment can part company with the application I actually need to ship.

Tiger Data also plans to move pgvectorscale into maintenance mode. That would send me back to the dependency roadmap, not straight into a replacement project. It is not evidence that pg_vectorsearch already covers every pgvectorscale workload. Before replacing anything, I’d want a concrete assessment of compatibility and migration rather than letting the roadmap decision answer those questions for me.

Evaluating PRISM against an existing retrieval workload

I’d give this a separate evaluation environment and a representative copy of the retrieval dataset. The question is whether the index fits the application I have, not whether I can make a demonstration work. I can investigate that without putting an alpha extension into a client-facing request path, and that is where I’d keep the experiment for now.

Check eligibility before building an index

Before building anything, I’d write down the PostgreSQL version, embedding dimensions, and actual search-query shapes. If the environment is below PostgreSQL 18, or the vectors exceed the supported dimensions, I’d stop this particular evaluation there. I wouldn’t quietly turn an index comparison into a database or embedding migration just to keep the experiment moving.

I’d look at the embedding choice alongside the index choice, while keeping them separate decisions. My embedding model shortlist belongs to that other design decision. Changing models merely to make a new index eligible would need its own evaluation of the retrieval consequences. For this comparison to tell me anything useful about the index, I’d keep both the dataset and the embeddings fixed.

Create the demonstrated index in the test environment

With the extension installed on a compatible PostgreSQL environment, the demonstrated SQL enables it and creates a PRISM index on the existing vector column. This is the example I’d work from in that test environment:

CREATE EXTENSION pg_vectorsearch;
CREATE INDEX ON documents USING prism (embedding vec32_l2_ops);

I’d use those statements only where the existing table and column match the example. They are not a complete installation guide, much less a production migration plan. Before changing the application’s behavior, I’d establish how to retain or restore its existing search path. Getting the new index created is not, by itself, enough of a plan for replacing that path.

Compare retrieval quality before celebrating speed

I’d prepare a fixed set of representative questions and compare the results against exact search, using recall@10 as the benchmark does. Then I’d inspect whether the returned documents are actually useful for the application. Both checks matter to me. I’d write the acceptance criteria before running the comparison, so an impressive build time cannot quietly take over as the only definition of success.

For my AI-assisted editorial work, that question set would include closely related stories that need to be distinguished, not just broad topical matches. I’d want to see whether the retrieved material supports the intended answer. Looking semantically nearby is not enough. That is the evaluation discipline I’d bring with me from production AI engineering, rather than treating the index comparison as a separate exercise in speed.

Measure maintenance with changing data

Once I had the initial comparison, I’d repeat it with a workload that changes the dataset. I’d record build time, memory use, query behavior, and retrieval quality, then check whether maintenance changes the result. I would also rehearse rebuilding the index in the evaluation environment. I’d want that rehearsal behind me before estimating the operational effort, not left as work to discover later.

In my decision record, a mostly stable corpus and a frequently changing one would stay separate. A successful static-data experiment would not be my approval for a constantly updated application. The release’s rebalancing limitation is exactly why I’d draw that line. Testing the changing corpus belongs in the evaluation itself; it is not an optional follow-up after I have already decided.

Missing filters are an application boundary, not a tuning task

Filtered vector searches combining WHERE and ORDER BY are not supported until general availability. I wouldn’t try to fill that gap with optimistic assumptions about the application. If eligibility conditions are part of the retrieval requirement, I’d keep the existing production approach for now. The requirement has to survive the index choice, rather than being set aside to make the experiment look successful.

Document permissions are the obvious example I’d reject as an afterthought. An attractive unfiltered search benchmark would not persuade me to accept that design. Retrieval would still have to respect the application’s visibility rules, just as it did before I started evaluating the index. I would not lower that requirement to make room for an experimental implementation, however appealing its build time looked.

This is also why I keep retrieval infrastructure separate from agent memory architecture in my thinking. Ownership, retention, and retrieval eligibility would still need explicit design. Those responsibilities remain in my application design after an index change. I wouldn’t expect a different way of organizing vectors to make those decisions for me, or to remove the need to make them.

With no filtering requirement and a corpus that changes infrequently, I’d be more willing to spend time on the alpha. That is a different evaluation from one where filtering is essential. In the latter case, I’d wait for support, then test the actual query shapes. Reaching a release milestone alone would not be enough for me to infer that those queries are ready.

Rebalancing is the maintenance gap I’d watch

Incremental rebalancing is not yet fully implemented, and the details matter here. Centroids do not automatically move as new vectors arrive. Posting lists gradually lose their original physical locality. Flat indexes have limited on-demand splitting of oversized posting lists, but general merging and reassignment are not implemented. I’d keep that whole set of limitations in view, rather than treating splitting as the end of the maintenance question.

With frequent data changes, maintaining search efficiency may therefore require rebuilding the index. My worry is not just whether the rebuild can finish quickly, although I’d measure that too. I’d want to know when a rebuild becomes necessary, how I would recognize that point, and what resources I would reserve for it. Those are the maintenance questions I’d need the evaluation to answer.

I’d ask for workload-specific evidence before using the initial build benchmark to predict long-running behavior. A corpus that performs well immediately after indexing has passed the beginning of my evaluation, not the whole thing. I’d still need acceptable behavior after the changes the application is expected to make. Otherwise, I would have tested the freshly built index without settling whether I could keep using it.

I think PRISM deserves a serious test where index construction and memory requirements are blocking a PostgreSQL vector-search design. Its architecture is enough to earn that attention; application fit would still have to earn deployment. I’d leave production migration off the table while required filters are unsupported or maintenance behavior remains unproven for the workload. My next step would be the changing-data test and a rebuild rehearsal in the evaluation environment, with those limits still in place.

Sources

Open Source pg_vectorsearch Brings More Scalable Vector Search to PostgreSQL

This is the source this article is based on. Many articles on this blog are drafted with AI and checked against their source automatically; the editorial policy explains how, and how to report a mistake.

Frequently asked

Does pg_vectorsearch require a separate vector database?

No. It performs vector similarity search inside PostgreSQL and supports existing pgvector columns. You must install the extension and create a PRISM index to use its indexing capabilities.

Which PostgreSQL versions and vector dimensions are supported?

The current alpha requires PostgreSQL 18 or later and supports vectors with up to 1968 dimensions.

Should I migrate from pgvectorscale now?

I would not migrate solely because Tiger Data plans to move pgvectorscale into maintenance mode. I’d first verify query compatibility, filtering requirements, and maintenance behavior. pg_vectorsearch is still alpha, and filtered searches combining WHERE and ORDER BY are not supported until general availability.

Deepak Kumar

Written by

Deepak Kumar

Sr Software Engineer at India Today Group | Aaj Tak · MERN Stack · Generative AI

I build RAG systems in production, on MongoDB Atlas Vector Search over a working editorial archive. I write here about what those systems actually do once real traffic hits them. Hiring an LLM engineer in India? Here is how I work.

Weekly newsletter

Liked this? Get the next one by email

One short email a week with new articles on React, Node.js, TypeScript and AI engineering. No spam. Unsubscribe in one click.

By subscribing you agree to the privacy policy · About the newsletter.

Further reading

Related tutorials from ByteMuni, my developer publication.

Message me