- Newest
- Most votes
- Most comments
Hi,
I hope that my below proposal is not too convoluted.... ;-)
So, in the worst case, you could use logical replication as in https://aws.amazon.com/blogs/database/using-logical-replication-to-replicate-managed-amazon-rds-for-postgresql-and-amazon-aurora-to-self-managed-postgresql/ to create your own self-managed replicated pg instance (on EC2 or elsewhere).
From there, you can then do whatever you want like streaming to another downstream instance.
Best,
Didier
Hello
You're right, while RDS for PostgreSQL offers logical replication, it restricts streaming connections through the pg_hba.conf file. This prevents directly establishing a connection for tools like Debezium that rely on streaming changes.
Here's a breakdown of the situation and troubleshooting steps: ** Issue:** RDS managed pg_hba.conf denies access for replication connections using host or hostssl methods. Logical replication with slots still functions, but streaming connections for efficient change notification are blocked.
Troubleshooting Steps: Confirmation: Verify that your pg_hba.conf configuration indeed rejects connections as you described. You provided the relevant lines showing reject for replication users.
Alternative Approach (AWS DMS): Consider using AWS Database Migration Service (DMS) instead of a direct streaming connection. DMS supports logical replication for PostgreSQL and allows replicating data to various targets, including other databases and S3. Refer to the AWS DMS documentation for setting up replication: https://aws.amazon.com/rds/postgresql/
RDS Limitations: Unfortunately, there's no direct way to enable streaming replication connections on RDS for PostgreSQL due to its managed nature. RDS manages security configurations, and modifying pg_hba.conf to allow replication connections isn't supported.
Relevant content
- Accepted Answerasked 4 years ago
- asked 7 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
This recipe doesn't work, for the same reason. There's no pg_hba entry, so the replication can't start. If this has worked before, then it's definitely a regression.