4

We have a system on AWS RDS Aurora, PostgreSQL v 9.6.8 option.

We are trying to move its roles to a new encrypted 10.5 instance, but we don't have superuser access that's required to do pg_dumpall -g on the old instance. (I am aware of the update to Postgres 10.0 that lets you do this without superuser access, but this is 9.6.8).

Any ideas for a workaround? Thanks in advance for any suggestions whatsoever!

1 Answer 1

5

It turns out the 10.0 solution was backported (apparently) to 9.6.8, so:

pg_dumpall --host <aws_endpoint> --globals-only --no-role-passwords \
    --username masteruser >roles.sql

Then run roles.sql against the new database.

2
  • 1
    Verified with version 9.6.18 and got the following error pg_dumpall: unrecognized option '--no-role-passwords'. Looks like it's unsupported.
    – aunlead
    Commented Jul 9, 2020 at 12:20
  • Use pg_dumpall utility of newer version like 10 or 12, it is working then.
    – YogeshR
    Commented Jan 18, 2021 at 11:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.