Using Google Cloud for PostgreSQL as a source for Amazon DMS
With Amazon DMS, you can use Google Cloud for PostgreSQL as a source in much the same way as you do self-managed PostgreSQL databases.
For information about versions of GCP PostgreSQL that Amazon DMS supports as a source, see Sources for Amazon DMS.
For more information, see Using a PostgreSQL database as an Amazon DMS source.
Set up Google Cloud for PostgreSQL for logical replication and decoding
You can use logical replication and decoding features in Google Cloud SQL for PostgreSQL during database migration.
For logical decoding, DMS uses one of the following plugins:
test_decoding
pglogical
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.
Note the following about using logical decoding with Amazon DMS:
With Google Cloud SQL for PostgreSQL, enable logical decoding by setting the
cloudsql.logical_decoding
flag toon
.To enable
pglogical
, set thecloudsql.enable_pglogical
flag toon
, and restart the database.To use logical decoding features, you create a PostgreSQL user with the
REPLICATION
attribute. When you are using thepglogical
extension, the user must have thecloudsqlsuperuser
role. To create a user with thecloudsqlsuperuser
role, do the following:CREATE USER new_aws_dms_user WITH REPLICATION IN ROLE cloudsqlsuperuser LOGIN PASSWORD 'new_aws_dms_user_password';
To set this attribue on an existing user, do the following:
ALTER USER existing_user WITH REPLICATION;
Set the
max_replication_slots
parameter to the maximum number of DMS tasks that you plan to run concurrently. In Google Cloud SQL, 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.
For more information about logical replication with PostgreSQL, see the following topics: