GitHub user tuhaihe created a discussion: [Proposal] Bundle `pgvector` as a 
built-in extension in Apache Cloudberry

### Proposers

Dianjin Wang (@tuhaihe)

### Proposal Status

Under Discussion

### Abstract

Bundle [pgvector](https://github.com/pgvector/pgvector) as a first-class, 
built-in extension in Apache Cloudberry, following the existing `gpcontrib/` 
pattern (the same way `orafce` and `pg_hint_plan` are 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](https://github.com/cloudberry-contrib/pgvector)).
 Bundling it gives us:                                                          
           
                                                                                
                                     
- A single build/package/release pipeline and a pinned version per Cloudberry 
release.                               
- Regression coverage in our own CI and installer.                              
                                     
- A native, documented Cloudberry experience rather than an external add-on.    
                                     
                                                                                
                                     
There is already strong precedent: `orafce`, `pg_hint_plan`, and more cases are 
all third-party extensions vendored under `gpcontrib/`.

### Implementation

1. Vendor into `gpcontrib/pgvector` following the existing pattern:             
                                 
   - Add `PGAC_ARG_BOOL(enable, pgvector, ...)` in `configure.ac` (mirroring 
`enable_orafce`).                       
   - Wire `pgvector` into `gpcontrib/Makefile` (`recurse_targets`, `install`, 
`installcheck`).                       
   - Add `--enable-pgvector` to the release `CONFIGFLAGS` in `gpAux/Makefile` 
and the devops configure script.                                       
2. Do the MPP integration work that makes this more than a copy:
   - Introduce the pgvector codebase                                            
    
   - Cherry-pick the commits that were made for Cloudberry in the 
`cloudberry-contrib/pgvector`
   - Add the tests for pgvector in the CI workflows

### Rollout/Adoption Plan

- vendor + build/package wiring, land as opt-in (`--enable-pgvector`), add CI.  
                            

### Are you willing to submit a PR?

- [ ] Yes I am willing to submit a PR!

GitHub link: https://github.com/apache/cloudberry/discussions/2043

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to