Skip to content

Commit bb10a7f

Browse files
authored
Merge pull request #260816 from hariramt/task/Online-4regionPP
Online migration details update in select regions
2 parents 64012fb + ed39f34 commit bb10a7f

8 files changed

+121
-47
lines changed

articles/postgresql/migrate/concepts-single-to-flexible.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ ms.author: shriramm
77
ms.reviewer: maghan
88
ms.date: 03/31/2023
99
ms.service: postgresql
10+
ms.custom: references_regions
1011
ms.topic: conceptual
1112
---
1213

@@ -28,7 +29,7 @@ In this article, we provide compelling reasons for single server customers to mi
2829

2930
- **[Cost Savings](../flexible-server/how-to-deploy-on-azure-free-account.md)** – Flexible server allows you to stop and start server on-demand to lower your TCO. Your compute tier billing is stopped immediately, which allows you to have significant cost savings during development, testing and for time-bound predictable production workloads.
3031

31-
- **[Support for new PG versions](../flexible-server/concepts-supported-versions.md)** - Flexible server currently supports PG version 11 and onwards till version 15. Newer community versions of PostgreSQL will be supported only in flexible server.
32+
- **[Support for new PG versions](../flexible-server/concepts-supported-versions.md)** - Flexible server currently supports PG version 11 and onwards till version 15. Newer community versions of PostgreSQL are supported only in flexible server.
3233

3334
- **Minimized Latency** – You can collocate your flexible server in the same availability zone as the application server that results in a minimal latency. This option isn't available in Single server.
3435

@@ -69,13 +70,13 @@ The following table lists the different tools available for performing the migra
6970
| Tool | Mode | Pros | Cons |
7071
| :--- | :--- | :--- | :--- |
7172
| Single to Flex Migration tool (**Recommended**) | Offline | - Managed migration service.<br />- No complex setup/pre-requisites required<br />- Simple to use portal-based migration experience<br />- Fast offline migration tool<br />- No limitations in terms of size of databases it can handle. | Downtime to applications. |
72-
| pg_dump and pg_restore | Offline | - Tried and tested tool that has been in use for long time<br />- Suited for databases of size less than 10 GB<br />| - Need prior knowledge of setting up and using this tool<br />- Slow when compared to other tools<br />Significant downtime to your application. |
73+
| pg_dump and pg_restore | Offline | - Tried and tested tool that is in use for a long time<br />- Suited for databases of size less than 10 GB<br />| - Need prior knowledge of setting up and using this tool<br />- Slow when compared to other tools<br />Significant downtime to your application. |
7374
| Azure DMS | Online | - Minimal downtime to your application<br />- Free of cost | - Complex setup<br />- High chances of migration failures<br />- Can't handle database of sizes > 1 TB<br />- Can't handle write-intensive workload |
7475

7576
The next section of the document gives an overview of the Single to Flex Migration tool, its implementation, limitations, and the experience that makes it the recommended tool to perform migrations from single to flexible server.
7677

7778
> [!NOTE]
78-
> The Single to Flex Migration tool is available in all Azure regions and currently supports only **Offline** migrations. Support for online migrations will be introduced later in the tool.
79+
> The Single to Flex Migration tool is available in all Azure regions and currently supports **Offline** migrations. Support for **Online** migrations is currently available in select regions - India Central, India South, Australia Southeast and South East Asia.
7980
8081
## Single to Flexible Migration tool - Overview
8182

