Friday, November 12, 2021

Re: [google-cloud-sql-discuss] Re: Update conf file with ALTER SYSTEM SET on Postgres

Hello,

We are running the cloud SQL proxy in docker-compose as follows:

  gce-proxy:
    hostname: app-db
    container_name: gce-proxy
    image: gcr.io/cloudsql-docker/gce-proxy:${CLOUD_PROXY_VERSION}
    entrypoint: "/cloud_sql_proxy -instances=${CLOUD_INSTANCE}=tcp:0.0.0.0:5432 -credential_file=/cloudsql/${CLOUD_CREDENTIAL_FILE}"
    volumes:
      - ${CLOUD_CREDENTIAL_PATH}:/cloudsql
    ports:
      - ${CLOUD_PROXY_PORT}:5432
    restart: always


The variable ${CLOUD_CREDENTIAL_PATH} contains the absolute path to the directory with the json credential file 
The variable ${CLOUD_CREDENTIAL_FILE} contains the credential.json 

Hope this helps...
Peter

On Fri, Nov 12, 2021 at 5:47 AM 'Sergi Ferre Albiol' via Google Cloud SQL discuss <google-cloud-sql-discuss@googlegroups.com> wrote:

Hello,

As Cloud SQL is a fully managed service the Superuser is not supported in Cloud SQL [1].

Searching all the flags [2] that are available in order to configure a Cloud SQL instance, it seems that max_logical_replication_workers is not available. I would suggest you to open a feature request [3] asking to implement this as a database flag.

Also another suggestion would be to host your PostgreSQL to Compute Engine that will give you more flexibility [4].

-----

[1] https://cloud.google.com/sql/docs/postgres/features#unsupported_features

[2] https://cloud.google.com/sql/docs/postgres/flags#list-flags-postgres

[3] https://issuetracker.google.com

[4] https://cloud.google.com/architecture/cloning-a-postgresql-database-on-compute-engine


On Thursday, November 11, 2021 at 9:12:05 AM UTC+1 search...@gmail.com wrote:
I want to update the conf file of my server because I need to have more workers for my queries but setting max_logical_replication_workers = 8.
But I get error that its not allowed when running this:

ALTER SYSTEM SET max_logical_replication_workers = 8;

ERROR: must be superuser to execute ALTER SYSTEM command

I saw from the docs that I canot have superuser permissions. 

Is there a way to update this fields? its seems very weird to me that I canot scale my server.
I tested my server by getting 16vCPU to work but each query is capped to 4 workers so getting bigger machines does nothing.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/461bd9d3-d2fb-4ab4-abbe-d9c8a5edc4b6n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/CAC%2B%3DFfa7USU2Vc7s10rCDwx%3DJk8vXahREqjxU5iasPDcFXnZkA%40mail.gmail.com.

No comments:

Post a Comment