- Newest
- Most votes
- Most comments
This appears to be an issue with inactive replication slots remaining after a Blue/Green deployment deletion in Aurora PostgreSQL.
When you delete a Blue/Green deployment in Aurora PostgreSQL, the behavior of replication slots depends on how the deployment was deleted:
- If you delete a Blue/Green deployment before switchover:
- If you choose to delete the DB cluster in the green environment, the replication slots should be removed.
- If you retain the green environment, for Aurora PostgreSQL, the green environment is promoted to a standalone environment and replication stops, but inactive slots may remain.
- If you delete after switchover, the behavior is different, and there's a possibility that inactive replication slots remain in the system.
Inactive replication slots can prevent autovacuum from cleaning up internal catalog tables, leading to catalog bloat and increased risk of transaction ID wraparound, which aligns with the issue you're experiencing.
To address this issue:
- You can try dropping the inactive replication slot using:
SELECT pg_drop_replication_slot('slot_name') WHERE active = 'f'
However, as you've noted, this requires superuser privileges which you may not have as rds_superuser.
-
Since you're on the Basic Support Plan, your options are limited. The slots may eventually be cleaned up by Aurora's internal maintenance processes, but there's no documented timeframe for this.
-
Without Developer Support or higher, you cannot open a technical support case to have AWS manually remove these slots.
-
Consider upgrading your support plan temporarily to Developer or higher to get assistance with this issue, as it could potentially lead to more serious problems if left unresolved.
-
As a preventive measure for future Blue/Green deployments, ensure you're following the recommended practices for deletion, which may help avoid this issue.
This does appear to be an exception to the expected behavior, as you mentioned that in previous cases the slots were automatically removed.
Sources
Deleting a blue/green deployment in Amazon Aurora - Amazon Aurora
Resolving identifiable vacuum blockers in Aurora PostgreSQL - Amazon Aurora
Resolving identifiable vacuum blockers in RDS for PostgreSQL - Amazon Relational Database Service

I deleted the Blue/Green deployment before switchover and chose to delete the DB cluster in the green environment, but the internal RDS replication slots were not removed.
We’ve tested this behavior multiple times in the past, and in all previous cases, the internal replication slots were automatically removed after deleting Blue/Green deployments.