We strongly encourage you to explore our new VectorChord implementation, which offers improved stability and performance. Users are encouraged to migrate to VectorChord. See the migration guide for assistance.
There are four ways to install pgvecto.rs.
Docker
The easiest way to try pgvecto.rs is to run it from a ready-to use Docker image.
Installation from the Debian package requires a dependency on GLIBC >= 2.31, e.g:
Ubuntu 20.04 or later
Debian Bullseye or later
Debian packages(.deb) are used in distributions based on Debian, such as Ubuntu and many others. They can be easily installed by dpkg or apt-get.
Download the deb package in the release page, and type sudo apt install vectors-pg15-*.deb to install the deb package.
Configure your PostgreSQL by modifying the shared_preload_libraries and search_path to include the extension.
psql -U postgres -c 'ALTER SYSTEM SET shared_preload_libraries = "vectors.so"'psql -U postgres -c 'ALTER SYSTEM SET search_path TO "$user", public, vectors'# You need restart the PostgreSQL cluster to take effects.sudo systemctl restart postgresql.service # for pgvecto.rs running with systemd
Configure your PostgreSQL by modifying the shared_preload_libraries and search_path to include the extension.
psql -U postgres -c 'ALTER SYSTEM SET shared_preload_libraries = "vectors.so"'psql -U postgres -c 'ALTER SYSTEM SET search_path TO "$user", public, vectors'# You need restart the PostgreSQL cluster to take effects.sudo systemctl restart postgresql.service # for pgvecto.rs running with systemd
Before building from source, you could refer to the development guide to set up the development environment.
Then you could build and install the extension.
sed -e "s/@CARGO_VERSION@/0.0.0/g" ./vectors.control # 0.0.0 here is the version number that you needsudo cp -a ./sql/upgrade/. $(pg_config --sharedir)/extension
cargo pgrx install --sudo --release
Configure your PostgreSQL by modifying the shared_preload_libraries and search_path to include the extension.
psql -U postgres -c 'ALTER SYSTEM SET shared_preload_libraries = "vectors.so"'psql -U postgres -c 'ALTER SYSTEM SET search_path TO "$user", public, vectors'# You need restart the PostgreSQL cluster to take effects.sudo systemctl restart postgresql.service # for pgvecto.rs running with systemdservice postgresql restart # for pgvecto.rs running in envd