Skip to content

Commit 90c859b

Browse files
Merge pull request #280595 from hariramt/task/MigrationdocUpdate-11thJuly2024
General updates - Online and Users/Roles
2 parents 5b30b88 + d4e5b92 commit 90c859b

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

articles/postgresql/migrate/migration-service/best-practices-migration-service-postgresql.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,10 @@ There are special conditions that typically refer to unique circumstances, confi
166166

167167
### Online migration
168168

169-
Online migration makes use of [pgcopydb follow](https://pgcopydb.readthedocs.io/en/latest/ref/pgcopydb_follow.html) and some of the [logical decoding restrictions](https://pgcopydb.readthedocs.io/en/latest/ref/pgcopydb_follow.html#pgcopydb-follow) apply. In addition, it's recommended to have a primary key in all the tables of a database undergoing Online migration. If primary key is absent, the deficiency may result in only insert operations being reflected during migration, excluding updates or deletes. Add a temporary primary key to the relevant tables before proceeding with the online migration.
169+
Online migration makes use of [pgcopydb follow](https://pgcopydb.readthedocs.io/en/latest/ref/pgcopydb_follow.html) and some of the [logical decoding restrictions](https://pgcopydb.readthedocs.io/en/latest/ref/pgcopydb_follow.html#pgcopydb-follow) apply. In addition, it's recommended to have a primary key in all the tables of a database undergoing Online migration. If primary key is absent, the deficiency will result in only insert operations being reflected during migration, excluding updates or deletes. Add a temporary primary key to the relevant tables before proceeding with the online migration.
170+
171+
> [!NOTE]
172+
> In the case of Online migration of tables without a primary key, only Insert operations are replayed on the target. This can potentially introduce inconsistency in the Database if records that are updated or deleted on the source do not reflect on the target.
170173

171174
An alternative is to use the `ALTER TABLE` command where the action is [REPLICA IDENTIY](https://www.postgresql.org/docs/current/sql-altertable.html#SQL-ALTERTABLE-REPLICA-IDENTITY) with the `FULL` option. The `FULL` option records the old values of all columns in the row so that even in the absence of a Primary key, all CRUD operations are reflected on the target during the Online migration. If none of these options work, perform an offline migration as an alternative.
172175

articles/postgresql/migrate/migration-service/concepts-user-roles-migration-service.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ Another important consideration is the deprecation of the **pg_pltemplate** syst
6767
pg_restore error: could not execute query <GRANT/REVOKE> <PRIVILEGES> on <affected TABLE/VIEWS> to <user>.
6868
```
6969

70+
#### Workaround
71+
7072
To resolve this error, it's necessary to undo the privileges granted to users and roles on the affected pg_catalog tables and views. You can accomplish this by taking the following steps.
7173

7274
**Step 1: Identify Privileges**
@@ -115,7 +117,7 @@ REVOKE SELECT ON pg_shadow FROM adminuser2;
115117
REVOKE UPDATE ON pg_shadow FROM adminuser2;
116118
```
117119
> [!NOTE]
118-
> Make sure you perform the above steps for all the databases included in the migration to avoid any permission-related issues during the migration..
120+
> Make sure you perform the above steps for all the databases included in the migration to avoid any permission-related issues during the migration.
119121
120122
After completing these steps, you can proceed to initiate a new migration from the single server to the flexible server using the migration service. You shouldn't encounter permission-related issues during this process.
121123

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,18 @@ The following tables describe the migration states and substates.
196196

197197
[!INCLUDE [prerequisites-migration-service-postgresql-online-single-server](../prerequisites/prerequisites-migration-service-postgresql-online-single-server.md)]
198198

199+
> [!NOTE]
200+
> Certain limitations apply to Online migration which are documented [here](../../best-practices-migration-service-postgresql.md#online-migration). Ensure that your database is compliant to execute an Online migration.
201+
199202
## Get started
200203

201204
1. If you're new to Microsoft Azure, [create an account](https://azure.microsoft.com/free/) to evaluate the offerings.
202205

203-
1. Install the latest Azure CLI for your operating system from the [Azure CLI installation page](/cli/azure/install-azure-cli).
206+
2. Install the latest Azure CLI for your operating system from the [Azure CLI installation page](/cli/azure/install-azure-cli).
204207

205208
If the Azure CLI is already installed, check the version by using the `az version` command. The version should be **2.50.0** or later to use the migration CLI commands. If not, [update your Azure CLI version](/cli/azure/update-azure-cli).
206209

207-
1. Run the `az login` command:
210+
3. Run the `az login` command:
208211

209212
```bash
210213
az login

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ You can see the results of **Validate and Migrate** once the operation is comple
198198

199199
[!INCLUDE [prerequisites-migration-service-postgresql-online-single-server](../prerequisites/prerequisites-migration-service-postgresql-online-single-server.md)]
200200

201+
> [!NOTE]
202+
> Certain limitations apply to Online migration which are documented [here](../../best-practices-migration-service-postgresql.md#online-migration). Ensure that your database is compliant to execute an Online migration.
203+
201204
## Configure your Azure Database for PostgreSQL flexible server
202205

203206
- Create the target flexible server. For guided steps, refer to the quickstart [Create an Azure Database for PostgreSQL flexible server using the portal](../../../../flexible-server/quickstart-create-server-portal.md).

0 commit comments

Comments
 (0)