Using Google Cloud for PostgreSQL as a source for Amazon DMS - Amazon Database Migration Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

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:

  1. With Google Cloud SQL for PostgreSQL, enable logical decoding by setting the cloudsql.logical_decoding flag to on.

  2. To enable pglogical, set the cloudsql.enable_pglogical flag to on, and restart the database.

  3. To use logical decoding features, you create a PostgreSQL user with the REPLICATION attribute. When you are using the pglogical extension, the user must have the cloudsqlsuperuser role. To create a user with the cloudsqlsuperuser 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:

  4. 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: