- Newest
- Most votes
- Most comments
Hi,
Can you please check the Events section of your resource ? Refer - https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/logs-events-streams-console.html
In the Events, there should be a message of switchover failure, but along with this, there should be one or more event(s) of error that can give a hint why switchover failed.
Based on the error you're encountering during switchover, it appears your blue/green deployment is failing due to DDL (Data Definition Language) changes or large object modifications that occurred on the blue database after the deployment was created.
When you attempt a switchover, Amazon RDS blocks it if there are DDL or large object changes on the database that can't be replicated through logical replication. Blue/green deployments don't support these types of changes during the replication process.
To resolve this issue, you'll need to:
- Delete the current blue/green deployment along with the green environment
- Recreate the blue/green deployment from scratch
- Avoid making any DDL changes (like CREATE, ALTER, DROP statements) or large object modifications on the blue database while the deployment is active
To prevent this issue in future deployments, you can configure event triggers and trigger functions on your blue database before starting the blue/green deployment. These triggers will notify you of any DDL operations that could cause problems during switchover.
Regarding the replication slot error you're seeing - this is expected behavior. The 'rds' namespace for replication slots is reserved for AWS-managed operations, and you don't need to manually create these slots. Amazon RDS manages the logical replication slots automatically for blue/green deployments.
The key is to ensure no DDL changes occur on your blue database after creating the deployment and before completing the switchover.
Sources
Troubleshoot Amazon RDS for PostgreSQL blue/green deployment errors | AWS re:Post
Block DDL during logical replication for PostgreSQL | AWS re:Post
Relevant content
asked 3 years ago
