Roll back a major upgrade
Rolls the service back to the earlier PostgreSQL major after a major upgrade in Copy mode (ADR 2026-10-22 D8), until Cleanup. Every write since the start of the new major is lost, and each change of the service configuration since then. The backups of the new major stay in the repository until they expire; a fork from the newest one keeps the writes. The console stops the new major on each server, puts back patroni.yml and the stanza files of the earlier major, runs stanza-upgrade with its paths, removes the cluster key from the DCS, and starts the earlier major on the server that led the window, which becomes the leader. Then the licence grant of the old cluster comes back (an air-gapped console waits for a pasted grant on POST /database-services/{id}/major-upgrade/grant first), pgaudit is made again, the clients start, the files of the new major go, the replicas that kept their data directory of the earlier major start, and a full backup and the rebuild of the other replicas follow. The workflow is upgrade_major_rollback. A rollback that stopped after its point of no return continues on a new call. 409 after a Link or Swap upgrade, after Cleanup, when the server that led the window left the service, when the pin moved, or when another action runs. The workflow fails before any change when that server has no data directory of the earlier major in the state “shut down”.
/api/v1/database-services/{id}/major-upgrade/rollbacktse_sessionAPI key · cookierequiredidstringrequiredAccepted
workflow_idstringrequiredError
codestringStable code of the refusal, when the route has codes
detailsstring[]Additional detail, e.g. per-field validation failures
errorstringrequiredHuman-readable error message