Overview¶
pg_relay has two parts: a PostgreSQL extension that installs the pgrelay schema into your database, and a Go program (the Processor) that connects to the database, polls a durable queue, and runs each event's registered action. On a self-managed PostgreSQL installation, you install the extension with CREATE EXTENSION pg_relay. On a managed cloud database service, that is not possible — cloud providers do not allow arbitrary third-party extensions to be installed.
This book explains the workaround, which is straightforward and works the same way on every managed PostgreSQL service, and gives you step-by-step setup instructions for:
- AWS RDS for PostgreSQL
- AWS Aurora for PostgreSQL
- Azure Database for PostgreSQL Flexible Server
- Google Cloud SQL for PostgreSQL
- Generic cloud PostgreSQL — DigitalOcean, Neon, Railway, Render, Supabase, and similar services
The Processor binary is an ordinary PostgreSQL client program. It connects over the network using standard libpq (PostgreSQL's client connection library) environment variables, and needs no changes at all, regardless of where it runs or which cloud provider hosts your database.
Continue to Why the Extension Can't Just Be Installed for exactly what the workaround involves.