Home icon

Fix circular role dependencies before upgrading Amazon RDS and Amazon Aurora PostgreSQL

Database Blog



This article explains how circular role dependencies can cause Amazon RDS and Aurora PostgreSQL major version upgrades to fail when upgrading from PostgreSQL 14 or earlier to PostgreSQL 15 or later.

  • Circular dependencies occur when pg_write_all_data or pg_read_all_data built-in roles are members of rds_superuser, blocking upgrade grants
  • Use a recursive SQL query to detect problematic role membership paths before upgrading
  • Resolve dependencies by revoking the loop-closing role membership from the built-in role
  • Confirm the detection query returns no rows before proceeding with the upgrade
  • Prevent future issues by avoiding grants between rds_superuser and built-in roles

Following these pre-upgrade checks and remediation steps ensures smooth major version upgrades for PostgreSQL databases on RDS and Aurora.



Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

Jan 27
2026
Strategies for upgrading Amazon Aurora PostgreSQL and Amazon RDS for PostgreSQL from version 13
Aug 11
2026
Enforcing TLS and managing certificate rotation for RDS and Amazon Aurora PostgreSQL
Feb 26
2025
Upgrade strategies for Amazon Aurora PostgreSQL and Amazon RDS for PostgreSQL 12
Sep 1
2026
Amazon RDS Custom now supports the latest CU and GDR updates for Microsoft SQL Server

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.