@@ -102,7 +103,7 @@ The following table shows the time for performing offline migrations for databas
102103
> In order to perform faster migrations, pick a higher SKU for your flexible server. You can always change the SKU to match the application needs post migration.
103104
104105
## Pre-migration validations
105-
We have noticed many migrations fail due to setup issues on source and target server. Most of the issues can be categorized into the following buckets:
106+
We noticed many migrations fail due to setup issues on source and target server. Most of the issues can be categorized into the following buckets:
106107
* Issues related to authentication/permissions for the migration user on source and target server.
107108
* [Prerequisites](#migration-prerequisites) not being taken care of, before running the migration.
108109
* Unsupported features/configurations between the source and target.
@@ -123,7 +124,7 @@ The result of the Validate option can be
123124

124125
Plan your migrations better by performing pre-migration validations in advance to know the potential issues you might encounter while performing migrations.
125126

126-
* **Migrate** - Use this option to kickstart the migration without going through validation process. It's recommended to perform validation before triggering a migration to increase the chances for a successful migration. Once validation is done, you can use this option to start the migration process.
127+
* **Migrate** - Use this option to kickstart the migration without going through validation process. It's recommended to perform validation before triggering a migration to increase the chances for a successful migration. Once validation is done, you can use this option to start the migration process.
127128

128129
* **Validate and Migrate** - In this option, validations are performed and then migration gets triggered if all checks are in **succeeded** or **warning** state. Validation failures don't start the migration between source and target servers.
129130

@@ -156,7 +157,7 @@ Along with data migration, the tool automatically provides the following built-i
156157
> [!NOTE]
157158
> The following limitations are applicable only for flexible servers on which the migration of users/roles functionality is enabled.
158159
159-
- Azure Active Directory users present on your source server won't be migrated to target server. To mitigate this limitation, manually create all Azure Active Directory users on your target server using this [link](../flexible-server/how-to-manage-azure-ad-users.md) before triggering a migration. If Azure Active Directory users aren't created on target server, migration fails with appropriate error message.
160+
- Azure Active Directory users present on your source server are not migrated to the target server. To mitigate this limitation, manually create all Azure Active Directory users on your target server using this [link](../flexible-server/how-to-manage-azure-ad-users.md) before triggering a migration. If Azure Active Directory users aren't created on target server, migration fails with appropriate error message.
160161
- If the target flexible server uses SCRAM-SHA-256 password encryption method, connection to flexible server using the users/roles on single server fails since the passwords are encrypted using md5 algorithm. To mitigate this limitation, choose the option **MD5** for **password_encryption** server parameter on your flexible server.
161162
## Experience
162163

@@ -204,9 +205,9 @@ The following table summarizes the list of networking scenarios supported by the
204205
- If your single server is public access (case #1 and case #2 in the above table), there's nothing needed from your end. The single to flex migration tool automatically establishes connection between single and flexible server and the migration goes through.
205206
- If your single server is in private access, then the only supported scenario is when your Flexible server is inside a VNet. If your flexible server is deployed in the same VNet as the private end point of your Single server, connections between single server and flexible server should automatically work provided there's no network security group(NSGs) blocking the connectivity between subnets. If flexible server is deployed in another VNet, [peering should be established between the VNets](../../virtual-network/tutorial-connect-virtual-networks-portal.md) for the connection to work between Single and Flexible server.
206207

207-
##### Allow list required extensions
208+
##### Allowlist required extensions
208209

209-
The migration tool automatically allows lists all extensions used by your single server databases on your flexible server except for the ones whose libraries need to be loaded at the server start.
210+
The migration tool automatically allowlists all extensions used by your single server databases on your flexible server except for the ones whose libraries need to be loaded at the server start.
210211

211212
Use the following select command to list all the extensions used on your Single server databases.
212213

@@ -239,7 +240,7 @@ Use the **Save and Restart** option and wait for the flexible server to restart.
239240
> [!NOTE]
240241
> If TIMESCALEDB, POSTGIS_TOPOLOGY, POSTGIS_TIGER_GEOCODER, POSTGRES_FDW or PG_PARTMAN extensions are used in your single server, please raise a support request since the migration tool does not handle these extensions.
241242
242-
##### Create AAD users on target server
243+
##### Create Azure Active Directory users on target server
243244
> [!NOTE]
244245
> This pre-requisite is applicable only for flexible servers on which the migration of users/roles functionality is enabled.
245246
@@ -269,7 +270,7 @@ The next phase of planning involves downtime incurred by applications for perfor
269270

270271
In most cases, the non-prod servers (dev, UAT, test, staging) are migrated using offline migrations. Since these servers have less data than the production servers, the migration completes fast. For migration of production server, you need to know the time it would take to complete the migration to plan for it in advance.
271272

272-
The time taken for an offline migration to complete is dependent on several factors that includes the number of databases, size of databases, number of tables inside each database, number of indexes, and the distribution of data across tables. It also depends on the SKU of the source and target server, and the IOPS available on the source and target server. Given the many factors that can affect the migration time, it's hard to estimate the total time for the offline migration to complete. The best approach would be to try it on a server restored from the primary server.
273+
The time taken for an offline migration to complete depends on several factors. It includes the number of databases, size of databases, number of tables inside each database, number of indexes, and the distribution of data across tables. It also depends on the SKU of the source and target server, and the IOPS available on the source and target server. Given the many factors that can affect the migration time, it's hard to estimate the total time for the offline migration to complete. The best approach would be to try it on a server restored from the primary server.
273274

274275
For calculating the total downtime to perform offline migration of production server, the following phases are considered.
275276

@@ -287,7 +288,7 @@ For calculating the total downtime to perform offline migration of production se
287288
288289
- **Migration of server settings** - The server parameters, firewall rules (if applicable), tags, alerts need to be manually copied from single server to flexible server.
289290

290-
- **Changing connection strings** - Post successful validation, application should change their connection strings to point to flexible server. This activity is coordinated with the application team to make changes to all the references of connection strings pointing to single server. In the flexible server the user parameter in the connection string no longer needs to be in the **username@servername** format. You should just use the **user=username** format for this parameter in the connection string
291+
- **Changing connection strings** - Post successful validation, application should change their connection strings to point to flexible server. This activity is coordinated with the application team to make changes to all the references of connection strings pointing to single server. In the flexible server, the user parameter in the connection string no longer needs to be in the **username@servername** format. You should just use the **user=username** format for this parameter in the connection string
291292
For example
292293
Psql -h **mysingleserver**.postgres.database.azure.com -u **user1@mysingleserver** -d db1
293294
should now be of the format
@@ -313,7 +314,7 @@ Trigger the migration of your production databases using the **Migrate** or **Va
313314

314315
In general, a powerful SKU is recommended for the target as the migration tool runs out of a container on the Flexible server. A powerful SKU enables a greater number of tables to be migrated in parallel. You can scale the SKU back to your preferred configuration after the migration. This section contains steps to improve the migration speed in case the data distribution among the tables is skewed and/or a more powerful SKU doesn't have a significant impact on the migration speed.
315316

316-
If the data distribution on the source is highly skewed, with most of the data present in one table, the allocated compute for migration isn't fully utilized and it creates a bottleneck. So, we split large tables into smaller chunks, which are then migrated in parallel. This is applicable to tables that have more than 10000000 (10m) tuples. Splitting the table into smaller chunks is possible if one of the following conditions is satisfied.
317+
If the data distribution on the source is highly skewed, with most of the data present in one table, the allocated compute for migration isn't fully utilized and it creates a bottleneck. So, we split large tables into smaller chunks, which are then migrated in parallel. This feature is applicable to tables that have more than 10000000 (10 m) tuples. Splitting the table into smaller chunks is possible if one of the following conditions is satisfied.
317318

318319
1. The table must have a column with a simple (not composite) primary key or unique index of type int or big int.
319320

@@ -337,20 +338,20 @@ If any of the above conditions are satisfied, the table is migrated in multiple
337338
##### How it works
338339

339340
- The migration tool looks up the maximum and minimum integer value of the Primary key/Unique index of that table that must be split up and migrated in parallel.
340-
- If the difference between the minimum and maximum value is more than 10000000 (10m), then the table is split into multiple parts and each part is migrated separately, in parallel.
341+
- If the difference between the minimum and maximum value is more than 10000000 (10 m), then the table is split into multiple parts and each part is migrated separately, in parallel.
341342

342343
In summary, the Single to Flexible migration tool migrates a table in parallel threads and reduce the migration time if:
343344

344345
1. The table has a column with a simple primary key or unique index of type int or big int.
345-
2. The table has at least 10000000 (10m) rows so that the difference between the minimum and maximum value of the primary key is more than 10000000 (10m).
346+
2. The table has at least 10000000 (10 m) rows so that the difference between the minimum and maximum value of the primary key is more than 10000000 (10 m).
346347
3. The SKU used has idle cores, which can be used for migrating the table in parallel.
347348

348349
### Post migration
349350

350351
- Once the migration is complete, verify the data on your flexible server and make sure it's an exact copy of the single server.
351352
- Post verification, enable HA option as needed on your flexible server.
352353
- Change the SKU of the flexible server to match the application needs. This change needs a database server restart.
353-
- If you've changed any server parameters from their default values in single server, copy those server parameter values in flexible server.
354+
- If you change any server parameters from their default values in single server, copy those server parameter values in flexible server.
354355
- Copy other server settings like tags, alerts, firewall rules (if applicable) from single server to flexible server.
355356
- Make changes to your application to point the connection strings to flexible server.
356357
- Monitor the database performance closely to see if it requires performance tuning.

0 commit comments

Comments
 (0)