How is logical replication used in PostgreSQL 10?

How is logical replication used in PostgreSQL 10?

PostgreSQL version 10 introduced several exciting features and improvements to the existing landscape of PostgreSQL. One such feature is logical replication using a publish and subscribe framework. AWS provides two managed PostgreSQL options: Amazon RDS for PostgreSQL and Amazon Aurora PostgreSQL.

How to replicate managed Amazon RDS for PostgreSQL?

A typical deployment of Amazon RDS for PostgreSQL and Aurora PostgreSQL databases involves application writes being served by a master instance and reads being offloaded to AWS managed replicas.

When to change the rds.logical replication parameter?

If you set the rds.logical_replication parameter value to 1, AWS DMS sets the wal_level, max_wal_senders, max_replication_slots, and max_connections parameters. Changing these parameters can increase WAL generation, so it’s a best practice to set the rds.logical_replication parameter only when you are using logical slots.

How to set up logical replication with AWS DMS?

To set up logical replication with AWS DMS, you need details about your publisher and subscriber from Amazon RDS. In particular, you need details about the publisher’s writer DB instance and the subscriber’s DB instance. Prepare the publisher database to work with AWS DMS.

How to replicate a PostgreSQL database in AWS?

You can use the AWS Database Migration Service (AWS DMS) to replicate a database or a portion of a database. Use AWS DMS to migrate your data from an Aurora PostgreSQL database to another open source or commercial database. For more information about AWS DMS, see the AWS Database Migration Service User Guide.

How does RDS PostgreSQL support cross region replication?

RDS PostgreSQL also supports cross-region replication. In addition to scaling read queries, cross-region Read Replicas provide solutions for disaster recovery and database migration between AWS Regions. Instead of maintaining WAL retention based on wal_keep_segments, cross-region replication uses a physical replication slot at the source instance.

Are there any managed Amazon RDS for PostgreSQL?

AWS provides two managed PostgreSQL options: Amazon RDS for PostgreSQL and Amazon Aurora PostgreSQL. This post discusses how to use the existing framework to create a self-managed read replica from Amazon RDS for PostgreSQL or Aurora.