pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: zthhhhh (@zthhhhh) <noreply+zthhhhh@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #1003: Support RabitQ in pgvector
Date: Mon, 26 Oct 2026 08:28:17 +0000
Message-ID: <gh-pgvector-pgvector-1003-c6411571899@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-1003@github.com>
References: <gh-pgvector-pgvector-1003@github.com>

Hi @gouyt13 and @ankane,

Thanks for your attention! `RaBitQ-Library` was an important reference when I developed my initial RaBitQ implementation for pgvector, and it helped me better understand the algorithms described in the papers.

Reusing the library’s standalone numerical components sounds promising. C/C++ interoperability itself should be manageable through an `extern "C"` wrapper, but a few integration details need careful consideration.

PostgreSQL uses MemoryContext for memory management, and its error handling relies on `longjmp`. We would need to catch C++ exceptions within the wrapper and avoid PostgreSQL errors jumping across C++ stack frames that require destructors to run. Ownership and cleanup of any objects that survive individual calls would also need to be clearly defined. pgvector would continue to manage pages, tuples, locking, and WAL. We would need to evaluate how the library’s code layouts fit into pgvector’s index tuple and page formats, whether any conversion or copying is necessary, and the resulting performance impact. The caller-owned buffers and workspace interfaces are helpful for controlling memory usage.

A prototype should help determine which changes belong in the pgvector integration layer and whether any extensions to the library’s interfaces are needed.

> Would you be open to discussing whether parts of the integration could reuse the library’s quantization and distance-estimation components?

I would be happy to work on this. My suggestion is to start with a minimal IVF integration against upstream pgvector, retaining its existing storage and index lifecycle management while reusing selected quantization and distance-estimation components.

I could first validate correctness and evaluate recall, query performance, build time, and memory usage. Those results would help us decide how to proceed with further integration.

view thread (12+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-1003-c6411571899@github.com>
Permalink:  ../gh-pgvector-pgvector-1003-c6411571899@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox