alter user user_name with role superuser replication createdb, createrole code example
Example 1: postgresql change user role grant
=# ALTER USER librarian WITH SUPERUSER;
ALTER ROLE
Example 2: postgresql change user role grant
=# ALTER USER role_specification WITH OPTION1 OPTION2 OPTION3;