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}            |
Shiwangini
  • 380
  • 7
  • 24

1 Answers1

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.

jjanes
  • 42,332
  • 3
  • 44
  • 54