Upgrade a PostgreSQL instance

Upgrade the instance to a newer PostgreSQL major version. We create a snapshot first. The upgrade can't be undone. The instance returns to running when the upgrade is done, and also when it stops partway. engine_version can show the new version before the upgrade has finished, so check status_message, your databases and your replicas to confirm the upgrade worked.

POST https://{availability_zone}.betterstackcloud.com/v1/postgres/{id}/upgrade
id string required

The ID of the PostgreSQL instance to upgrade.

Authorization string required

Bearer $TOKEN

Content-Type string

application/json

engine_version string required

The major version to upgrade to, one of the instance's available_engine_versions.

202 Accepted
{
  "pre_upgrade_snapshot_id": "123456789"
}

Returns the PostgreSQL instance.

pre_upgrade_snapshot_id string

The ID of the snapshot we created before the upgrade.