Repository navigation
Replies: 3 comments
|
I think this is essential. Since MCP capabilities currently rely on pgvector, baking this functionality into the database would enable out-of-the-box usage for users, delivering much better convenience. |
|
The unmodified version of pgvector 0.8.6 runs on Apache Cloudberry extension for PostgreSQL 19. |
|
Thanks @tuhaihe for raising this. I fully agree that vector search should be a first-class, out-of-the-box capability in Cloudberry, and the MCP use case mentioned above makes it more pressing. I'd like to propose a different direction, though: instead of vendoring pgvector as-is, re-implement vector similarity search natively for Cloudberry based on the decoupled design from PostgreSQL-V (Purdue DB Group, CIDR 2026: paper, code). We would keep pgvector's SQL interface so existing applications keep working unchanged. Why not just pgvectorpgvector builds HNSW/IVFFlat on PostgreSQL's page-oriented storage. Every graph hop goes through the buffer manager, index pages compete with table pages for In Cloudberry these costs are paid on every primary, and all of that index WAL is also shipped to the mirrors. If we bundle pgvector now, we will also have to support its on-disk format for a long time. The core ideaDecouple the vector index from the page-based engine and split it into two parts:
The index still plugs in through Why it fits Cloudberry well
Why re-implement instead of vendoring PostgreSQL-VThe
Proposed path
I'm glad to write a detailed design doc and start on a prototype. Feedback is very welcome, especially on the mirror replication strategy and on whether pgvector and the native AM should coexist during the transition. |
Uh oh!
There was an error while loading. Please reload this page.
Proposers
Dianjin Wang (@tuhaihe)
Proposal Status
Under Discussion
Abstract
Bundle pgvector as a first-class, built-in extension in Apache Cloudberry, following the existing
gpcontrib/pattern (the same wayorafceandpg_hint_planare vendored). Beyond just vendoring, the proposal includes the MPP integration work required to make vector search correct and well-documented.Motivation
Vector search has become a table-stakes capability in the AI era, and PostgreSQL users expect pgvector to just work.
Today Cloudberry users must install it separately from a maintained fork (cloudberry-contrib/pgvector). Bundling it gives us:
There is already strong precedent:
orafce,pg_hint_plan, and more cases are all third-party extensions vendored undergpcontrib/.Implementation
gpcontrib/pgvectorfollowing the existing pattern:PGAC_ARG_BOOL(enable, pgvector, ...)inconfigure.ac(mirroringenable_orafce).pgvectorintogpcontrib/Makefile(recurse_targets,install,installcheck).--enable-pgvectorto the releaseCONFIGFLAGSingpAux/Makefileand the devops configure script.cloudberry-contrib/pgvectorRollout/Adoption Plan
--enable-pgvector), add CI.Are you willing to submit a PR?
All reactions