Skip to content

Overview

pg_relay_notifier is a pure SQL/PL/pgSQL PostgreSQL extension — no compiled C code, no background worker, no shared_preload_libraries entry. On a self-managed PostgreSQL installation, it's installed with CREATE EXTENSION pg_relay_notifier after pg_relay is installed. On a managed cloud database service, this isn't possible — cloud providers don't permit installing arbitrary third-party extensions from the filesystem.

This book explains the workaround — which is straightforward and works on every managed service — for:

  • AWS RDS for PostgreSQL
  • AWS Aurora for PostgreSQL
  • Azure Database for PostgreSQL Flexible Server
  • Google Cloud SQL for PostgreSQL
  • Other managed services — DigitalOcean, Neon, Railway, Render, Supabase, and similar platforms

The mechanism is identical across every one of them: pg_relay_notifier is pure SQL, so the same file that CREATE EXTENSION would run can instead be run directly against the database by an admin role. There's nothing platform-specific about the SQL itself — the only thing that varies between providers is which admin role you connect as and how you get psql pointed at the database.

Because pg_relay_notifier is pure SQL and the pg_relay Processor is already deployed as part of pg_relay's own setup, installing pg_relay_notifier on a cloud service is simpler than installing pg_relay: there's no binary to deploy or configure, no service to start, and no additional compute to provision.