Move to a newer minor version of PGD (for example, 6.3 to 6.4), without changing your Postgres version, using one of three approaches: full downtime, a rolling upgrade in place, or a rolling upgrade that replaces nodes. A minor version upgrade doesn't need the routing-tool migration a major version upgrade does, since minor versions within the same major release stay compatible at the consensus protocol level. All it takes is installing the new PGD packages and restarting Postgres.
Note
If you're also upgrading Postgres to a new minor version at the same time, see Upgrading Postgres and PGD together instead.
Upgrading with full downtime
Choose this approach when a maintenance window is acceptable and finishing quickly matters more than staying online. See Choosing between a rolling and full-downtime upgrade for the trade-offs against the two rolling approaches described below.
Stop Postgres on every node:
sudo systemctl stop postgresYou can run this step one node at a time, but you must wait for each node to shut down cleanly before moving to the next. Monitor progress with
sudo journalctl -u postgres -f.Install the new PGD packages for your Postgres version on every node, for example:
sudo apt install edb-pgd6-expanded-pg<postgres_version>
Start Postgres on every node:
systemctl start postgres
PGD upgrades to the new version on start.
Confirm the new version took effect on every node:
SELECT bdr.bdr_version();
Then check
pgd nodes listfor overall cluster health.
Fencing isn't needed, since nothing is serving traffic during a full-downtime upgrade.
Upgrading with a rolling upgrade, in place
For each node, one at a time:
Fence the node, so it can't become the write leader until the upgrade is complete:
pgd node <node_name> set-option route_fence true
Stop Postgres:
sudo systemctl stop postgresMonitor progress with
sudo journalctl -u postgres -f.Install the new PGD packages for your Postgres version, for example:
sudo apt install edb-pgd6-expanded-pg<postgres_version>
Start Postgres. PGD upgrades to the new version on start:
systemctl start postgres
Unfence the node, then confirm it's healthy before moving to the next one:
pgd node <node_name> set-option route_fence false
Confirm the new version took effect with SELECT bdr.bdr_version();, and check your
monitoring as usual after upgrading a node.
Upgrading with a rolling upgrade, by replacing nodes
Instead of upgrading a node in place, join a new node that already has the new PGD version installed, then part and drop one of the existing nodes. Use this approach if you're also replacing hardware or a base image at the same time as the minor version bump.
Provision a new node with the new PGD minor version packages already installed.
Join the new node to the cluster using a logical join:
pgd node <node_name> setup --dsn "<new_node_dsn>" --cluster-dsn "<existing_node_dsn>" -D <pg_data>
Don't use
bdr_init_physical, it requires the source and joining node to run the same PGD version, so it can't be used across a version change. See thepgd node setupcommand reference for the full set of options.Wait for the new node to catch up with the cluster before routing traffic to it, then confirm it's healthy:
pgd nodes list
Update your application's connection configuration to include the new node once it's ready to take traffic.
Part one of the existing nodes, then decommission it:
pgd node <node_name> part
Repeat for each remaining node, one at a time, until the whole cluster is on the new version.