|
1 | 1 | # Installation
|
2 | 2 |
|
3 |
| -There are four ways to install VectorChord. |
| 3 | +VectorChord is tested on the following operating system: |
| 4 | + |
| 5 | +* Ubuntu (x86_64, aarch64) |
| 6 | +* MacOS (aarch64, x86_64) |
| 7 | +* Windows (x86_64) |
| 8 | +* Alpine Linux (x86_64, aarch64) [^1] |
| 9 | + |
| 10 | +[^1]: VectorChord is tested with PostgreSQL 15, 16 and 17 on Alpine Linux. |
| 11 | + |
| 12 | +Please report a bug if you encounter issues on any of the above operating systems. |
| 13 | + |
| 14 | +Please submit a feature request if you need support for additional platforms. |
| 15 | + |
| 16 | +There are 5 ways to install VectorChord. |
4 | 17 |
|
5 | 18 | ## Docker
|
6 | 19 |
|
@@ -130,6 +143,12 @@ CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
|
130 | 143 |
|
131 | 144 | ## PGXN
|
132 | 145 |
|
| 146 | +::: tip |
| 147 | + |
| 148 | +See [Source](#source) for build requirements. |
| 149 | + |
| 150 | +::: |
| 151 | + |
133 | 152 | 1. Install VectorChord from [PostgreSQL Extension Network](https://pgxn.org/dist/vchord) with:
|
134 | 153 |
|
135 | 154 | ```sh
|
@@ -158,53 +177,37 @@ There is a broken VectorChord `0.4.1` package on PGXN. Please do not use it. Use
|
158 | 177 |
|
159 | 178 | ::: tip
|
160 | 179 |
|
161 |
| -VectorChord supports UNIX-like operating systems and Windows. Please report an issue if you cannot compile or make it work. |
162 |
| - |
163 |
| -VectorChord supports little-endian architectures but only provides performance advantages on x86_64 and aarch64. |
164 |
| - |
165 |
| -::: |
166 |
| - |
167 |
| -You may need to install VectorChord from source. Please follow these steps. |
| 180 | +Build requirements: |
168 | 181 |
|
169 |
| -1. Clone the repository and checkout the branch. |
| 182 | +* any port of `make` |
| 183 | +* `clang >= 16` with `libclang` |
| 184 | +* `rust >= 1.88` with `cargo` |
170 | 185 |
|
171 |
| -```sh |
172 |
| -git clone https://github.com/tensorchord/VectorChord.git |
173 |
| -cd VectorChord |
174 |
| -git checkout "0.5.0" |
175 |
| -``` |
| 186 | +It's recommended to use Rustup for installing Rust on most platforms, while on Alpine Linux, using the system package manager is advised. |
176 | 187 |
|
177 |
| -2. Install a C compiler and Rust. For Clang, the version must be 16 or higher. For GCC, the version must be 14 or higher. Other C compilers are not supported, and we prefer and recommend using Clang. For Rust, the version must be the same as that recorded in `rust-toolchain.toml`. |
| 188 | +You can set the environment variable `CC` to specify the desired C compiler for the build system. If you do not set this variable, the build system automatically searches for clang and gcc. To compile all C code with clang, set `CC` to the path of clang. To compile all C code with gcc, set `CC` to the path of gcc; note that in this case, there is a requirement `gcc >= 14`. |
178 | 189 |
|
179 |
| -You could download Clang from https://github.com/llvm/llvm-project/releases. |
| 190 | +Rust version requirement is not a long-term guarantee; we will raise the required Rust version with each new release. |
180 | 191 |
|
181 |
| -You could setup Rust with Rustup. See https://rustup.rs/. |
| 192 | +::: |
182 | 193 |
|
183 |
| -3. Build it and install it. |
| 194 | +1. Download the source code, build and install it with `make`. |
184 | 195 |
|
185 | 196 | ```sh
|
| 197 | +curl -fsSL https://github.com/tensorchord/VectorChord/archive/refs/tags/0.5.0.tar.gz | tar -xz |
| 198 | +cd VectorChord-0.5.0 |
186 | 199 | make build
|
187 | 200 | make install # or `sudo make install`
|
188 | 201 | ```
|
189 | 202 |
|
190 |
| -4. Configure your PostgreSQL by modifying the `shared_preload_libraries` to include the extension. And then restart the PostgreSQL cluster. |
| 203 | +2. Configure your PostgreSQL by modifying the `shared_preload_libraries` to include the extension. And then restart the PostgreSQL cluster. |
191 | 204 |
|
192 | 205 | ```sh
|
193 | 206 | psql -U postgres -c 'ALTER SYSTEM SET shared_preload_libraries = "vchord"'
|
194 | 207 | ```
|
195 | 208 |
|
196 |
| -5. Run the following SQL to ensure the extension is enabled. |
| 209 | +3. Run the following SQL to ensure the extension is enabled. |
197 | 210 |
|
198 | 211 | ```sql
|
199 | 212 | CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
|
200 | 213 | ```
|
201 |
| - |
202 |
| -::: tip |
203 |
| - |
204 |
| -By default, `VectorChord` only finds `clang` in `PATH` as the C compiler. |
205 |
| - |
206 |
| -If your Clang executable is not named `clang` or is not in `PATH`, please set the environment variable `CC` to path of your Clang. |
207 |
| - |
208 |
| -If you prefer to use GCC, please set the environment variable `CC` to `gcc` or path of your GCC. |
209 |
| - |
210 |
| -::: |
|
0 commit comments