Before You Begin¶
For every platform in this book, you will need:
- Admin access to the target PostgreSQL database.
- The
psqlclient installed on the machine you will run the setup commands from. - The pg_relay SQL deployment files — obtained by cloning the repository:
git clone https://gitlab.com/pebble-it/pg_relay.git
cd pg_relay
# The SQL files are at: sql/pg_relay--1.0.sql and sql/pg_relay--1.0--1.1.sql
Alternatively, download and extract the release archive from the GitLab releases page:
curl -LO https://gitlab.com/pebble-it/pg_relay/-/releases/latest/downloads/pg_relay--1.1.sql.tar.gz
tar -xzf pg_relay--1.1.sql.tar.gz
# The SQL files are at: sql/pg_relay--1.0.sql and sql/pg_relay--1.0--1.1.sql
A fresh deployment runs both SQL files, in order — the base script, then the script that upgrades it to 1.1 — arriving at exactly the current version. This is exactly what CREATE EXTENSION does internally on a self-managed server; it just is not available to you directly on a managed cloud service. If you already have an older deployment in place, you only need to run the upgrade script (see Upgrading).
Continue to the setup instructions for your own provider: Amazon RDS, Amazon Aurora, Azure, Google Cloud SQL, or another provider.