Using Microsoft Azure Database for PostgreSQL flexible server as a source for AWS DMS
With AWS DMS, you can use Microsoft Azure Database for PostgreSQL flexible server as a source in much the same way as you do PostgreSQL.
For information about versions of Microsoft Azure Database for PostgreSQL flexible server that AWS DMS supports as a source, see Sources for AWS DMS.
Setting up Microsoft Azure for PostgreSQL flexible server for logical replication and decoding
You can use logical replication and decoding features in Microsoft Azure Database for PostgreSQL flexible server during database migration.
For logical decoding, DMS uses either the test_decoding
or pglogical
plugin. If the pglogical
plugin is available on a source PostgreSQL database, DMS creates a replication slot using
pglogical
,
otherwise the test_decoding
plugin is used.
To configure your Microsoft Azure for PostgreSQL flexible server as a source endpoint for DMS, perform the following steps:
Open the Server Parameters page on the portal.
Set the
wal_level
server parameter toLOGICAL
.If you want to use the
pglogical
extension, set theshared_preload_libraries
andazure.extensions
parameters topglogical
.Set the
max_replication_slots
parameter to the maximum number of DMS tasks that you plan to run concurrently. In Microsoft Azure, the default value for this parameter is 10. This parameter's maximum value depends on the available memory of your PostgreSQL instance, allowing for between 2 and 8 replication slots per GB of memory.Set the
max_wal_senders
parameter to a value greater than 1. Themax_wal_senders
parameter sets the number of concurrent tasks that can run. The default value is 10.Set the
max_worker_processes
parameter value to at least 16. Otherwise, you may see errors such as the following:WARNING: out of background worker slots.
Save the changes. Restart the server to apply the changes.
Confirm that your PostgreSQL instance allows network traffic from your connecting resource.
Grant an existing user replication permissions, or create a new user with replication permissions, using the following commands.
Grant an existing user replication permissions using the following command:
ALTER USER
<existing_user>
WITH REPLICATION;Create a new user with replication permissions using the following command:
CREATE USER aws_dms_user PASSWORD 'aws_dms_user_password'; GRANT azure_pg_admin to aws_dms_user; ALTER ROLE aws_dms_user REPLICATION LOGIN;
For more information about logical replication with PostgreSQL, see the following topics: