2

I’m using google managed cloudsql database and I’m trying to create my own superuser manually and I’m getting below message

Note: I’m logged in via existing superuser only(mycurrentuser_dev).

   CREATE ROLE channa WITH LOGIN SUPERUSER PASSWORD 'xxxx';

   SQL Error [42501]: ERROR: must be superuser to create superusers

However, when I checked my current user permission -it has the same permission as cloudsql superuser.

  \du+
                                                         List of roles
     Role name         |                         Attributes                         |           
Member of            | Description
---------------------------+--------------------------------------------------------- 
---+--------------------------------+-------------
cloudsqlsuperuser         | Create role, Create DB                                     | {pg_monitor,pg_signal_backend} |
mycurrentuser_dev         | Create role, Create DB                                     | {cloudsqlsuperuser}            |

1 Answer 1

1

Yeah, cloudsqlsuperuser is not a real superuser. If you want your new role to be as super as it gets, then grant it cloudsqlsuperuser.

1
  • cloudsqlsuperuser is only granted to him :)
    – Shiwangini
    Commented Oct 25, 2021 at 15:41

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.