38.7. 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. The information about the upgrade availability and the upgrade progress is displayed on the cluster Overview page.
This instruction 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 node and then moves follower nodes from the old cluster to the new one. The new cluster receives all updates from the old cluster via logical replication, while the old cluster leader node remains accepting client connections during almost the entire migration process. A minimal downtime is required to reconfigure your client connections to target the new cluster.
The migration process includes the following steps:
Examine the prerequisites and make all required preparations.
At this stage, client applications can continue operation with the old cluster leader node.
At this stage, both the old and new clusters are temporarily unavailable for client connections until you reconfigure your client applications to target the new cluster.
38.7.1. Prerequisites #
Schedule a maintenance window to perform migration.
Although the old cluster leader node remains operational and continues accepting client connections during almost the entire migration process, at the end of migration you must disable workloads on the old cluster leader node and reconfigure your application and client connections to target the new cluster. This action requires minimal downtime of cluster operation.
Ensure that all prerequisites and considerations are met.
Prepare a separate additional server that will be used to deploy the leader node 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 nodes and the additional server, install Postgres Pro Enterprise 18.X.
For the old cluster leader node, perform the following actions:
Set the wal_level configuration parameter to
logical.Set the biha.nquorum configuration parameter to a value higher than the number of nodes to ensure there is no switchover during migration.
Consider all logical replication restrictions during the entire migration process.
Restrict DCL and DDL operations during the entire migration process.
Ensure that primary keys are present in all tables being updated.
38.7.2. Starting Migration #
In the navigation panel, go to Infrastructure → Clusters.
Click
→ Upgrade to version
version_numbernext to the cluster.Specify parameters of the new cluster leader node (parameters marked with an asterisk are required):
Server: The additional server prepared in advance to host the new cluster leader node.
Logical replica directory: The
PGDATAdirectory 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 node. The directory must not exist.Upgraded leader directory: The
PGDATAdirectory of the new cluster leader node running Postgres Pro Enterprise 18.X. The directory must not exist.Connection port of the upgraded leader: The port of the new cluster leader node for incoming connections.
BiHA port of the upgraded leader: The port of the new cluster leader node used to exchange service information between nodes.
Specify parameters for moving the follower nodes:
Use the same path to the data directory for all followers: Specifies whether to use identical paths to data directories for all follower nodes.
Upgraded follower directory: The directory where the follower node 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 node.
Click Next.
(Optional) Enable Go to operation page after update starts checkbox if you want PPEM to redirect you to the cluster upgrade operation page where you can monitor the progress.
To navigate there manually, in the navigation panel, go to Task console → Operations and click the status of the required operation.
When all checks are passed, click Start upgrade.
The migration process starts.
At this stage, client applications can continue operation with the old cluster leader node.
When the cluster upgrade operation status changes to Completed, complete migration.
38.7.3. Completing Migration #
During migration, the new cluster named upgraded running the upgraded Postgres Pro Enterprise version is displayed in the table of clusters. All nodes from the old cluster, except the old cluster leader node, are moved to the new cluster. The old cluster now contains only the old leader node which continues operation and accepts client connections until you complete the migration process manually. old_cluster_name
To complete migration:
In the navigation panel, go to Infrastructure → Clusters.
Ensure that the current operation of the old cluster is Awaiting upgrade completion.
Disconnect your client applications from the old cluster.
At this stage, both the old cluster and the new cluster are not available for client connections.
Click
→ Complete upgrade next to the old cluster.
(Optional) To monitor the progress of the cluster upgrade completion operation, in the navigation panel, go to Task console → Operations and click the status of the required operation.
When the status of the cluster upgrade finishing operation changes to Completed, reconfigure your client applications to target the new cluster.
The old cluster, which now contains only the old leader node, remains in the table of clusters. You can delete it if required.