Error Updating Postgresql Database Version

Todd Player 0 Reputation points
2026-07-30T17:35:04.09+00:00

Hello,:

I am trying to upgrade a postgresql instance major version and getting this error:

{

"code": "MajorVersionUpgradeFailedPrecheck",

"message": "The major version upgrade failed precheck. Upgrading with certain extensions in schema not in search_path is disallowed. Found extension postgis_topology in schema topology in database actionhub_prod not in search_path "$user", public."

}

The database has PostGIS installed and I have run the normal troubleshooting to determine the search_path is correct. A show search_path query returns: """$user""", public, topology. Checking for roles that could override that seems to be the issue. The azuresu has a different search path but I cannot update it because my admin account is not a superuser account. An AI search suggests the only one that can fix this is Microsoft support so I'm reaching out to get connected.

Azure Database for PostgreSQL
0 comments No comments

1 answer

Sort by: Most helpful
  1. Pilladi Padma Sai Manisha 11,705 Reputation points Microsoft External Staff Moderator
    2026-07-30T17:52:44.3566667+00:00

    Hi @Todd Player
    Thankyou for reaching microsoft Q&A!
    The error indicates that the major version upgrade precheck is evaluating the effective search_path for the postgis_topology extension and is finding that the topology schema is not included.

    For Azure Database for PostgreSQL Flexible Server, Microsoft requires the server-level search_path to explicitly include the schemas used by PostGIS and its dependent extensions before performing an in-place major version upgrade.

    Although your current session returns:

    "$user", public, topology

    the upgrade precheck reports:

    "$user", public

    This suggests that the value being evaluated by the upgrade service may differ from the session-level value you are checking, potentially due to a role-level or server-level configuration.

    As a next step, please verify the effective configuration at both the server and role levels, for example:

    SHOW search_path;
    
    SELECT rolname, rolconfig
    FROM pg_roles
    WHERE rolname IN ('azuresu', current_user);
    

    Also verify where the extension is installed:

    SELECT extname, n.nspname AS schema_name
    FROM pg_extension e
    JOIN pg_namespace n ON e.extnamespace = n.oid
    WHERE extname = 'postgis_topology';
    

    If postgis_topology is confirmed to be in the topology schema, the server search_path should include topology (and the other applicable PostGIS extension schemas) before retrying the upgrade.

    Because azuresu is an Azure-managed role and cannot be modified by the customer administrator, if the upgrade precheck continues to report the same mismatch after the customer has configured the server-level search_path, this would require investigation by Microsoft Support/engineering to determine why the upgrade precheck is resolving a different effective search_path.

    Please provide the output of the above queries, along with the PostgreSQL source and target major versions, so we can further assess the upgrade precheck failure.

    Was this answer helpful?

    0 comments No comments

Your answer

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