Questions tagged [google-cloud-sql]

Google Cloud SQL is a service that allows you to create, configure, and use relational databases (currently MySQL and PostgreSQL) that live in Google's cloud. It is a fully-managed service that maintains, manages, and administers your databases, allowing you to focus on your applications and services.

43 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
513 views

Does Google CloudSQL Export function lock tables?

In order to create more 'data recovery' points than the standard automatic backup policy allows, I'm going to run a cron which will export sql dumps out of my CloudSQL instances at intervals ...
Molenpad's user avatar
  • 1,774
2 votes
1 answer
721 views

Postgresql sudden storage increase at regular interval?

I am running Postgresql 11 in production and observing a weird step function kind of thing in storage as follow: The above graph is for a single day and it is happening everyday at random times. I ...
hardik24's user avatar
2 votes
0 answers
340 views

Google CloudSQL - cannot delete created role

I created user observer using only postgres user on my PostgreSQL 11 instance and I don't need it anymore. But after all I can't delete it - pgAdmin showing me that my user have connect privileges ...
Alexander Mikheev's user avatar
2 votes
0 answers
125 views

taking a gcloud snapshot of a postgres database

Given a postgres database on a Google cloud virtual machine instance, are we guaranteed snapshot consistency if we call pg_start_backup(), sync(), then take a snapshot of the instance? https://cloud....
Peter's user avatar
  • 21
1 vote
0 answers
17 views

How to Transfer 100GB database from GCP to AWS

I have a 100GB database hosted in GCP's Cloud SQL offering in us-east1 I'd like to transfer this to AWS lightsail databases and hosted in AP-SOUTHEAST-2. Within AWS I'm using AWS Lightsail Databases ...
Peter Kneale's user avatar
1 vote
0 answers
90 views

How to recover stopped replication on MySQL?

Several times now my Google Cloud MySQL read replica just stopped replication of the master. Visible symptoms are: Replication lags rises on the slave. The Relay_Log_Pos value of show slave status is ...
Laures's user avatar
  • 111
1 vote
0 answers
116 views

What is the best way to migrate a multi-TB MySQL database from on-prem to gcloud Cloud SQL?

I have several multi-TB on-prem MySQL databases I need to migrate into Google Cloud's managed MySQL offering, Cloud SQL. I have migrated two of size ~1TB so far with mysqldump but this method is far ...
CClarke's user avatar
  • 133
1 vote
0 answers
376 views

Query that normally takes 100ms, occasionally takes 30+s. Need help analyzing query plan

I am using Google Cloud SQL. I am using a g1-small. I have a table that looks like this: +-----------+-------------------+-------------+ | Column | Type | Modifiers | |-----------+---...
Dominic Bou-Samra's user avatar
1 vote
0 answers
251 views

How to run pg_xlogdump or pg_waldump in Google CloudSQL? Or use Query Insights to get similar results?

Does anyone know how to look up the transaction that’s associated with an LSN on a CloudSQL Postgres instance? For example, let’s say I’m trying to find the transaction associated with LSN 842/...
modulitos's user avatar
  • 141
1 vote
0 answers
138 views

GCP Cloudsql Mysql Replica unresponsive after mass delete on Master

