People who code: we want your input. Take the Survey

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.

Filter by
Sorted by
Tagged with
0
votes
1answer
32 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-...
0
votes
1answer
16 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 ...
0
votes
1answer
12 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 ...
0
votes
0answers
9 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-...
0
votes
1answer
29 views

How do I see where postgres privileges are coming from for a role?

Im using google cloudsql but this is a more generic postgres question. I have a role (that is already created and managed by cloudsql) called cloudsqliamserviceaccount. The cloudsqliamserviceaccount ...
0
votes
0answers
20 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 ...
0
votes
0answers
27 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 ...
0
votes
0answers
12 views

Modify owners in all tables. How to run a selected query?

I need to write a script which modifies all table owners in a Cloud SQL Postgres db. So far I have gotten this far: SELECT format( 'ALTER TABLE %I.%I.%I OWNER TO %I \gexec;', ...
1
vote
1answer
64 views

IMPORT FOREIGN SCHEMA fails with Password error for 127.0.0.1 but not for remote IP (of same server)

I have a Postgres server in Google SQL Cloud with multiple databases. I want to create a FOREIGN DATA WRAPPER between them. If I use the server's remote IP it works: CREATE SERVER "some_db_fdw&...
1
vote
1answer
26 views

Constant writing operations on google cloud database

I have a MySQL 8.0 cluster database and so far I'm using it to test a couple of things, so I only write from time to time. Problem is that I have realised that there are write operations all the time. ...
3
votes
1answer
51 views

Half of the partitions are empty on a KEY partition

We are trying to move data from one table that currently has over 1B rows to a partitioned table. But as we started to do so we notice that half of the partitions are empty, why is that? Table is ...
0
votes
0answers
15 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 ...
0
votes
1answer
50 views

download mysql slow query log on google cloud sql

I'm having a difficult time locating the log file to download. When running show global variables like '%slow%'; I can see it is located /mysql/logs/slow.log When I log into the instance though ...
1
vote
0answers
39 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,...
0
votes
0answers
55 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 ...
0
votes
0answers
19 views

GCP Cloud SQL not supporting sysadmin access?

I am trying to migrate data from GCP cloud SQL to AWS aurora using DMS task, I used 'sqlserver' role for source database and it failed with error. When I looked at the DMS documentation it mentioned ...
2
votes
1answer
286 views

ERROR: role “user1” cannot be dropped because some objects depend on it

On my Google Cloud SQL database instance (Postgres 9.6), I am unable to drop a user/role via the GCP Console that was created via the GCP Console. When I try, the Console shows a notification that ...
0
votes
0answers
24 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 ...
1
vote
1answer
41 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 ...
0
votes
0answers
25 views

Dump sql cloud mysql instance for external replica

I followed this guide to create an external replica of a cloud sql server: https://cloud.google.com/sql/docs/mysql/replication/configure-external-replica.I am getting this error when I try to start ...
1
vote
0answers
47 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 - ...
0
votes
0answers
106 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 ...
1
vote
0answers
21 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 ...
1
vote
1answer
102 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 ...
1
vote
1answer
49 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 ...
1
vote
0answers
151 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 ...
1
vote
2answers
2k views

Efficient key value store in Postgres

I want to use Postgres(11 in CloudSQL) as an efficient key value store. I have about 200GB of dictionaries (average size is 10kB, the structure can be different and nested). I'm thinking about ...
1
vote
1answer
106 views

migrate users from mariadb10.1 to mysql5.7

My company is moving our databases from self-hosted mariadb 10.1 to Google CloudSQL (which is essentially MySQL 5.7). Dumping / restoring our application schemas looks straightforward. However I'm ...
2
votes
1answer
1k views

PgAdmin 4.14 connection error in cloudSQL : could not send data to server, socket is not connected, could not send ssl negotiation packet

I am trying to connect cloud sql with pgadmin but it throws error when I try to execute query. "Could not send Data to server, socket is not connected, could not sent SSL negotiation pocket" ...
0
votes
0answers
54 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'...
1
vote
1answer
71 views

Speed up 180M+ rows returned by simple SELECT with PostgreSQL

I have performance issues on a SELECT statement which returns 180+ out of 220+ of millions of rows on my managed PostgreSQL. The table structure is the following: CREATE TABLE members ( id ...
0
votes
1answer
209 views

Removing MySQL Orphan Tables in Google's Managed MySQL

I have a number of orphan tables that I am unable to remove in Google managed MySQL instance. https://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html describes how to find them ...
0
votes
1answer
406 views

App Engine Standard connection to Cloud SQL Latency Randomly

I have a pretty "basic" app that we designed that was originally on a local plesk server and we migrated to GAE/GSQL/GCS. app engine, mysql, cloud storage. Here's some background info: App is PHP ...
1
vote
1answer
882 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....
1
vote
1answer
3k views

GCP MySQL query logging

I have a managed MySQL instance on GCP. Where would I find a query log? Is this something I need to enable first somewhere? I have read their documentation ( https://cloud.google.com/sql/docs/mysql/...
1
vote
0answers
105 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 ...
0
votes
2answers
140 views

Why is an instance forced to reboot?

This is My SQL Project instance log. I set the instance not to shut down automatically. But why does the instance automatically shut down irregularly? 2019-03-28 08:58:13.100 JST 2019-03-27 23:58:13 ...
1
vote
2answers
48 views

Improve speed of GCP SQL Failover

I've been trying out GCPs SQL high availability options. Is there a way to improve the fail over speed? Attempting manual failovers through the UI takes literally over 5 minutes where mysql is ...
1
vote
1answer
158 views

Google Cloud SQL lacks raster2pgsql

Google Cloud SQL supports the PostGIS extension, but I haven't seen any documentation regarding how to work with raster data on it. To load raster data into a table, we have to use raster2pgsql driver....
3
votes
0answers
289 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 ...
1
vote
0answers
60 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 ...
1
vote
2answers
67 views

How do you know when it's time to upgrade a RDBMS/SQL database infrastructure? What metrics to follow? [closed]

In my specific case, I have just deployed my side project to AWS and using AWS MySQL Tier 2 Micro instance, which is within AWS' Free Tier; https://aws.amazon.com/ec2/instance-types/t2/ It has: 20 ...
1
vote
1answer
579 views

What database to choose for 1TB of time series? [closed]

I'm saving about 3GB per day of financial orderbook data to a database (currently Mysql). In the coming weeks, I'm going to save trade and quote (bids/asks) data too. Data is structured, but I'm ...
1
vote
1answer
36 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 ...
0
votes
0answers
48 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 ...
1
vote
1answer
2k views

Set column to randomly chosen value from another table

Consider this: UPDATE dest SET dest_col = (SELECT s.src_col FROM source s WHERE s.name = 'abc' ORDER BY random() LIMIT 1 OFFSET 0); My goal: Set dest.dest_col in ...
0
votes
1answer
152 views

How to configure PG text search dictionary through sql

I want to add terms to a text search dictionary without access to the file system shares/tsearch_data (specifically for google cloud SQL). Is there a syntax to do this via SQL? All I have found is "...
1
vote
0answers
60 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] ...
2
votes
0answers
73 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....
1
vote
3answers
2k views

Google Cloud SQL Replication Delay

We have a project which does write data on a second generation MySQL 5.6 The master's write behaviour: Average 70 write operations per second. The thing is 2 times a day, application writes data ...