Skip to content

budimanjojo/crunchy-postgres-vectorchord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crunchy-postgres-vectorchord

Container images for Crunchy Postgres for Kubernetes with VectorChord extension installed.

Important

The postgres configuration needs to be altered to enable the extension. You can do this by setting shared_preload_libraries in your PostgresCluster spec:

apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
spec:
  (...)
  config:
    parameters:
      shared_preload_libraries: "vchord.so"

Or if you're still using the operator version older than 5.8.0:

apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
spec:
  (...)
  patroni:
    dynamicConfiguration:
      postgresql:
        parameters:
          shared_preload_libraries: "vchord.so"

Important

The "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 PostgresCluster spec:

apiVersion: v1
kind: ConfigMap
metadata:
  name: enable-vchord
data:
  init.sql: |-
    /c mydatabasename\\
    CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
---
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
spec:
  (...)
  databaseInitSQL:
    name: enable-vchord
    key: init.sql

Building

To build the Dockerfile locally, you need to pass the CNPG_TAG and VECTORCHORD_TAG args. For example:

docker build . --build-arg="CDPG_TAG=ubi9-17.5-2520" --build-arg="VECTORCHORD_TAG=0.4.2"

Thanks

I shamelessly took a lot of code from cloudnative-vectorchord.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors