Fixed
Status Update
Comments
ro...@google.com <ro...@google.com> #2
When updating the cube extension in Cloud SQL PostgreSQL major version 14, users may encounter another error as follows:
postgres=> alter extension cube update to '1.4';
ERROR: duplicate key value violates unique constraint "pg_amop_fam_strat_index"
Description
Problem you have encountered:
In a Cloud SQL PostgreSQL instance of major version 9.6, 10, or 11, when a database user tries to upgrade the PostGIS extension, the following error happens:
What you expected to happen:
The upgrade should succeed without error.
Steps to reproduce:
Execute
ALTER EXTENSION postgis UPDATE TO '3.0.3'
Other information (workarounds you have tried, documentation consulted, etc):
In Cloud SQL PostgreSQL, before users upgrade the database major version in-place, one required preparation is to update the PostGIS extension. PostgreSQL 9.6 to 11 users with an old PostGIS extension will encounter this error during upgrade.