Upgrading PGD clusters with TPA#
To perform a major version upgrade of Postgres, see In-place Postgres major version upgrades .
- You can read more about the capabilities of TPA upgrades in
Upgrading your cluster in the TPA documentation.
Minor and major PGD upgrades#
TPA automatically manages minor version upgrades of PGD.
Major version upgrades of PGD require changes to the TPA config.yml
file, which contains the deployment configuration.
- When upgrading to PGD 5 from previous PGD major versions, you can use
tpaexec reconfigure . This command helps you make appropriate modifications to
your deployment configuration.
The reconfigure command requires settings for architecture (only
PGD_Always_ON and PGD Proxy routing to run. Remember to back up your
deployment configuration before running, and use the --describe and
--output options to preview the reconfiguration.
Pre-requisites#
The cluster configuration directory created when TPA deployed your PGD cluster.
If performing a major version upgrade of PGD, ensure that
tpaexec reconfigurewas run and appropriate configuration changes were made.
Upgrading#
Run:
tpaexec upgrade clustername
Where clustername is the name of the cluster and the path to the
cluster configuration directory. By default, TPA upgrades each node of
the cluster to the latest minor versions of the software the nodes were
configured with.
TPA’s automated rolling upgrade procedure#
TPA first tests the cluster and then the nodes.
Each node is then isolated from the cluster, upgraded, and returned to operation within the cluster.
TPA upgrades - step by step#
Checks that all preconditions for upgrading the cluster are met.
For each instance in the cluster: - Checks that it has the correct repositories configured. - Checks that the required Postgres packages are available in those repositories. - For each BDR node in the cluster, one at a time: - Fences the node off to ensure that pgd-proxy doesn’t send any connections to it. - Stops, updates, and restarts Postgres. - Unfences the node so it can receive connections again. - Updates pgbouncer, pgd-proxy, and pgd-cli, as applicable for this node.