To install the pg_vectorize extension into an existing Postgres cluster, run the following on the same host as Postgres:
- Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh- Install pgrx
cargo install cargo-pgrx --version 0.16.1 --locked
cargo pgrx init --pg18 $(which pg_config)- Clone the repo and install dependencies
git clone https://github.com/ChuckHend/pg_vectorize.git
cd pg_vectorize/extension
# install dependencies
make setup PGRX_PG_CONFIG=$(which pg_config)- Compile and install pg_vectorize
cargo pgrx install- Update
shared_preload_libraries
Set these values in your postgresql.conf file:
shared_preload_libraries = 'pg_cron, vectorize'
or run this SQL command then restart Postgres:
ALTER SYSTEM SET shared_preload_libraries TO 'pg_cron', 'vectorize';- Enable the extension
connect to your Postgres instance with something like psql -U postgres. Then, run:
CREATE EXTENSION vectorize CASCADE;