Upgrading¶
When a new version of pg_auto_mv is released, a cloud deployment is upgraded by applying the updated SQL. Because the schema was deployed manually rather than via CREATE EXTENSION, there is no ALTER EXTENSION command.
Each release's notes describe exactly what changed. Apply the version-specific upgrade SQL shipped with that release rather than re-running the full install script against an existing deployment.
Upgrading a 1.0 deployment to 1.1¶
pg_auto_mv 1.1 registers both of its pg_relay channels as node-restricted (required for pg_relay v1.1's multi-master modes) and requires pg_relay >= 1.1.0. Upgrade pg_relay to v1.1 first — the pg_auto_mv upgrade script verifies the pg_relay version and fails with a clear error if it is older.
Check the current state before upgrading:
-- Confirm the existing installation before making changes
SELECT channel, action FROM pgrelay.actions WHERE channel LIKE 'pg_auto_mv.%';
SELECT COUNT(*) FROM pgauto_mv.materialised_views;
Apply the upgrade SQL:
The script flags both channels node_restricted = true, back-fills the node pin on any still-pending pg_auto_mv queue rows (e.g. scheduled refreshes queued before the upgrade), and records version 1.1.0 in pgrelay.pg_relay_applications. Existing registrations, schedules, and triggers carry over unchanged.
Verify:
-- Both rows must show node_restricted = true
SELECT channel, node_restricted FROM pgrelay.actions WHERE channel LIKE 'pg_auto_mv.%';
-- Version registration
SELECT latest_version FROM pgrelay.pg_relay_applications
WHERE application_name = 'pg_auto_mv'; -- 1.1.0
No Processor restart is needed — the pg_relay Processor reads the pgrelay.actions table on every dispatch cycle and picks up new or updated action strings automatically.