How to upgrade your Database Instance engine version
If your database engine is outdated, you can upgrade the version to the latest one anytime via the Scaleway console.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- A PostgreSQL Database Instance running on an outdated engine version
How to remove incompatible data types
Before upgrading to a newer major PostgreSQL version, you must remove any data types incompatible with the pg_upgrade
tool.
The reg*
data type, for example, cannot be persisted by pg_upgrade
.
Run the following command in your Database Instance to identify all instances of the reg*
data type:
SELECT count(*) FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n, pg_catalog.pg_attribute a
WHERE c.oid = a.attrelid
AND NOT a.attisdropped
AND a.atttypid IN ('pg_catalog.regproc'::pg_catalog.regtype,
'pg_catalog.regprocedure'::pg_catalog.regtype,
'pg_catalog.regoper'::pg_catalog.regtype,
'pg_catalog.regoperator'::pg_catalog.regtype,
'pg_catalog.regconfig'::pg_catalog.regtype,
'pg_catalog.regdictionary'::pg_catalog.regtype)
AND c.relnamespace = n.oid
AND n.nspname NOT IN ('pg_catalog', 'information_schema');
We recommend you remove the identified instances before continuing.
How to upgrade the engine version
-
Click PostgreSQL and MySQL under Databases on the side menu. A list of your Database Instances displays.
-
Select the geographical region of the Instance you want to manage from the drop-down.
-
Click the name of the database whose engine you want to upgrade. The Database Instance information page appears.
-
Click Upgrade under Database engine. A pop-up appears.
-
Select the upgrade method. Two methods are available:
- Upgrade only: This method has no impact on your original Database Instance. Your Database Instance will remain available with its original endpoint and will continue to be billed.
- Upgrade and switch incoming traffic: With this method, your endpoint is migrated to the new Database Instance automatically. This option will create a clone of your Database Instance, and will automatically migrate the endpoint to the new Instance. The original Database Instance remains available and will continue to be billed. The endpoint will be deleted from the original Database Instance.
-
Click Upgrade version. A new Database Instance is created.