I need to replace a AWS RDS PostgreSQL user without causing an outage during the switch, so I'm trying to duplicate it's permissions and can't seem to find information on how to do it correctly.
In regular PostgreSQL one could
pg_dumpall -g and just change username in commands, but RDS won't allows access to
pg_authid, making the command fail.
Granting role of the old user to new one like this
GRANT postgres TO newuser; doesn't seem to inherit original roles and adding those roles manually still leaves out attributes, such as
Create role or
Create DB one might have.
Is there a better way to replicate user permissions than granting original users as a role, it's other roles and altering attributes afterwards as it just feels overly complicated.