Skip to content

Why You Cannot Just Install the Extension

Managed cloud PostgreSQL services don't let you place files on the server filesystem. The standard PostgreSQL extension mechanism (CREATE EXTENSION) requires a .control file and a SQL file to exist in the server's extension directory — a path you cannot write to on any managed service.

There's a second, independent problem behind the first: because pg_relay itself is typically deployed via direct SQL on managed services (not via CREATE EXTENSION), it doesn't appear in pg_extension. This means CREATE EXTENSION pg_relay_notifier would fail with a missing-dependency error even if you somehow had filesystem access — PostgreSQL checks pg_extension to satisfy the requires = 'pg_relay'-shaped expectation pg_relay_notifier's own install script enforces manually (it isn't a control-file requires, precisely because it has to work in this exact scenario — see the Technical Reference).

pg_relay_notifier is a pure SQL extension — it contains no compiled code. The entire extension can be deployed by running its SQL file directly against the database. The result is functionally identical to CREATE EXTENSION pg_relay_notifier: the same schema, tables, and functions are created, and the same pg_relay registrations happen.

CREATE EXTENSION Manual SQL deployment
Installation CREATE EXTENSION pg_relay_notifier CREATE SCHEMA pgrelay_notifier + run install/pg_relay_notifier--managed--1.0.sql
Removal DROP EXTENSION pg_relay_notifier DROP SCHEMA pgrelay_notifier CASCADE
Upgrade ALTER EXTENSION pg_relay_notifier UPDATE Apply the updated managed SQL file manually
Extension catalogue Appears in pg_extension Does not appear in pg_extension — verify with SELECT pgrelay_notifier.interface_version(); instead

Everything else — SMTP and Microsoft 365 delivery, profiles, channels, retries, the debug trace, the Oracle UTL_MAIL-style functions — is identical. See Installing on Managed PostgreSQL for the actual steps.