Skip to content
Install

Upgrade Postgres

The Postgres project supports each major version for a fixed period, so a long-lived database eventually needs a major upgrade. Orchard runs the upgrade for you: it can rehearse on a copy first, takes a checkpoint, and puts the database back on the previous version if the upgrade fails. The database is offline during the upgrade step.

Minor releases contain bug and security fixes only. To apply one, select Update to <version> on the database’s Security tab, or run orchard db update <dbId>. Instances restart one at a time, standbys first. To have Orchard apply minor releases for you, an organization admin turns on Apply minor updates automatically under Organization settings > Database defaults. Orchard then updates a few databases each morning (UTC). An operator can turn automatic updates off for the whole instance.

  • Edit access to the project: the Admin or Member project role.
  • A dedicated database that is running and healthy.
  • No other restore or upgrade running on the database.
  1. Open the database.
  2. Go to Security.

The Version and security card shows the running version and its support date. It also lists known vulnerabilities from postgresql.org.

  1. Open the database.
  2. Go to Security.
  3. Select Upgrade to Postgres <version>. The button shows the newest version.
  4. In To, select the target version.
  5. Keep Rehearse on a copy first turned on. This adds a few minutes before the upgrade.
  6. Select Upgrade to Postgres <version>.

To follow the upgrade, go to the Backups tab.

  1. If rehearsal is on, Orchard upgrades a copy of the database to check that the upgrade works.
  2. Orchard takes a checkpoint.
  3. Orchard upgrades the database. The database is offline during this step.
  4. Orchard runs ANALYZE.
  5. If backup storage is set, Orchard starts a new backup.

If the upgrade fails, Orchard returns the database to the previous version.

If a previous rehearsal measured the upgrade time, the upgrade dialog shows that time as the expected offline period.

Version and security shows a warning when support for the running major version ends soon, and an error after support ends. After that date, the major version receives no more security fixes.

To resolve the warning or the error, upgrade to a newer major version.