mirror of
https://github.com/YuzuZensai/cloudnative-vectorchord-pgvecto.rs.git
synced 2026-01-31 14:57:18 +00:00
Merge pull request #26 from tensorchord/fix-readme
chore: Add document about enable pgvecto.rs extension
This commit is contained in:
@@ -14,7 +14,3 @@ RUN apt install ./pgvectors.deb
|
|||||||
|
|
||||||
USER postgres
|
USER postgres
|
||||||
|
|
||||||
# From https://stackoverflow.com/a/42508925
|
|
||||||
# Note that this way of enabling the plugin only works on database init
|
|
||||||
# We should investigate alternative ways of enabling it that will always work
|
|
||||||
COPY install-pgvectors.sql /docker-entrypoint-initdb.d/
|
|
||||||
|
|||||||
13
README.md
13
README.md
@@ -14,3 +14,16 @@ Container images for [cloudnative-pg](https://cloudnative-pg.io/) with the [pgve
|
|||||||
> shared_preload_libraries:
|
> shared_preload_libraries:
|
||||||
> - "vectors.so"
|
> - "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:
|
||||||
|
> ```yaml
|
||||||
|
> 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";
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
ALTER SYSTEM SET shared_preload_libraries = "vectors.so"
|
|
||||||
ALTER SYSTEM SET search_path = "$user", public, vectors
|
|
||||||
Reference in New Issue
Block a user