Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

upgrade user to superuser in postgres google cloud

How do I create a user with superuser role in Postgres serwer with google cloud console?

When I create databases in google cloud, the default user is a non-superuser. From this role it is not possible to upgrade.

like image 710
Troels Avatar asked Jan 25 '18 11:01

Troels


People also ask

How do I change to superuser in PostgreSQL?

Log into PostgreSQL and run the following ALTER USER command to change user test_user to superuser. Replace test_user with username as per your requirement. postgres-# ALTER USER test_user WITH SUPERUSER; In the above command, we use WITH SUPERUSER clause to change user to superuser.

How do I grant super user?

Superusers retain all permissions regardless of GRANT and REVOKE commands. To create a new database superuser, log on to the database as a superuser and issue a CREATE USER command or an ALTER USER command with the CREATEUSER permission.


1 Answers

no way:

https://cloud.google.com/sql/docs/postgres/users

The postgres user is part of the cloudsqlsuperuser role, and has the following attributes (privileges): CREATEROLE, CREATEDB, and LOGIN. It does not have the SUPERUSER or REPLICATION attributes.

like image 67
Vao Tsun Avatar answered Sep 24 '22 14:09

Vao Tsun