Skip to content

Commit

Permalink
Merge pull request #5345 from EnterpriseDB/docs/pgd/fix/DOCS-160-erro…
Browse files Browse the repository at this point in the history
…r-on-pgd-major-version-upgrades-using-tpa-pa

DOCS-160 - Fix error in tpa upgrades section
  • Loading branch information
djw-m authored Mar 12, 2024
2 parents 953411d + 46f6b33 commit 8d1d97b
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions product_docs/docs/pgd/5/upgrades/tpa_overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,32 @@ title: Upgrading PGD clusters with TPA
---

!!! Note No Postgres major version upgrades
TPA doesn't currently support major version upgrades of Postgres. The techniques outlined here can perform minor version upgrades of the PGD software and minor version upgrades of Postgres. To perform a major version upgrade of Postgres, see [In-place Postgres major version upgrades](bdr_pg_upgrade).
TPA doesn't currently support major version upgrades of Postgres.

To perform a major version upgrade of Postgres, see [In-place Postgres major version upgrades](bdr_pg_upgrade).
!!!

If you used TPA to install your cluster, you can also use TPA to upgrade your cluster. You can read more, in detail, about the capabilities of TPA upgrades in [Upgrading your cluster](/tpa/latest/tpaexec-upgrade/) in the TPA documentation.
If you used TPA to install your cluster, you can also use TPA to upgrade it. The techniques outlined here can perform minor and major version upgrades of the PGD software. They can also perform minor version upgrades of Postgres.

You can read more about the capabilities of TPA upgrades in [Upgrading your cluster](/tpa/latest/tpaexec-upgrade/) in the TPA documentation.

!!! Warning Always test first
If possible, always test upgrade processes in a QA environment first to ensure there are no unexpected factors to be taken into account. TPA's ability to reproducibly deploy a PGD configuration makes it much easier to build a test environment to work with.
If possible, always test upgrade processes in a QA environment first. This should help ensure that there are no unexpected factors that should be taken into account. TPA's ability to reproducibly deploy a PGD configuration makes it much easier to build a test environment to work with.
!!!

## Minor and major PGD upgrades

Minor version upgrades of PGD are managed automatically
TPA automatically manages minor version upgrades of PGD.

Major version upgrades of PGD will require changes to the TPA `config.yml` file which contains the deployment configuration.
Major version upgrades of PGD require changes to the TPA `config.yml` file, which contains the deployment configuration.

If you are upgrading to PGD 5, from previous PGD major versions, you will be able to use [`tpaexec reconfigure`](/tpa/latest/reference/tpaexec-reconfigure/) to help you make appropriate modifications to your deployment configuration.
When upgrading to PGD 5 from previous PGD major versions, you can use [`tpaexec reconfigure`](/tpa/latest/reference/tpaexec-reconfigure/). This command helps you make appropriate modifications to your deployment configuration.

The `reconfigure` command will require 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.
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 that was created when TPA deployed your PGD cluster.
* The cluster configuration directory created when TPA deployed your PGD cluster.

* If performing a major version upgrade of PGD, ensure that `tpaexec reconfigure` has been run and [appropriate configuration changes](#minor-and-major-pgd-upgrades) have been made.

Expand All @@ -39,17 +43,23 @@ tpaexec upgrade clustername

Where **clustername** is the name of the cluster and the path to the cluster configuration directory. By default, TPA will upgrade each node of the cluster to the latest minor versions of the software the nodes were configured with.

!!! Note TPA's automated rolling upgrade procedure

TPA will test first the cluster then the nodes. Each node will then be isolated from the cluster, upgraded and then returned to operation within the cluster.
## 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 and that the required postgres packages are available in them.
* For each instance in the cluster
* Checks that it has the correct repositories configured
* Check 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.
* 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.

!!!

1 comment on commit 8d1d97b

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.