|
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) |
| 7 | +* Windows (x86_64) |
| 8 | +* Alpine Linux (x86_64, aarch64) [^1] |
| 9 | + |
| 10 | +[^1]: VectorChord is tested with PostgreSQL 15 in `community` repository, 16 and 17 in `main` repository on Alpine Linux 3.22. |
| 11 | + |
| 12 | +Please report a bug if you encounter issues on any of the above operating systems, or submit a feature request for additional platform support. |
| 13 | + |
| 14 | +There are 4 ways to install VectorChord. |
4 | 15 |
|
5 | 16 | ## Docker
|
6 | 17 |
|
@@ -62,15 +73,6 @@ Other sections may align with the above.
|
62 | 73 |
|
63 | 74 | ## Debian packages
|
64 | 75 |
|
65 |
| -::: tip |
66 |
| - |
67 |
| -Installation from Debian packages requires a dependency on `GLIBC >= 2.35`, so only the following distributions are supported: |
68 |
| - |
69 |
| -- `Debian 12 (Bookworm)` or later |
70 |
| -- `Ubuntu 22.04` or later |
71 |
| - |
72 |
| -::: |
73 |
| - |
74 | 76 | Debian packages are used for Debian-based Linux distributions, including Debian and Ubuntu. They can be easily installed by `apt`. You can use this installation method on x86_64 Linux and aarch64 Linux.
|
75 | 77 |
|
76 | 78 | 1. Download Debian packages in [the release page](https://github.com/tensorchord/VectorChord/releases/latest), and install them by `apt`.
|
@@ -130,6 +132,12 @@ CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
|
130 | 132 |
|
131 | 133 | ## PGXN
|
132 | 134 |
|
| 135 | +::: tip |
| 136 | + |
| 137 | +See [Source](#source) for build requirements. |
| 138 | + |
| 139 | +::: |
| 140 | + |
133 | 141 | 1. Install VectorChord from [PostgreSQL Extension Network](https://pgxn.org/dist/vchord) with:
|
134 | 142 |
|
135 | 143 | ```sh
|
@@ -158,53 +166,37 @@ There is a broken VectorChord `0.4.1` package on PGXN. Please do not use it. Use
|
158 | 166 |
|
159 | 167 | ::: tip
|
160 | 168 |
|
161 |
| -VectorChord supports UNIX-like operating systems and Windows. Please report an issue if you cannot compile or make it work. |
| 169 | +Build requirements: |
162 | 170 |
|
163 |
| -VectorChord supports little-endian architectures but only provides performance advantages on x86_64 and aarch64. |
| 171 | +* any port of `make` |
| 172 | +* `clang >= 16` with `libclang` |
| 173 | +* `rust >= 1.89` with `cargo` |
164 | 174 |
|
165 |
| -::: |
166 |
| - |
167 |
| -You may need to install VectorChord from source. Please follow these steps. |
168 |
| - |
169 |
| -1. Clone the repository and checkout the branch. |
170 |
| - |
171 |
| -```sh |
172 |
| -git clone https://github.com/tensorchord/VectorChord.git |
173 |
| -cd VectorChord |
174 |
| -git checkout "0.5.0" |
175 |
| -``` |
| 175 | +It's recommended to use Rustup for installing Rust on most platforms, while on Alpine Linux, using the system package manager is advised. |
176 | 176 |
|
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`. |
| 177 | +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 | 178 |
|
179 |
| -You could download Clang from https://github.com/llvm/llvm-project/releases. |
| 179 | +Rust version requirement is not a long-term guarantee; we will raise the required Rust version with each new release. |
180 | 180 |
|
181 |
| -You could setup Rust with Rustup. See https://rustup.rs/. |
| 181 | +::: |
182 | 182 |
|
183 |
| -3. Build it and install it. |
| 183 | +1. Download the source code, build and install it with `make`. |
184 | 184 |
|
185 | 185 | ```sh
|
| 186 | +curl -fsSL https://github.com/tensorchord/VectorChord/archive/refs/tags/0.5.0.tar.gz | tar -xz |
| 187 | +cd VectorChord-0.5.0 |
186 | 188 | make build
|
187 | 189 | make install # or `sudo make install`
|
188 | 190 | ```
|
189 | 191 |
|
190 |
| -4. Configure your PostgreSQL by modifying the `shared_preload_libraries` to include the extension. And then restart the PostgreSQL cluster. |
| 192 | +2. Configure your PostgreSQL by modifying the `shared_preload_libraries` to include the extension. And then restart the PostgreSQL cluster. |
191 | 193 |
|
192 | 194 | ```sh
|
193 | 195 | psql -U postgres -c 'ALTER SYSTEM SET shared_preload_libraries = "vchord"'
|
194 | 196 | ```
|
195 | 197 |
|
196 |
| -5. Run the following SQL to ensure the extension is enabled. |
| 198 | +3. Run the following SQL to ensure the extension is enabled. |
197 | 199 |
|
198 | 200 | ```sql
|
199 | 201 | CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
|
200 | 202 | ```
|
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