Skip to content

Commit 074d941

Browse files
authored
Merge pull request #273669 from hariramt/task/OnlineUpdate-29April
Online migration docs update
2 parents 976cc55 + ca9b28c commit 074d941

File tree

2 files changed

+28
-29
lines changed

2 files changed

+28
-29
lines changed

articles/postgresql/migrate/migration-service/includes/prerequisites/prerequisites-migration-service-postgresql-online-single-server.md

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: "Prerequisites for the migration service in Azure Database for PostgreSQL (online)"
33
description: Providing the prerequisites of the migration service in Azure Database for PostgreSQL
4-
author: apduvuri
5-
ms.author: adityaduvuri
4+
author: hariramt
5+
ms.author: hariramt
66
ms.reviewer: maghan
77
ms.date: 03/19/2024
88
ms.service: postgresql
@@ -17,6 +17,19 @@ Before you start your migration with migration service in Azure Database for Pos
1717

1818
Source PostgreSQL version should be `>= 9.5`. If the source PostgreSQL version is less than `9.5`, upgrade the source PostgreSQL version to `9.5` or higher before migration.
1919

20+
### Set up Online migration parameters
21+
22+
For Online migration, the replication support should be set to Logical under replication settings of the source PostgreSQL server. In addition, the server parameters `max_wal_senders` and `max_replication_slots` values should be more than the number of Databases that need to be migrated. The parameters can be set in the Azure portal under **Settings->Server Parameters** or configured in the command line using the following commands:
23+
24+
- ALTER SYSTEM SET wal_level = logical;
25+
- ALTER SYSTEM SET max_wal_senders = `number of databases to migrate` + 1;
26+
- ALTER SYSTEM SET max_replication_slots = `number of databases to migrate` + 1;
27+
28+
Ensure that there are no **long running transactions**. Long running transactions don't allow creation of replication slots. The creation of a replication slot will succeed if all long running transactions are committed or rolled-back. You'll need to restart the source PostgreSQL server after completing all the Online migration prerequisites.
29+
30+
> [!NOTE]
31+
> For online migration with Azure Database for PostgreSQL single server, the Azure replication support is set to logical under the replication settings of the single server page in the Azure portal.
32+
2033
### Target setup
2134

2235
- Azure Database for PostgreSQL must be set up in Azure before migration.
@@ -25,18 +38,9 @@ Source PostgreSQL version should be `>= 9.5`. If the source PostgreSQL version i
2538

2639
- For detailed instructions on creating a new Azure Database for PostgreSQL, refer to the following link: [Quickstart: Create server](/azure/postgresql/flexible-server/).
2740

28-
### Set up Online migration parameters
29-
30-
For Online migration, the replication support should be set to Logical under replication settings of the source PostgreSQL server. In addition, the server parameters `max_wal_senders` and `max_replication_slots` values should be equal to the number of Databases that need to be migrated. They can also be configured in the command line using the following commands:
31-
32-
- ALTER SYSTEM SET wal_level = logical;
33-
- ALTER SYSTEM SET max_wal_senders = `number of databases to migrate`;
34-
- ALTER SYSTEM SET max_replication_slots = `number of databases to migrate`;
41+
- The server parameter `max_replication_slots` should be more than the number of Databases that need to be migrated. It can be set in the Azure portal under **Settings->Server Parameters** or configured in the command line using the following command:
3542

36-
You'll need to restart the source PostgreSQL server after completing all the Online migration prerequisites.
37-
38-
> [!NOTE]
39-
> For online migration with Azure Database for PostgreSQL single server, the Azure replication support is set to logical under the replication settings of the single server page in the Azure portal.
43+
- ALTER SYSTEM SET max_replication_slots = `number of databases to migrate` + 1;
4044

4145
### Network setup
4246

@@ -54,19 +58,12 @@ The following table can help set up the network between the source and target.
5458

5559
| Source | Target | Connectivity Tips |
5660
| --- | --- | --- |
57-
| Public | Public | No other action is required if the source is whitelisted in the target's firewall rules. |
61+
| Public | Public | No other action is required if the source is allow-listed in the target's firewall rules. |
5862
| Private | Public | This configuration isn't supported; use pg_dump/pg_restore for data transfer. |
59-
| Public | Private | No other action is required if the source is whitelisted in the target's firewall rules. |
63+
| Public | Private | No other action is required if the source is allow-listed in the target's firewall rules. |
6064
| Private | Private | Establish an ExpressRoute, IPsec VPN, VPN Tunneling, or virtual network Peering between the source and target. |
6165
| Private | Private Endpoint | This configuration isn't supported; contact [Microsoft support](https://support.microsoft.com/). |
6266

