Skip to content

Commit cabc51d

Browse files
fix(rdb): add upgrade info (#4768)
1 parent c1b227c commit cabc51d

File tree

3 files changed

+84
-12
lines changed

3 files changed

+84
-12
lines changed

menu/navigation.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2309,6 +2309,10 @@
23092309
"label": "Upgrade Database Instance engine version",
23102310
"slug": "upgrade-version"
23112311
},
2312+
{
2313+
"label": "Enable High Availability",
2314+
"slug": "enable-high-availability"
2315+
},
23122316
{
23132317
"label": "Apply scheduled maintenance",
23142318
"slug": "apply-maintenance"
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
meta:
3+
title: How to enable High Availability
4+
description: Learn how to switch a standalone node to high availability mode for your Database Instance.
5+
content:
6+
h1: How to enable High Availability
7+
paragraph: Step-by-step instructions for converting a standalone node to high availability mode.
8+
tags: managed-database high-availability node-configuration database-instance
9+
dates:
10+
validation: 2025-04-02
11+
posted: 2025-04-02
12+
categories:
13+
- managed-databases
14+
- database-instance-management
15+
---
16+
17+
You define your Database Instance's node configuration upon its [creation](/managed-databases-for-postgresql-and-mysql/how-to/create-a-database). Two node configuration modes are available with PostgreSQL or MySQL Database Instances.
18+
19+
- **High Availability**: creates a secondary Instance with an up-to-date replica of the database. If the primary Instance fails, the secondary takes over requests.
20+
- **Standalone**: a standalone database provisioned on a single node.
21+
22+
If you are standalone mode, you can change the node configuration to High Availability in the console anytime.
23+
24+
<Message type="important">
25+
Once you upgrade to the High Availability mode, you cannot revert to standalone.
26+
</Message>
27+
28+
<Macro id="requirements" />
29+
30+
- A Scaleway account logged into the [console](https://console.scaleway.com)
31+
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
32+
- A [PostgreSQL or MySQL Database Instance](/managed-databases-for-postgresql-and-mysql/how-to/create-a-database/) in standalone mode.
33+
34+
1. Click **PostgreSQL and MySQL** under **Managed Databases** on the side menu. A list of your Database Instances displays.
35+
2. Click the name of the Database Instance you want to configure. Your database's **Overview** page displays.
36+
3. Scroll down to the **Node settings** section. Then, click **Activate High Availability**.
37+
4. Review the new estimated cost.
38+
5. Click **Activate**.
39+
40+
<Message type="note">
41+
The action of changing the node configuration will perform a rolling upgrade of your Database Instance. During this process, the Database Instance will be unavailable for several tens of seconds.
42+
</Message>
43+

pages/managed-databases-for-postgresql-and-mysql/how-to/upgrade-version.mdx

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ categories:
1717
If your database engine is outdated, you can upgrade the version to the latest one anytime via the Scaleway console.
1818

1919
<Message type="note">
20-
You must upgrade your engine version if your Database Instance uses an End of Life engine version that is no longer maintained.
20+
You must upgrade your engine version if your Database Instance uses an End of Life engine version that is no longer maintained.
2121
</Message>
2222

2323
<Message type="important">
@@ -32,6 +32,32 @@ The version upgrade is only available for:
3232
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
3333
- A [PostgreSQL Database Instance](/managed-databases-for-postgresql-and-mysql/how-to/create-a-database/) running on an outdated engine version
3434

35+
## How to remove incompatible data types
36+
37+
Before upgrading to a newer major PostgreSQL version, you must remove any data types incompatible with the `pg_upgrade` tool.
38+
39+
The `reg*` data type, for example, cannot be persisted by `pg_upgrade`.
40+
41+
Run the following command in your Database Instance to identify all instances of the `reg*` data type:
42+
43+
```sql
44+
SELECT count(*) FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n, pg_catalog.pg_attribute a
45+
WHERE c.oid = a.attrelid
46+
AND NOT a.attisdropped
47+
AND a.atttypid IN ('pg_catalog.regproc'::pg_catalog.regtype,
48+
'pg_catalog.regprocedure'::pg_catalog.regtype,
49+
'pg_catalog.regoper'::pg_catalog.regtype,
50+
'pg_catalog.regoperator'::pg_catalog.regtype,
51+
'pg_catalog.regconfig'::pg_catalog.regtype,
52+
'pg_catalog.regdictionary'::pg_catalog.regtype)
53+
AND c.relnamespace = n.oid
54+
AND n.nspname NOT IN ('pg_catalog', 'information_schema'); 
55+
```
56+
57+
We recommend you remove the identified instances before continuing.
58+
59+
## How to upgrade the engine version
60+
3561
1. Click **PostgreSQL and MySQL** under **Managed Databases** on the side menu. A list of your Database Instances displays.
3662
2. Click the name of the database whose engine you want to upgrade. The Database Instance information page appears.
3763
3. Click **Upgrade** under **Database engine**. A pop-up appears.
@@ -40,23 +66,22 @@ The version upgrade is only available for:
4066
- **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.
4167
- **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.
4268

43-
44-
<Message type="important">
45-
When you upgrade to a new version, there is no synchronization between the source and target Database Instances. To avoid data loss, we recommend you stop any write operations running on your applications during the upgrade. If you let them run during the process, the data will be stored only in the source Database Instance.
46-
</Message>
47-
4869
<Message type="important">
49-
When you upgrade to a new version, Database Instance advanced settings are synced as far as they are still available on the new database engine version.
70+
When you upgrade to a new version:
71+
- There is no synchronization between the source and target Database Instances. To avoid data loss, we recommend you stop any write operations running on your applications during the upgrade. If you let them run during the process, the data will be stored only in the source Database Instance.
72+
- Your Database Instances in [High Availability (HA)](/managed-databases-for-postgresql-and-mysql/concepts/#high-availability) mode will migrate to a standalone Instance. To maintain your HA mode, you must manually [enable HA](/managed-databases-for-postgresql-and-mysql/how-to/enable-high-availability) after the upgrade is complete. The same applies when upgrading [Read Replicas](/managed-databases-for-postgresql-and-mysql/how-to/create-read-replica).
73+
- Database Instance [advanced settings](/managed-databases-for-postgresql-and-mysql/how-to/configure-advanced-settings) are synced as long as they are still available on the new database engine version.
5074
</Message>
5175

52-
<Message type="note">
53-
Follow the [migrating endpoints via the CLI](/managed-databases-for-postgresql-and-mysql/api-cli/migrating-endpoints/) procedure to quickly migrate your endpoints. You can use this procedure to revert the migration anytime. <br /><br />
54-
Keep in mind that reverting the endpoint will not affect the data stored on the databases. This means that if some entries were added to the upgraded database, they will not be added back to the old version when you change the endpoints.
76+
<Message type="tip">
77+
Before performing an engine upgrade migration, we recommend testing the process in a "dry-run". This allows you to estimate the migration time and verify its success without affecting your source instance. To do so:
78+
- Run the migration without checking the "migration endpoint" flag. If the test is successful, you can then proceed with the actual migration. Follow the [migrating endpoints via the CLI](/managed-databases-for-postgresql-and-mysql/api-cli/migrating-endpoints/) procedure to migrate your endpoints after the upgrade. You can use the same CLI command to revert the endpoint migration anytime.
79+
- Keep in mind that reverting the endpoint will not affect the data stored on the databases. This means that if some entries were added to the upgraded database, they will not be added back to the old version when you change the endpoints.
5580
</Message>
5681
4. Click **Upgrade version**. A new Database Instance is created.
5782

5883
<Message type="important">
59-
On PostgreSQL, engine extensions are handled and upgraded automatically during the upgrade process.
84+
- In PostgreSQL major upgrades, the `pgaudit` and `pg_stat_statements` [engine extensions](/managed-databases-for-postgresql-and-mysql/reference-content/postgresql-extensions) will be removed. You must reinstall these extensions on each database they are installed once the upgrade is complete.
85+
- If you are upgrading to PG16, we recommend you [reset your user passwords](/managed-databases-for-postgresql-and-mysql/how-to/add-users) from the console or using `psql`, [PostrgreSQL's CLI](https://www.postgresql.org/docs/current/app-psql.html#APP-PSQL-META-COMMAND-PASSWORD). PG16 uses the **SCRAM-SHA-256** format to store passwords. The previous versions' password format is no longer supported in PG16. You can re-save your passwords after the upgrade and they will be stored in the correct format automatically.
6086
</Message>
6187

62-

0 commit comments

Comments
 (0)