- Newest
- Most votes
- Most comments
Based on the scenario you've described, it appears you have a hybrid setup with an Amazon RDS for PostgreSQL instance (with a primary node and a read replica) and an Aurora PostgreSQL cluster connected to it. In this configuration, the mechanism used to keep the Aurora cluster in sync with the RDS PostgreSQL instance is typically logical replication.
Logical replication uses a publish and subscribe model to replicate changes from a source (publisher) to one or more recipients (subscribers). It works by using change records from the PostgreSQL write-ahead log (WAL). The RDS PostgreSQL instance acts as the publisher, sending WAL data for specified tables to the Aurora cluster, which acts as the subscriber.
This setup allows for replication between different PostgreSQL versions and between RDS for PostgreSQL instances and Aurora PostgreSQL clusters. The process relies on a replication slot to ensure that changes are synchronized from the publisher (RDS PostgreSQL) to the subscriber (Aurora cluster).
It's worth noting that this configuration is often used as part of a migration strategy from RDS PostgreSQL to Aurora PostgreSQL. The Aurora cluster is set up as a read replica of the RDS PostgreSQL instance, allowing for a smooth transition while maintaining data consistency.
If you need to make any changes or upgrades to your environment, it's important to consider how they might affect both the RDS PostgreSQL instance and the Aurora cluster. Given the complexity of this setup, it's advisable to carefully plan any modifications and consult with your database administration team or AWS support for the best approach.
Sources
Overview of PostgreSQL logical replication with Aurora - Amazon Aurora
Using pglogical to synchronize data across instances - Amazon Relational Database Service
Is this an AUrora cluster or are these AWS RDS PostgreSQL nodes | AWS re:Post
