- Newest
- Most votes
- Most comments
The error you're encountering is related to permissions in Amazon RDS for PostgreSQL 14.17. In RDS environments, even the master user has certain restrictions that aren't present in on-premises PostgreSQL installations.
The master user in Amazon RDS for PostgreSQL is granted the DBA role, but certain privileges are restricted as part of AWS's managed service approach. Specifically, you don't have the permissions to alter the ownership of system objects like built-in data types (numeric, bool, varchar, etc.).
This restriction is part of AWS's security model for RDS, where certain system-level operations are reserved for the AWS-managed users. Even though you're using the master user account, you cannot change ownership of system types.
For your database setup and restoration processes, you'll need to modify your scripts to remove these ALTER TYPE OWNER statements, as they're not necessary for most application functionality and aren't permitted in the RDS environment.
If you need to perform specific operations that require elevated privileges, you might want to look into using the rds_superuser role, which provides additional capabilities beyond the standard master user permissions. However, even with rds_superuser, there will still be limitations compared to a full superuser in an on-premises PostgreSQL installation.
Sources
Step 3: Create Your Target Aurora PostgreSQL Database - Database Migration Guide
Step 3: Create Your Target Amazon RDS for PostgreSQL Database - Database Migration Guide
Amazon RDS for Oracle RDSADMIN question | AWS re:Post
Hi,
If I execute this SQL in version 14.17, I get the response that the type is owned by rdsadmin.
SELECT typowner::regrole
FROM pg_type t
WHERE typname = 'numeric';
The mastr user is not same as rdsadmin and rdsadmin can't be granted to other role in RDS.
answered a year ago
Relevant content
asked a year ago
