Streaming replication - AWS Prescriptive Guidance

Streaming replication

You can use streaming replication to keep WAL data or XLOG records current by continuously shipping and applying the WAL data or XLOG records to standby servers. If your business application can't experience any downtime, then streaming replication is a migration option to consider.

Architecture

The following diagram shows the architecture for migrating an on-premises PostgreSQL database to the AWS Cloud by using streaming replication.

Streaming replication architecture

The diagram shows the following workflow:

  1. Replicate the database on an EC2 instance and copy over archive files.

  2. Promote the new replica as the database writer endpoint.

  3. Point the application to the new target database.

Limitations

We recommend that you consider the following limitations of using streaming replication before starting your migration:

  • A significant amount of diskspace is required on the server to take backups and then copy the backups to Amazon EC2.

  • A significant amount of bandwidth is required to synchronize the source and target databases and achieve faster copying for the archive log.

  • Source and target databases must have the same version of PostgreSQL.