Skip to content

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

License

Notifications You must be signed in to change notification settings

tensorchord/cloudnative-pgvecto.rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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";