Hello DHAVAL R PATEL,
Thank you for your detailed question. This is a perplexing issue, especially when you've already had a successful upgrade. The "major version upgrade failed precheck" error after a previous successful upgrade is not an uncommon problem, and it points to a specific set of limitations with the in-place upgrade process for Azure Database for PostgreSQL Flexible Server.
To answer your primary question directly: No, there is no inherent limitation that prevents consecutive major version upgrades. You should be able to upgrade from 14 to 15, and then from 15 to 16. The issue is that the upgrade process itself can introduce changes that then fail the pre-check for the next upgrade.
Based on the information you provided and official Azure documentation, the most likely culprit is an unsupported extension, specifically dblink
, which you noted gets auto-installed.
The Problem: Unsupported Extensions
The in-place major version upgrade feature in Azure PostgreSQL Flexible Server has a strict pre-check that scans for unsupported extensions. If it finds one, the upgrade is blocked [, ].
The dblink
extension is on the list of extensions that are not supported for in-place major version upgrades across any PostgreSQL version [, , ].
Here's the likely sequence of events:
- Upgrade from 14 to 15: This process was successful.
Post-Upgrade Process: As part of the upgrade or another automated process, the dblink
extension was installed on your server.
Attempt Upgrade from 15 to 16: The pre-check for this new upgrade runs, detects the presence of the unsupported dblink
extension, and immediately fails, returning the "major version upgrade failed precheck" error.
This explains why the second upgrade fails even though the first one succeeded.
How to Fix the Issue
To proceed with the upgrade to version 16, you must remove the dblink
extension.
Connect to your database using a tool like psql
or Azure Data Studio.
Drop the extension from the database(s) where it is installed. You can do this by running the following command for each affected database:
sql
DROP
Remove from azure.extensions
: You must also ensure that dblink
is removed from the azure.extensions
server parameter in the Azure portal. The upgrade will be blocked if it is still listed here.
Re-run the Upgrade: Once the extension has been completely removed, you can attempt the major version upgrade from 15 to 16 again. The pre-check should now pass.
Other Potential Issues to be Aware of
While dblink
is the most probable cause, keep these other limitations in mind:
Azure MISE Worker Failures: The background worker failures you're seeing are likely unrelated to the upgrade pre-check but could indicate other underlying issues. It's good to keep an eye on these, but they probably aren't blocking the upgrade.
Unsupported Server Configurations: The upgrade pre-check also fails for other reasons, such as having read replicas, logical replication slots, or using SSDv2 storage [, ]. You've already confirmed your storage is not the issue, but it's good to be aware of these other blockers.
By removing the dblink
extension, you should be able to resolve the pre-check failure and proceed with your upgrade to PostgreSQL 16.
Best Regards,
Jerald Felix .