renovate[bot] 8b7e236e4d chore(deps): update docker/setup-buildx-action action to v3.9.0 (#77)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-06 18:18:05 +01:00
2023-11-24 13:14:11 +01:00

cnpgvecto.rs

Container images for cloudnative-pg with the pgvecto.rs extension installed.

Important

If you are using this image on an existing database, the postgres configuration needs to be altered to enable the extension. You can do this by setting shared_preload_libraries in your Cluster spec:

apiVersion: postgresql.cnpg.io/v1
kind: Cluster
spec:
  (...)
  postgresql:
    shared_preload_libraries:
      - "vectors.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:

apiVersion: postgresql.cnpg.io/v1
kind: Cluster
spec:
  (...)
  bootstrap:
    initdb:
      postInitSQL:
        - ALTER SYSTEM SET search_path TO "$user", public, vectors;
        - CREATE EXTENSION IF NOT EXISTS "vectors";

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"

Description
No description provided
Readme Apache-2.0 183 KiB
Languages
Dockerfile 100%