google-cloud-sql

Failing to upgrade postgres 11 instance to postgres 15 instance on Google cloud Sql


I am running postgres 11 in Google Cloud Sql. It's the standard Enterprise edition. The only 2 extensions I've added was citext and dblink.

My process is that I clone the main instance to a new instance, and then I attempt to run the upgrade process to postgres 15. It fails every time, and I can't figure out why.

The only error(s) I see in the logs is

  1. user=cloudsqladmin ERROR: function postgis_full_version() does not exist at character 8
  2. db=cloudsqladmin,user=cloudsqladmin FATAL: terminating connection due to administrator command"

I do not have the postgis extension installed on any of my database's so I don't understand why I'm seeing this error? In addition, just to see if it would work, I installed postgis extension on all the db's and tried again, only to see this error.

Strangely, I had previously upgraded my development postgres 11 instance to postgres 15 without issue, so I'm really confused.

Any Google Postgres people out there that can help me understand why I'm getting this error and how I can resolve?

UPDATE To see if it was a script error, I created a fresh new instance with Postgres 12 and the I tried the update to postgres 15 process.

In the logs, I see the exact same error of : function postgis_full_version() does not exist at character 8, however, the upgrade process did successfully complete somehow, even with this reported error.

So, maybe those aren't the errors causing it to fail. All the other reported errors in the logs don't provide any detail of why it's failing..


Solution

  • I’m posting this answer as a community wiki for better community visibility.

    As you stated, when upgrading the instance we need to use the bigger instance class to get clone operation done successfully, and then request for instance class reduction once successful. Also it is recommended to test this workaround in the test instance before applying this in the production instance.

    As per documentation, Generally this kind error: db=cloudsqladmin,user=cloudsqladmin FATAL: terminating connection due to administrator command occurs by some of the queries being run on the instance of Cloud SQL. Also you can find the complete error from the logs explorer by following the Documentation.

    For

    The Google script/updater should have really listed that error in the logs...it did not

    Raise an issue at Public Issue Tracker explaining your use case and requesting for Google script/updater should list the error in the logs.