An Azure managed PostgreSQL database service for app development and deployment.
Check whether pg_failover_slots is configured in shared_preload_libraries; for the PostgreSQL 14→17 path it blocks the pre-upgrade check and must be removed before validation is rerun.^1^
Remove pg_failover_slots safely
A matching 14→17 precheck failure was resolved by removing pg_failover_slots from shared_preload_libraries.^2^
- In the Azure portal, open the primary Flexible Server.
- Select Server parameters and search for
shared_preload_libraries. - If its value includes
pg_failover_slots, remove only that entry, retaining every other configured library. - Save the parameter change.
- Restart the server so the preload-library change takes effect. This causes a brief interruption:
az postgres flexible-server restart \
--resource-group <resource_group> \
--name <server>
Changes to shared_preload_libraries require a restart.^3^
- Wait until Overview → Status shows Ready.
- Run Overview → Upgrade → PostgreSQL 17 → Validate only → Start.^4^
Removing the preload entry does not necessarily uninstall an extension already created in a database. If validation explicitly reports that the extension itself must be dropped, first inventory it in every database:
SELECT extname, extversion
FROM pg_extension
WHERE extname = 'pg_failover_slots';
Only if reported as a blocker, connect as a user belonging to azure_pg_admin and run:
DROP EXTENSION pg_failover_slots;
DROP EXTENSION removes objects packaged with the extension, so record its configuration and check dependencies before executing it.^5^
After upgrading to PostgreSQL 17, do not automatically restore pg_failover_slots: Azure lists it as unsupported for PostgreSQL 17, while PostgreSQL 17 provides native slot synchronization when correctly configured.^6^
If pg_failover_slots is not configured
The displayed setup-pg_hba output and container exit code are only the tail of the failure and do not identify the blocking object. Capture the complete PG_Upgrade_Logs:
- Open Monitoring → Server logs.
- Enable Capture logs for download and save.
- Rerun Validate only.
- Return to Server logs, filter Log type to Upgrade log, and download all
pg_upgradefiles generated at that time.^7^ - Inspect the first
FATAL,ERROR, or incompatibility precedingFailure, exiting; the last container message is not sufficiently diagnostic.
Check the complete log for these documented 14→17 blockers:
- Extensions blocked on all paths:
session_variable,anon, orage. - Utility extensions that must be dropped and recreated:
pg_repack,hypopg, orpg_partman. - PostgreSQL 17 blockers:
semver,azure_local_ai, andpg_failover_slotsinshared_preload_libraries. - Logical replication slots, prepared transactions, event triggers, dependencies on unsupported objects, or pending restart-required parameters.
- Views dependent on
pg_stat_activity. - Inaccessible or unresponsive databases; validation must connect to every database.
- Network restrictions preventing traffic on ports 5432/6432 or access to Azure Storage.
- Less than 10–20% free storage.^1^
To inventory logical slots:
SELECT slot_name, slot_type, database, active
FROM pg_replication_slots;
Do not drop slots merely because they exist; use the validation report and full log to identify the specific blocker and account for downstream replication consumers first.
Since the replica has already been deleted, no further replica-deletion step is needed. Confirm only that the primary is Ready and no replica or server operation is still being removed or processed before rerunning validation. If the full logs still contain only Azure internal setup output and no customer-remediable blocker, open an Azure support request and attach the validation CSV, all upgrade logs from the same attempt, operation timestamp, region, and source/target versions.
References
- Major version upgrades in Azure Database for PostgreSQL flexible server
- Attempt to upgrade Azure Database for PostgreSQL fails pre-check - Microsoft Q&A
- Restarts the Azure Database for PostgreSQL flexible server using the Azure CLI to apply changes made to server parameters such as 'shared_preload_libraries'.
- Run upgrade validation checks in Azure Database for PostgreSQL flexible server
- Drop extensions in Azure Database for PostgreSQL flexible server
- List of extensions and modules by version of PostgreSQL (postgresql-17)
- Download PostgreSQL and upgrade logs in Azure Database for PostgreSQL flexible server