34.6. Migration of BiHA Clusters #
You can migrate your current BiHA cluster running Postgres Pro Enterprise 17.X (but not higher than 17.7) to the latest version of Postgres Pro Enterprise 18.
For clarity, this procedure refers to the current BiHA cluster you are migrating as the “old cluster” and the upgraded BiHA cluster as the “new cluster”.
During migration, PPEM creates the new cluster leader and then moves followers from the old cluster to the new one. The new cluster receives all updates from the old cluster via logical replication. When migration is complete and high availability is configured, you can enable workloads on the new cluster.
34.6.1. Prerequisites #
Currently, the migration process requires disabling workloads on the old leader before the beginning of migration. Therefore, ensure that you perform the migration procedure during maintenance window.
Ensure that all conditions listed in Prerequisites and Considerations are met.
Prepare a separate additional server that will be used to deploy the leader of the new cluster running Postgres Pro Enterprise 18.X. The operating system and Postgres Pro Enterprise binaries installed on the additional server must be the same as those installed on the nodes of the old cluster.
On all old cluster nodes and the additional server, install Postgres Pro Enterprise 18.X.
For the old leader, fulfill the following:
Disconnect your applications and clients from the old leader to disable writing operations. All workloads on the old leader must be disabled before the beginning of migration.
Set the wal_level value to
logical.Set the biha.nquorum value higher than the number of cluster nodes to ensure there is no switchover during migration.
Consider all logical replication restrictions during the whole migration process.
Restrict DCL and DDL operations during the whole migration process.
Ensure that primary keys are present in all tables being updated.
34.6.2. Migrating a BiHA cluster to Postgres Pro Enterprise 18 #
In the navigation panel, go to Infrastructure → Clusters.
Click
→ Upgrade to Postgres Pro 18 next to the cluster.
Specify parameters for the new cluster leader:
Server: The additional server prepared in advance to host the new cluster leader.
Logical replica data directory: The PGDATA directory of a logical replica running Postgres Pro Enterprise 17.X. This logical replica is further upgraded to Postgres Pro Enterprise 18.X and converted into the new cluster leader. The directory must not exist.
Upgraded leader data directory: The PGDATA directory of the new cluster leader running Postgres Pro Enterprise 18.X. The directory must not exist.
Upgraded leader port: The new cluster leader port for incoming connections.
Upgraded leader BiHA port: The port of the new cluster leader used to exchange service information between nodes.
Specify parameters for followers to move:
Use the same data directory path for all followers: Turn off this toggle if you do not want to use identical paths to data directories for all followers.
Upgraded follower data directory: The directory where the follower running Postgres Pro Enterprise 18.X is moved. The directory must not exist. If paths to data directories are not identical for all nodes, specify the path for each follower.
Click Next.
When all checks are passed, click Start upgrade.
(Optional) To monitor the migration progress, in the navigation panel, go to Tasks console → Operations.
When migration is complete, reconfigure your application and client connections to target the new cluster.