We have a Master/Replica configuration for Mysql innodb(5.7.32) databases in Cloud SQL... We have a single Table (let's call it Master table) partitioned on Two keys having both primary and non-...
Faraz Beg's user avatar
1 vote
0 answers
488 views

Keeping the same order of selected records while inserting to another table

I am running a below query in big query insert into `test-project.temp_test_dataset.cluster_records` (pm,col1,col2,col3,total) select pm,col1,col2,col3,total from ( select 'ingest' as pm,col1,col2,...
vikrant rana's user avatar
1 vote
2 answers
580 views

can any tweaks improve full table scan time in Postgres/Cloud SQL?

I have a table with 150 million rows in a Postgres database hosted in Cloud SQL (in Google Cloud Platform). Typically I obviously try to avoid scanning the table, but occasionally I will manually want ...
Stephen's user avatar
  • 213
1 vote
0 answers
126 views

Restore Stored Procedure from Google Cloud MYSQL?

I accidentally overwrote a MYSQL stored procedure through the Workbench client connected to a GCP MYSQL instance. I tried restoring a previous backup to recover it, but that only restored the tables - ...
Baz's user avatar
  • 111
1 vote
0 answers
37 views

Move Our Google Cloud SQL Instance to Compute Engine

We are running several Cloud SQL Instances on GCP and plan to move all of them to some Compute Engine instances, depending on the applications that use it. Our main concern is cost of the server. We ...
Prabowo Murti's user avatar
1 vote
1 answer
162 views

Google Managed PGSQL DB migration to DigitalOcean Managed PGSQL DB

We are migrating from Google-Cloud PGSQL managed database to a managed PGSQL server on Digital ocean. The dilemma we are facing is that both Google and Digital ocean are managed so we have no access ...
sqwale's user avatar
  • 211
1 vote
1 answer
2k views

How to sync easily between a master database from Google Cloud SQL and a master database from Amazon RDS

I've created a master - slave (replication) in Google Cloud SQL. I've also created a master - slave (replication) in Amazon RDS. I want to sync two master MysQL from Google Cloud SQL and Amazon RDS....
Eldwin Eldwin's user avatar
1 vote
0 answers
241 views

Dumping Postgres schema from Google cloud SQL

Now this may look trivial but it is a managed service so I don't have the superuser rights. And various schema/tables/sequences have different roles/users as their owners so I can't just use pg_dump ...
sqwale's user avatar
  • 211
1 vote
0 answers
62 views

Why use Failover replica on Google Cloud RDS?

we are thinking of migrating our MySQL database from our dedicated server to a Google Cloud RDS instance. However I would like to clarify the below: 1) What is the purpose of creating a failover ...
Leonidas's user avatar
1 vote
1 answer
99 views

Adding columns upped my RAM usage significantly

I have a Google Cloud Platform MySQL 2nd Gen 5.7 instance with two databases, one for testing and one for production. There are about 20 or so tables. One of the tables accounts for 99% of the ...
Brian Leach's user avatar
1 vote
0 answers
119 views

X-devAPI not working inside of Google cloud SQL

I am tryng to use X-devAPI inside of Google cloud SQL but getting the following error from MySQL client comp@user:~$ sudo mysqlsh -u root -h XX.XXX.XX.XXX --mysql --dba enableXProtocol [sudo] ...
Geek Guy's user avatar
  • 111
1 vote
1 answer
54 views

Is it a bad practice to associate database records to relevant object storage by ID?

I'm using Google Cloud Platform to host a web app. The app has a typical database structure, with a schema defined by Django migrations. For one of the models, Song, each record should be associated ...
Michael Hays's user avatar
1 vote
0 answers
205 views

GoogleSQL query first range of records and perform average

Using GoogleSQL I want to extract just the first 24 records of each record_id, based on time period. After that perform an average over that range (1-24), and also calculate the growth rate period ...
gogasca's user avatar
  • 133
0 votes
0 answers
36 views

Connect SnapLogic to Google Cloud SQL Postgres database

I have a SnapLogic pipeline that returns tabular data. I'm trying to write the data to a Cloud SQL postgres instance. However, the Postgres Snap only provides space for a username/password. I've ...
Matt's user avatar
  • 261
0 votes
1 answer
184 views

Google Cloud SQL (MySQL) consume too much CPU during several days

There was noticed that Cloud SQL (MySQL) consumed to much CPU (~100%) during several days. Firstly, I decided that we have many user online or background jobs. But it was regular workload, nothing ...
Anton Komarov's user avatar
0 votes
1 answer
39 views

What is ideal configuration for Mysqld.cnf?

I run a news & media blog with over a few million readers every month. I'm currently using Google Cloud with a 32gb ram server with WordPress. My server is hitting 84% memory usage due to the ...
Jaya's user avatar
  • 11
0 votes
0 answers
7 views

Can BigQuery queries get assigned to a different root nodes?

I have been trying to understand the limitations of BigQuery based on how it works under the hood, but it's hard for me to find an answer to the question in the title: Can BigQuery queries get ...
MattSt's user avatar
  • 101
0 votes
0 answers
137 views

How do I update definers to enable MySQL replication?

I am trying to create a MySQL replica in Cloud SQL, Google's managed MySQL service. However I have the following error which won't allow me to start replication: "kind": "sql#...
CClarke's user avatar
  • 133
0 votes
2 answers
825 views

can't backup postgres 13 with pg_dump

I'm trying to backup a postgresql 13 database with the following command on MacOS: PGPASSWORD=“my_password” /Library/PostgreSQL/13/bin/pg_dump -h xx.xx.xx.xx -p 5432 -U postgres dbname > my_backup....
Sam Leurs's user avatar
  • 141
0 votes
0 answers
573 views

Revoke CREATE for a user from Google Cloud SQL Postgres?

I'm using Google Cloud SQL Postgres and having difficulty revoking privileges to create tables from a user. I first removed all roles and attributes from the user (truncated for brevity): mydatabase=&...
ashgromnies's user avatar
0 votes
0 answers
2k views

faster way to update very large table (150 million rows) in Postgres

I have a very large table (about 150 million rows) in Postgres 12. It has a simple structure: col1 (VARCHAR) col2 (VARCHAR) col3 (VARCHAR) col4 (VARCHAR) The PK is (col1, col2, col3, col4), so as a ...
Stephen's user avatar
  • 213
0 votes
1 answer
262 views

Online schema changes for cloudsql DB

I'm new to cloudsql for mysql. I have a table with trigger. I need to do some ddl changes on that table. However, I can't take any downtime. What I have tried so far: I tried with pt-online-schema-...
shiwanginio's user avatar
0 votes
1 answer
31 views

Merging one SQL database into another

Currently in my CI I'm completely wiping production db with development db. That was fine for testing but I'm coming to a stage where I need to start merging instead of completely wiping. Right now ...
user avatar
0 votes
1 answer
141 views

GCP Cloudsql Mysql Replica unresponsive after mass delete on Master

Directed here from S/O We have a Master/Replica configuration for Mysql innodb(5.7.32) databases in Cloud SQL... We have a single Table (let's call it Master table) partitioned on Two keys having both ...
Faraz Beg's user avatar
0 votes
0 answers
205 views

Tablespace in cloudsql for mysql

I'm new to mysql and GC. It may sound like opinion based question, so sorry for that. But, I really need a right opinion. My company wants to move their on-prem mysql to GC managed mysql. I was ...
shiwanginio's user avatar
0 votes
0 answers
88 views

MySQL8 instance crashes on CloudSQL

I had a MySQL 5.7 instance on Google CloudSQL. Now i created a MySQL 8 instance. The configuration is pretty much the same (except i use 2 CPUs instead of one, 3.75GB of RAM). Now the default config ...
fredalex's user avatar
  • 101
0 votes
0 answers
218 views

Google cloud MySQL replication with partition

I recently altered a table in MySQL 8.0 to with new Primary key and created partitions with them to improve the query performance. which worked fine in main instance. My assumption was that the ...
Azar's user avatar
  • 1
0 votes
0 answers
191 views

how to enable CDC in google cloud sql server for AWS DMS replication?

I am trying to migrate data from GCP cloud sql server to AWS aurora MySQL using DMS CDC, for this I need to enable CDC on DMS source database which cloud SQL. As per the AWS documentation I need to ...
Pand005's user avatar
  • 151
0 votes
0 answers
49 views

How to get disk statistics in the Postgres' Cloud SQL?

We are having performance issues in our database probably connected to the disk performance (maximum read MB/s). Therefore, I want to see some statistics of the disks. However, there is no such ...
sacherus's user avatar
  • 101
0 votes
0 answers
330 views

Choosing right database for storing bank transactions

I am starting a new project within GCP and I am trying to choose a right tool for storing bank transactions: I don't need transactions, these will be basically write-only, no updates I don't need ...
Vojtěch's user avatar
0 votes
0 answers
156 views

ALTER TABLE causing transaction aborted

There are two transactions. One transaction I used BEGIN RO for read-only transaction. While the other one I used BEGIN to allow me adding a new column to my table called dummy_table. This is what I'...
user6308605's user avatar
0 votes
0 answers
63 views

Configuring CloudSQL (MySQL) with binary logs but without backups

In the Google CloudSQL (MySQL) console, I can read: Automated backups required for binary logging. This requirement looks strange to me. I do not understand why automated backups are required for ...
jfg956's user avatar
  • 338
0 votes
1 answer
529 views

MySQL column that auto generates data, longer than UUID

My friend has the problem as shown below. He asked at StackOverFlow and there is no reply yet till now so I wish to help him to try the luck here. Thanks for everyone that helps. "I would like to ask ...
Tan Yih Wei's user avatar
0 votes
1 answer
51 views

Migration MySQL to Cloud Environment replication

I'm having 5 MySQL database server , these 5 server are used for e-business web-server. Now I Would like to move the MySQL database to cloud environment for database continuous running. Recently we ...
golden3's user avatar