Other Cloud Providers¶
This chapter covers any managed PostgreSQL service not covered elsewhere in this book, including DigitalOcean Managed Databases, Neon, Railway, Render, Supabase, and similar services.
Connectivity¶
pg_relay does not use LISTEN/NOTIFY, so there is nothing special to verify — any managed service that accepts a normal client connection will work. Point the Processor at the primary/writer endpoint (it writes to the queue and the log on every event). Use a direct connection or a session-mode pool; do not point the Processor at a transaction-mode pooler (for example, PgBouncer transaction pooling, or Supabase's 6543 transaction endpoint), because the Processor's instance-slot advisory lock is session-level and needs a backend connection pinned for the whole life of the session. Your application can still use a transaction-pooled endpoint — only the Processor needs the session-pinned one.
Step 1 — Deploy the pgrelay schema¶
Connect as your admin or superuser-equivalent role, using the connection details provided by your service:
export PGPASSFILE=~/.pgpass # contains: your-host:5432:your_database:admin_user:password
export PGSSLMODE=require
psql -h your-host -U admin_user -d your_database -c "CREATE SCHEMA pgrelay;"
psql -h your-host -U admin_user -d your_database -f sql/pg_relay--1.0.sql
psql -h your-host -U admin_user -d your_database -f sql/pg_relay--1.0--1.1.sql
Step 2 — Enable login on the pgrelay role¶
Step 3 — Configure the Processor¶
Create a .pgpass file for the pgrelay user on the Processor's machine:
Processor environment variables:
PGHOST=your-host
PGPORT=5432
PGDATABASE=your_database
PGUSER=pgrelay
PGPASSFILE=/path/to/.pgpass
PGSSLMODE=require
Adjust PGSSLMODE to match your provider's requirements. require encrypts the connection without verifying the server's certificate, and is accepted by every provider. Use verify-full with PGSSLROOTCERT if your provider publishes a CA certificate and you want full certificate verification.
Continue to Running the Processor once your schema is deployed on any of these platforms.