feat: adds VectorChord extension support

This commit is contained in:
2025-07-09 17:42:40 +07:00
parent 82e4b52c4b
commit f741d96188
3 changed files with 13 additions and 5 deletions
+6 -4
View File
@@ -1,5 +1,5 @@
# cnpgvecto.rs
Container images for [cloudnative-pg](https://cloudnative-pg.io/) with the [pgvecto.rs](https://github.com/tensorchord/pgvecto.rs) extension installed.
Container images for [cloudnative-pg](https://cloudnative-pg.io/) with [VectorChord](https://github.com/tensorchord/VectorChord) and [pgvecto.rs](https://github.com/tensorchord/pgvecto.rs) extension installed.
> [!IMPORTANT]
@@ -13,10 +13,11 @@ Container images for [cloudnative-pg](https://cloudnative-pg.io/) with the [pgve
> postgresql:
> shared_preload_libraries:
> - "vectors.so"
> - "vchord.so"
> ```
> [!IMPORTANT]
> The `pgvecto.rs` extension is not enabled by default. You need to enable it and set the search path when initializing the database. You can configure it in your Cluster spec:
> The `pgvecto.rs` and `VectorChord` extension is not enabled by default. You need to enable it and set the search path when initializing the database. You can configure it in your Cluster spec:
> ```yaml
> apiVersion: postgresql.cnpg.io/v1
> kind: Cluster
@@ -27,8 +28,9 @@ Container images for [cloudnative-pg](https://cloudnative-pg.io/) with the [pgve
> postInitSQL:
> - ALTER SYSTEM SET search_path TO "$user", public, vectors;
> - CREATE EXTENSION IF NOT EXISTS "vectors";
> - CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
## Building
To build the Dockerfile locally, you need to pass the `CNPG_TAG` and `PGVECTORS_TAG` args. For example:
`docker build . --build-arg="CNPG_TAG=16.3" --build-arg="PGVECTORS_TAG=v0.2.1"`
To build the Dockerfile locally, you need to pass the `CNPG_TAG`, `PGVECTORS_TAG` and `VECTORCHORD_TAG` args. For example:
`docker build . --build-arg="CNPG_TAG=17.5-bookworm" --build-arg="PGVECTORS_TAG=v0.4.0" --build-arg="VECTORCHORD_TAG=0.4.3"`