File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Installing pg_vectorize
2+
3+ To install the pg_vectorize extension into an existing Postgres cluster, run the following on the same host as Postgres:
4+
5+ 1 . Install [ Rust] ( https://www.rust-lang.org/tools/install )
6+
7+ ``` bash
8+ curl --proto ' =https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
9+ ```
10+
11+ 2 . Install [ pgrx] ( https://github.com/pgcentralfoundation/pgrx )
12+
13+ ``` bash
14+ cargo install cargo-pgrx --version 0.13.1 --locked
15+
16+ cargo pgrx init --pg17 $( which pg_config)
17+ ```
18+
19+ 3 . Clone the repo and install dependencies
20+
21+ ``` bash
22+ git clone https://github.com/ChuckHend/pg_vectorize.git
23+
24+ cd pg_vectorize/extension
25+
26+ # install dependencies
27+ make setup PGRX_PG_CONFIG=$( which pg_config)
28+ ```
29+
30+ 4 . Compile and install pg_vectorize
31+
32+ ``` bash
33+ cargo pgrx install
34+ ```
35+
36+ 5 . Update ` shared_preload_libraries `
37+
38+ Set these values in your postgresql.conf file:
39+
40+ ```
41+ shared_preload_libraries = 'pg_cron, vectorize'
42+ ```
43+
44+ or run this SQL command then restart Postgres:
45+
46+ ``` sql
47+ ALTER SYSTEM SET shared_preload_libraries TO ' pg_cron' , ' vectorize' ;
48+ ```
49+
50+ 6 . Enable the extension
51+
52+ connect to your Postgres instance with something like ` psql -U postgres ` . Then, run:
53+
54+ ``` sql
55+ CREATE EXTENSION vectorize CASCADE;
56+ ```
You can’t perform that action at this time.
0 commit comments