0
votes

I'm trying to edit pg_settings on a Google Cloud PostgreSQL so that it'll fit my needs.

First tried ALTER SYSTEM SET (...), but got

"ERROR: must be superuser to execute ALTER SYSTEM command"

response.

Then tried creating a superuser (despite Gcloud default user postgre be a part of cloudsqlsuperuser, it's not a superuser - https://cloud.google.com/sql/docs/postgres/users). Couldn't find a way to do it.

Then searched another way to do it, found none.

Can you help?

PS: I'm trying that because when DB was on a shared ambient (like dreamhost simplest thing) a process of import data from csv file into the webapplication would take 1 hour, now on the GCloud (1VCPU and 3.75GB RAM - not shared) it's taking almost 10 hours.

1

1 Answers

1
votes

Since the Cloud SQL instances are managed instances, all users created through Cloud SQL are part of the cloudsqlsuperuser role and it has CREATEROLE, CREATEDB, and LOGIN attributes. It does not have the SUPERUSER or REPLICATION attributes. See more details in here. Therefore, the features that require SUPERUSER privileges are unsupported. See more details in here.

If you want to have a SQL database with all privileges, you can deploy a Compute Engine instance and install PostgreSQL on there. Here is a tutorial to do it. This will give you complete control over the SQL instance.

To understand what is happening with the CSV file upload, could you provide more details: the size and the data of the csv file, the environment for file updating, etc.