Azure PostgreSQL Flexible Server Consecutive Major Version Upgrade Issue - Version 15 to 16/17

DHAVAL R PATEL 46 Reputation points
2025-09-15T22:17:27.2466667+00:00

Azure PostgreSQL Flexible Server upgrade from version 15 to 16 fails with "major version upgrade failed precheck" error, despite a successful upgrade from version 14 to 15 the previous day.

Environment Details

  • Service: Azure PostgreSQL Flexible Server
  • Current Version: PostgreSQL 15
  • Target Version: PostgreSQL 16
  • Storage: 180 GB available
  • Extensions: pg_cron, postgis (no unsupported extensions)

Upgrade History

  1. Successful: Version 14 → 15
  2. Failed: Version 15 → 16 (fails with precheck error)

Errors:

  • "The major version upgrade failed precheck."
{
  "code": "DeploymentFailed",
  "message": "At least one resource deployment operation failed. Please list deployment operations for details.",
  "details": [
    {
      "code": "ResourceDeploymentFailure",
      "message": "The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'."
    }
  ]
}

 

o   Extension Auto-Installation: dblink extension gets automatically added after first upgrade, then blocks subsequent upgrades

o   Azure MISE Worker Failures: Continuous background worker failures in logs (but doesn't affect functionality)

 

Is there a known limitation with consecutive major version upgrades on the same Azure PostgreSQL Flexible Server? Are there any server-level configurations that can be adjusted to allow consecutive major version upgrades?

 

Azure Database for PostgreSQL
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jerald Felix 5,875 Reputation points
    2025-09-16T04:08:00.2533333+00:00

    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:

    1. 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 .

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.