You upgrade rdspg-lab-db in two steps:
| Step | From | To | What RDS does |
|---|---|---|---|
| Minor version upgrade | 17.9 | 17.11 | Takes a snapshot, upgrades the engine, and restarts the database |
| Major version upgrade | 17.11 | 18.6 | Takes a pre-upgrade snapshot, runs pg_upgrade, switches to the default.postgres18 parameter group, and restarts the database |
During each upgrade the database is unavailable for a few minutes.
If the DB instance has read replicas, upgrade them before the source instance for a minor version upgrade. For a major version upgrade, RDS upgrades the in-Region read replicas together with the source instance.
Choose rdspg-lab-db, then choose Modify (as in step 2.1). On the Modify DB instance: rdspg-lab-db page, in Settings:

Scroll down to Maintenance:

Choose Continue. On the summary page:

With Apply during the next scheduled maintenance window, RDS waits until the maintenance window to apply the change. In this workshop you apply it immediately so you can see the result.
The Status of rdspg-lab-db changes to Backing-up, then Upgrading.

After about 10 minutes, the Status returns to Available. Open the Logs & events tab:

Choose Modify again. In Settings:

Scroll down to Additional configuration > Database options:
default.postgres18. Each major version needs a parameter group of its own family.
If you use a custom parameter group, create a copy for the new family (for example postgres18) and choose it here. You work with custom parameter groups in chapter 6.
Choose Continue:

On the same page:
default.postgres17 → default.postgres18.
The Status changes to Upgrading. A major version upgrade takes about 15 to 20 minutes.

Before a major version upgrade, RDS runs a pre-check and automatically takes a snapshot named rds:preupgrade-rdspg-lab-db-17-11-to-18-6-.... If the upgrade fails, you can restore the database from this snapshot.