63-
**Additional Networking Considerations:**
64-
65-
- pg_hba.conf Configuration: To facilitate connectivity between the source and target PostgreSQL instances, it's essential to verify and potentially modify the pg_hba.conf file. This file includes client authentication and must be configured to allow the target PostgreSQL to connect to the source. Changes to the pg_hba.conf file typically require a restart of the source PostgreSQL instance to take effect.
66-
67-
> [!NOTE]
68-
> The pg_hba.conf file is located in the data directory of the PostgreSQL installation. This file should be checked and configured if the source database is an on-premises PostgreSQL server or a PostgreSQL server hosted on an Azure VM. For PostgreSQL instances on AWS RDS or similar managed services, the pg_hba.conf file is not directly accessible or applicable. Instead, access is controlled through the service's provided security and network access configurations.
69-
7067
For more information about network setup, visit [Network guide for migration service in Azure Database for PostgreSQL - Flexible Server](../../how-to-network-setup-migration-service.md).
7168

7269
### Extensions

articles/postgresql/migrate/migration-service/includes/prerequisites/prerequisites-migration-service-postgresql-online.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ Source PostgreSQL version should be `>= 9.5`. If the source PostgreSQL version i
1919

2020
### Set up Online migration parameters
2121

22-
For Online migration, the replication support should be set to Logical under replication settings of the source PostgreSQL server. In addition, the server parameters `max_wal_senders` and `max_replication_slots` values should be equal to the number of Databases that need to be migrated. They can also be configured in the command line using the following commands:
22+
For Online migration, the replication support should be set to Logical under replication settings of the source PostgreSQL server. In addition, the server parameters `max_wal_senders` and `max_replication_slots` values should be more than the number of Databases that need to be migrated. The parameters can be set in the Azure portal under **Settings->Server Parameters** or configured in the command line using the following commands:
2323

2424
- ALTER SYSTEM SET wal_level = logical;
25-
- ALTER SYSTEM SET max_wal_senders = `number of databases to migrate`;
26-
- ALTER SYSTEM SET max_replication_slots = `number of databases to migrate`;
25+
- ALTER SYSTEM SET max_wal_senders = `number of databases to migrate` + 1;
26+
- ALTER SYSTEM SET max_replication_slots = `number of databases to migrate` + 1;
2727

28-
Ensure that there are no long running transactions. Long running transactions don't allow creation of replication slots. The creation of a replication slot will succeed if all long running transactions are committed or rolled-back. You'll need to restart the source PostgreSQL server after completing all the Online migration prerequisites.
28+
Ensure that there are no **long running transactions**. Long running transactions don't allow creation of replication slots. The creation of a replication slot will succeed if all long running transactions are committed or rolled-back. You'll need to restart the source PostgreSQL server after completing all the Online migration prerequisites.
2929

3030
> [!NOTE]
3131
> For online migration with Azure Database for PostgreSQL single server, the Azure replication support is set to logical under the replication settings of the single server page in the Azure portal.
@@ -38,7 +38,9 @@ Ensure that there are no long running transactions. Long running transactions do
3838

3939
- For detailed instructions on creating a new Azure Database for PostgreSQL, refer to the following link: [Quickstart: Create server](/azure/postgresql/flexible-server/).
4040

41-
- The `pg_replication_origin` parameter on the target should be at least (1 + `number of databases to migrate`) onto the target.
41+
- The server parameter `max_replication_slots` should be more than the number of Databases that need to be migrated. It can be set in the Azure portal under **Settings->Server Parameters** or configured in the command line using the following command:
42+
43+
- ALTER SYSTEM SET max_replication_slots = `number of databases to migrate` + 1;
4244

4345
### Network setup
4446

@@ -56,9 +58,9 @@ The following table can help set up the network between the source and target.
5658

5759
| Source | Target | Connectivity Tips |
5860
| --- | --- | --- |
59-
| Public | Public | No other action is required if the source is whitelisted in the target's firewall rules. |
61+
| Public | Public | No other action is required if the source is allow-listed in the target's firewall rules. |
6062
| Private | Public | This configuration isn't supported; use pg_dump/pg_restore for data transfer. |
61-
| Public | Private | No other action is required if the source is whitelisted in the target's firewall rules. |
63+
| Public | Private | No other action is required if the source is allow-listed in the target's firewall rules. |
6264
| Private | Private | Establish an ExpressRoute, IPsec VPN, VPN Tunneling, or virtual network Peering between the source and target. |
6365
| Private | Private Endpoint | This configuration isn't supported; contact [Microsoft support](https://support.microsoft.com/). |
6466

0 commit comments

Comments
 (0)