This section explains how to update PL/Rust installations. This assumes
you installed PL/Rust following our installation guide and pgrx and PL/Rust are installed using the
postgres Linux user.
A PL/Rust update is often accompanied by an update of the underlying
pgrx project. Install the latest version of pgrx.
Changing into the plrust folder ensures the
rustc version used
for installation is the same required by PL/Rust.
Start as a user with
sudo chown postgres -R /usr/share/postgresql/15/extension/
sudo chown postgres -R /usr/lib/postgresql/15/lib/
sudo su - postgres
cargo install cargo-pgrx --locked
Follow these steps to upgrade PL/Rust from GitLab to use the latest release.
mv ~/plrust/build/bin/plrustc ~/.cargo/bin/
STD_TARGETS="x86_64-postgres-linux-gnu " \
cargo pgrx install --release \
--features trusted \
Exit out of
postgres user back to user with sudo.
Restart Postgres, required b/c plrust is in
Set permissions back to default.
sudo systemctl restart postgresql
sudo chown root -R /usr/share/postgresql/15/extension/
sudo chown root -R /usr/lib/postgresql/15/lib/
See the section(s) about Rust versions
the the Install PL/Rust section.
Pay special attention to the versions defined by PL/Rust, and your
system defaults for