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.

Google Cloud SQL is a service that allows you to create, configure, and use relational databases 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.

Intro and features

Developer documentation

FAQ

97 questions
6
votes
2 answers

Mysql query works in 200ms with 33594 parameters in SELECT IN (xx,xxx,xx) but runs hours with 33595 or more parameters, why?

We had a small malfunction which generated unexpected amount of data for a device. Our code ends up creating a select query along the lines of SELEXT * from XXX WHERE yyy IN (xxx,xxx,xxx....,xxxx) That should fetch data of last 5 days which normally…
Tuxie
  • 182
  • 1
  • 5
6
votes
1 answer

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 says "User deleted", then upon further inspection I…
Joe Hawkins
  • 161
  • 1
  • 1
  • 4
5
votes
1 answer

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 every row to a randomly picked value out of all the…
kamituel
  • 153
  • 1
  • 5
4
votes
2 answers

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" FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host…
WillyC
  • 143
  • 1
  • 5
4
votes
2 answers

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 leveraging improved hash indexes. Here is the schema: …
Lukasz Madon
  • 141
  • 1
  • 1
  • 5
4
votes
0 answers

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 throughout the day. I know I can do this using the gcloud…
Molenpad
  • 1,814
  • 2
  • 23
  • 41
4
votes
1 answer

Galera cluster into Google cloud platform

We have a galera cluster with 3 nodes, on 3 different physical machines but all located in the same datacenter. From what I understood, the reason they deployed this in the past was to increase availability and reliability, DC failures are not a…
3
votes
1 answer

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 partitioned by the column that has UUIDv4 values. Our…
ffox003
  • 305
  • 1
  • 2
  • 6
3
votes
1 answer

MySQL slow_log table: querying takes forever

I'm running a query on the slow_log: SELECT start_time FROM mysql.slow_log WHERE start_time < TIMESTAMP '2016-01-31 00:00:00' Without a WHERE clause (using a LIMIT), the selects are fast. However the LIMIT gives me the oldest logs, ORDER BY has the…
Jaap
  • 191
  • 1
  • 7
2
votes
1 answer

Why does the page cleaner in MySQL 8 increase the number of active connections to the database?

I have noticed that when the page cleaner is triggered in my MySQL 8 database, it causes a temporary increase in the number of active connections. This can result in increased wait time for new connections to the database and affect overall…
BadProgrammer
2
votes
1 answer

Creating manual superuser in cloudsql for postgres

I’m using google managed cloudsql database and I’m trying to create my own superuser manually and I’m getting below message Note: I’m logged in via existing superuser only(mycurrentuser_dev). CREATE ROLE channa WITH LOGIN SUPERUSER PASSWORD…
Shiwangini
  • 380
  • 7
  • 24
2
votes
1 answer

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 have checked and there are no bulk inserts from our…
hardik24
  • 93
  • 9
2
votes
0 answers

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 granted by the cloudsqlsuperuser, and I cannot…
2
votes
2 answers

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" But When I connect with different Database tool like…
prabhu
  • 23
  • 1
  • 7
2
votes
1 answer

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. What's the approach can be done?
1
2 3 4 5 6 7