mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-03 19:32:43 +02:00
Remove operator checks that prevent PG major version upgrade (#1160)
* remove checks that prevent major version upgrade Co-authored-by: Sergey Dudoladov <sergey.dudoladov@zalando.de>
This commit is contained in:
co-authored by
Sergey Dudoladov
parent
d76419565b
commit
4f3bb6aa8c
@@ -11,17 +11,15 @@ switchover (planned failover) of the master to the Pod with new minor version.
|
||||
The switch should usually take less than 5 seconds, still clients have to
|
||||
reconnect.
|
||||
|
||||
Major version upgrades are supported via [cloning](user.md#how-to-clone-an-existing-postgresql-cluster).
|
||||
The new cluster manifest must have a higher `version` string than the source
|
||||
Major version upgrades are supported either via [cloning](user.md#how-to-clone-an-existing-postgresql-cluster)or in-place.
|
||||
|
||||
With cloning, the new cluster manifest must have a higher `version` string than the source
|
||||
cluster and will be created from a basebackup. Depending of the cluster size,
|
||||
downtime in this case can be significant as writes to the database should be
|
||||
stopped and all WAL files should be archived first before cloning is started.
|
||||
|
||||
Note, that simply changing the version string in the `postgresql` manifest does
|
||||
not work at present and leads to errors. Neither Patroni nor Postgres Operator
|
||||
can do in place `pg_upgrade`. Still, it can be executed manually in the Postgres
|
||||
container, which is tricky (i.e. systems need to be stopped, replicas have to be
|
||||
synced) but of course faster than cloning.
|
||||
Starting with Spilo 13, Postgres Operator can do in-place major version upgrade, which should be faster than cloning. To trigger the upgrade, simply increase the version in the cluster manifest. As the very last step of
|
||||
processing the manifest update event, the operator will call the `inplace_upgrade.py` script in Spilo. The upgrade is usually fast, well under one minute for most DBs. Note the changes become irrevertible once `pg_upgrade` is called. To understand the upgrade procedure, refer to the [corresponding PR in Spilo](https://github.com/zalando/spilo/pull/488).
|
||||
|
||||
## CRD Validation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user