Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 1.14 KB

File metadata and controls

56 lines (36 loc) · 1.14 KB

Installing pg_vectorize

To install the pg_vectorize extension into an existing Postgres cluster, run the following on the same host as Postgres:

  1. Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  1. Install pgrx
cargo install cargo-pgrx --version 0.16.1 --locked

cargo pgrx init --pg18 $(which pg_config)
  1. 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)
  1. Compile and install pg_vectorize
cargo pgrx install
  1. 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';
  1. Enable the extension

connect to your Postgres instance with something like psql -U postgres. Then, run:

CREATE EXTENSION vectorize CASCADE;