This repository contains container images for CrunchyData PGO that include the pgvecto.rs extension.
⚠️ If you are deploying this image on an existing database: The postgres configuration must be updated to enable the pgvecto.rs extension.
To enable the extension, you need to set the shared_preload_libraries
and search_path
in your Cluster spec. Add the following configuration to your PostgresCluster
yaml file:
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
spec:
...
patroni:
dynamicConfiguration:
postgresql:
synchronous_commit: "on"
parameters:
shared_preload_libraries: "vectors.so"
search_path: '"$user", public, vectors'
⚠️ If you want to do a major Postgres version upgrade like described in the official docs, make sure you do the following steps or the upgrade will fail:
- Connect to the database where you have enabled the
vectors
extension and disable it withDROP EXTENSION vectors;
. - Remove the
dynamicConfiguration
block you added toPostgresCluster
from above. - Follow the upgrade instruction from the official doc.
- Add back the
dynamicConfiguration
block and enable the extension in the database again withCREATE EXTENSION vectors;