Friday, November 30, 2018

[google-cloud-sql-discuss] Re: MySQL 8.0 support

Hi,

You may follow this feature request which already exists in the Issue Tracker via this link. I transferred your interest on having MySQL 8.0 support to Google Cloud SQL product team as well. 

--
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/d446d469-e366-4ee6-bc4e-acc7993c1eba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Logical Decoding

Hello Sri Krishna, 

You are right, there is work in progress on exactly the same issue; you may follow title "Change the wal_level to logical for logical decoding" in Issue Tracker

It may be worthwhile mentioning here that, not surprisingly, this feature is present for instances deployed in Compute Engine; details on the "How to Set Up PostgreSQL for High Availability and Replication with Hot Standby" page

--
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/ccc76562-3ac8-426d-9040-87888807de42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: MySQL 8.0 support

aws supports it now: https://aws.amazon.com/about-aws/whats-new/2018/10/amazon-rds-now-supports-mysql-8/

any word yet, google?

On Wednesday, November 7, 2018 at 5:11:41 PM UTC-5, Ryan Toth wrote:
Any word on this yet performance difference is huge!!! thinking about mariadb if this isn't rolling out sometime soon.

--
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/0d4e7a65-1158-4a3c-a8e2-5625b429a2ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thursday, November 29, 2018

[google-cloud-sql-discuss] Logical Decoding

Hi,

We want to use logical decoding to read and push any changes to our database into data processing pipelines. I've tried doing it as documented in the official Postgres docs for 9.6. But cloud sql is disallowing me to change the wal_level to logical. I've looked for this in other providers and Amazon RDS already provides this and has a blog posted about it here.

Is there a way do this already? If yes then can you point me to the documentation?
If there isn't is it part of the roadmap?

--
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/0aefe94b-c437-434f-b82a-1d7d4729af04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Monday, November 26, 2018

[google-cloud-sql-discuss] Re: Cloud SQL PostgreSQL Point in time recovery

Hi Jonathan,

I should note that Point-in-time recovery for Cloud PostgreSQL isn't available at this time, however there is a feature request on it and the Cloud SQL product team are evaluating this feature request. You may star it for further updates.

--
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/abe7e18e-bc8d-47ae-af91-1f7a195c938e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Cloud SQL PostgreSQL Point in time recovery

Does anyone have any solutions to implementing a point in time recovery on a PostgreSQL hosted on GCP?

A couple ways that I have found that could be a potential solution is if Cloud SQL PostgreSQL could create an external read replica so that I would be able to have the replica update the write ahead log file every time it changes, or somehow get access to the CloudSQL write ahead logs. To my knowledge, I don't think these features have been implemented yet.

Any suggestions or leads will be helpful. Thank you.

--
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/a551ea73-f598-4a6b-95bd-3d0d02b8802c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Saturday, November 24, 2018

[google-cloud-sql-discuss] Re: Google Cloud SQL (Postgres) 30% slower than local PC

Thanks Dan. We got it to a point now where the performance is fair enough. It's a tidy bit slower then our previous setup but it can handle load better, so we are fine with it for now. Will go through the articles soon to see if we can improve it a bit more. 

Op maandag 19 november 2018 22:09:26 UTC+1 schreef Dan (Cloud Platform Support):

Hello,


It seems that you didn't create this report two times, there are no worries.


Unfortunately, there is no way to compare the Cloud SQL Postgre performance with another Cloud SQL service from my side.


It seems that you're following the right steps to improve the Database performance, such as check the location, increase the tier when the instance looks throttled and upgrade the disk since larger disks have more IOPS available. I would add on your to-do list to implement cache, case your queries will not be constrained to I/O performance. Ideally, the entire data set can fit in 70% of RAM. Additionally, I recommend that you investigate non-Cloud SQL issues, like optimized queries by adding appropriate indexing, reduce the scanned data and avoid extra round trips. Uou can find some information regarding this in the following website[1].


You can troubleshoot performance issues by following the instructions in the following documentation[2].


I hope this documentation could help you to determine the root cause of this performance issue,


[1] https://use-the-index-luke.com/

[2] https://cloud.google.com/sql/docs/postgres/diagnose-issues



On Thursday, November 15, 2018 at 11:07:03 AM UTC-5, Marcel wrote:
Hi,

I hope I don't post this duplicate because I already posted this, but I cannot find it anywhere so maybe something went wrong.

We are migrating our APP + DB to Google Cloud. However, we can't get the database to a level of performance as needed. We created a heavy select query with lots of joins and on my local PC it's way faster than it's on Google Cloud SQL. We are moving from a managed Amazon solution, and the current setup on Amazon is also faster. On both my PC and Amazon it's somewhere nere 30% faster on any query. 

How come Google Cloud SQL Postgres is so slow? I tried a lot of things to increase the performance:
  • Upgraded the disk to improve read/write speed as suggested by Google
  • Added more CPUs and RAM (makes no difference)
  • The database instance runs in Frankfurt which is close to my home so I don't think there is any noticable latency on this end
What else can I try to improve the performance? I find it very strange that my PC (which is not optimized to run Postgres) is 30% faster than a optimized instance on Google Cloud. 

How can I debug this and how can I improve this? 

Thanks! 

--
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/78df2a8f-acf3-4c9b-8955-5640af3cee18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thursday, November 22, 2018

[google-cloud-sql-discuss] Re: Migrating from Cloud SQL to Datastore

Hello Sajid, 

How did you import datastore from google.cloud? The entirety of your code is needed for examination. This is not the right place for such extensive coding issue. As pointed out in a previous answer, if your issue is not a platform issue but rather a problem with how you've configured your code, you should ask for help in specialized forums such as stackoverflow. 

--
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/22bc2da7-73c5-4e99-98b1-26771d681961%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: What is the timeline for when Cloud SQL upgrades to Postgres 11

Hello Ray, 

This is a known feature request, and in progress with Engineering, under an issue in the Public Issue Tracker. You may follow developments up to final implementation in that PIT issue

--
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/1f957c52-0e6b-4f5f-a539-f79bd534da50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wednesday, November 21, 2018

[google-cloud-sql-discuss] What is the timeline for when Cloud SQL upgrades to Postgres 11

Where can I find information about when Cloud SQL will be supported newer versions of postgres (like Postgres 11)?

--
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/c4c93677-eeeb-41e4-a9e5-41dc845a4f29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: LDAP authentication for PostgreSQL

Hello,

It is currently not possible to use LDAP authentication in PostgreSQL. However, I have found an open feature request for this on the issue tracker website [1]. I suggest you star it to get email updates. In addition, users have no access to pg_hba.conf in Cloud SQL.

--
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/b15d4cb6-65c1-4394-b488-fc6f8ba24349%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Cannot connect to Cloud SQL with Java SocketFactory Library

Yeah, it was a firewall issue indeed.
Linked SO question: https://stackoverflow.com/questions/53306610/cannot-connect-to-cloud-sql-with-java-socketfactory-library

On Tuesday, November 20, 2018 at 8:09:44 PM UTC-2, Yasser Karout (Cloud Platform Support) wrote:
Hello,

Are you connecting to Cloud SQL through a proxy? If you have a corporate firewall setup, you might need to add an exception to allow connections to the instance. It is worth looking into this if the connection is being blocked. 

I found a similar issue on the issue tracker website that suggest this is a proxy issue [1]. There is also a similar issue posted on Stackoverflow but for MySQL [2]. 

It might be better to post this issue on Stackoverflow as it is more suited for development questions.

--
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/654a684f-edb4-4e65-9eca-236188f85881%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Migrating from Cloud SQL to Datastore

Hi,
Thanks for looking into this.
Actually I solved this and it seems that the documentation is not clear about the importance of custom namespaces.

All I had to do was change:
$datastore = new DatastoreClient(['projectId' => $projectId]);
to 
$datastore = new DatastoreClient(['projectId' => $projectId, 'namespaceId' => 'ssd']);

I was not using 'default' namespace. That was causing all the problem.
Hope someone will add this to the documentation.


On Wednesday, November 21, 2018 at 8:26:48 AM UTC-8, Mohammad I (Cloud Platform Support) wrote:

Hello Sajid,


I have reproduced your code as below with some modification after executing the commands and PHP code outlined here.


$datasetId = $projectId;

$datastore = new DatastoreClient(['projectId' => $projectId]);

function llist($datastore){

$query = $datastore->query()

       ->kind('Task');

   $results = $datastore->runQuery($query);

$entries = [];

$count = 0;

foreach ($results as $entity) {

$count++;

}


echo $count; // this shows me '1' results when I have used Kind('Task') and shows me '0' for Kind('Task1') .

}

llist($datastore);


The kind, 'Task' was defined in the PHP code of the above mentioned link as a result when the modified version of your code was executed it has shown the result 1. When the kind, 'Task' was modified with 'Task1' it has shown the result 0.


From the above observation, it is appearing the kind, 'keypad_research' that you used may not exist or your typed it wrong. In addition the variable $cursor is not defined in your code which I removed during reproduction as it was showing the following error:


PHP Notice:  Undefined variable: cursor in /home/.../php/index.php on line 17


As it was mentioned earlier, If your issue is not a platform issue but rather a problem with how you've configured your code, although you're not sure what it may be specifically, you should post to StackOverflow and community of developers will assist you.



On Tuesday, November 20, 2018 at 12:50:02 AM UTC-6, sajid saiyed wrote:
Thanks Omair for your guidance.

So I tried to first see if my PHP can talk to Datastore and retrieve data.
I created two entities nuder the kind "keypad_research".

This is how my PHP looks like:

<?php
require __DIR__ . '/../../vendor/autoload.php';
use Google\Cloud\Datastore\DatastoreClient;
use Google\Cloud\Datastore\Entity;
$projectId = "__my projectID__";
$datasetId = $projectId;
$datastore = new DatastoreClient(['projectId' => $projectId]);
function llist($datastore){
$query = $datastore->query()
        ->kind('keypad_research')
->start($cursor);

    $results = $datastore->runQuery($query);
$entries = [];
$count = 0;
foreach ($results as $entity) {
$count++;
}

echo $count; // this shows me '0' results even when I have 2 entities.
}
llist($datastore);
?>

Do I need to do any addition configuration or edit my PHP to be able to read from datastore?

I am thinking of writing a PHP script that will first read from SQL database and insert entities in datastore.
But my very basic attempt at reading data from datastore using PHP is failing.

Any advice is appreciated.


On Monday, November 19, 2018 at 9:28:34 AM UTC-8, Omair (Cloud Platform Support) wrote:

Hi Sajid,


Unfortunately there is no automatic way to migrate a Cloud SQL database to Datastore.  The general process for migrating is as follows:


  1. Map your relational model to datastore kinds and entities

  2. [Optional] Download your relational database as csv

  3. Write a script using one of our Cloud Datastore Client Libraries that would transfer your data from Cloud SQL or the csv in step 2 to Datastore

  4. If you have a large database, it would speed up the migration process by hosting your script on App Engine.



If you require assistance in writing your script for migrating relational database to Datastore it is recommended to post your complete question to Stack Overflow using one of our supported tags, as your question will receive a lot more attention there.


I have found a useful post on Stack Overflow for you that I think might help you.



On Sunday, November 18, 2018 at 4:22:23 PM UTC-5, sajid saiyed wrote:
Hi,
I am currently using Cloud SQL but its an over kill for the small application that I moved from another host to Google Cloud.
I wanted to know how can I move my data from SQL to Datastore?

Is there an automatic way to do that?
It would be impossible to manually re-create the existing database in Datastore (100's of rows of sql data).

Any tips are appreciated.

--
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/0e445e0f-33bd-458b-8e8d-4d3859e25de0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: The default value about “idle_in_transaction_session_timeout” of PostgreSQL in CloudSQL?

You can set idle_in_transaction_session_timeout on the session level in PostgreSQL 9.6 using SET [1]:

SET SESSION idle_in_transaction_session_timeout = '5min';

If you need this to be set at instance level, I recommend opening a Feature Request on the issue tracker website [2] so that the Cloud SQL Team can look into it as this flag is not implemented for Postgres in Cloud SQL [3]

[1] https://www.postgresql.org/docs/current/sql-set.html
[2] https://issuetracker.google.com/
[3] https://cloud.google.com/sql/docs/postgres/flags#list-flags-postgres

--
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/dae505d3-390c-4f49-b529-a3c89fb2699a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Migrating from Cloud SQL to Datastore

Hello Sajid,


I have reproduced your code as below with some modification after executing the commands and PHP code outlined here.


$datasetId = $projectId;

$datastore = new DatastoreClient(['projectId' => $projectId]);

function llist($datastore){

$query = $datastore->query()

       ->kind('Task');

   $results = $datastore->runQuery($query);

$entries = [];

$count = 0;

foreach ($results as $entity) {

$count++;

}


echo $count; // this shows me '1' results when I have used Kind('Task') and shows me '0' for Kind('Task1') .

}

llist($datastore);


The kind, 'Task' was defined in the PHP code of the above mentioned link as a result when the modified version of your code was executed it has shown the result 1. When the kind, 'Task' was modified with 'Task1' it has shown the result 0.


From the above observation, it is appearing the kind, 'keypad_research' that you used may not exist or your typed it wrong. In addition the variable $cursor is not defined in your code which I removed during reproduction as it was showing the following error:


PHP Notice:  Undefined variable: cursor in /home/.../php/index.php on line 17


As it was mentioned earlier, If your issue is not a platform issue but rather a problem with how you've configured your code, although you're not sure what it may be specifically, you should post to StackOverflow and community of developers will assist you.



On Tuesday, November 20, 2018 at 12:50:02 AM UTC-6, sajid saiyed wrote:
Thanks Omair for your guidance.

So I tried to first see if my PHP can talk to Datastore and retrieve data.
I created two entities nuder the kind "keypad_research".

This is how my PHP looks like:

<?php
require __DIR__ . '/../../vendor/autoload.php';
use Google\Cloud\Datastore\DatastoreClient;
use Google\Cloud\Datastore\Entity;
$projectId = "__my projectID__";
$datasetId = $projectId;
$datastore = new DatastoreClient(['projectId' => $projectId]);
function llist($datastore){
$query = $datastore->query()
        ->kind('keypad_research')
->start($cursor);

    $results = $datastore->runQuery($query);
$entries = [];
$count = 0;
foreach ($results as $entity) {
$count++;
}

echo $count; // this shows me '0' results even when I have 2 entities.
}
llist($datastore);
?>

Do I need to do any addition configuration or edit my PHP to be able to read from datastore?

I am thinking of writing a PHP script that will first read from SQL database and insert entities in datastore.
But my very basic attempt at reading data from datastore using PHP is failing.

Any advice is appreciated.


On Monday, November 19, 2018 at 9:28:34 AM UTC-8, Omair (Cloud Platform Support) wrote:

Hi Sajid,


Unfortunately there is no automatic way to migrate a Cloud SQL database to Datastore.  The general process for migrating is as follows:


  1. Map your relational model to datastore kinds and entities

  2. [Optional] Download your relational database as csv

  3. Write a script using one of our Cloud Datastore Client Libraries that would transfer your data from Cloud SQL or the csv in step 2 to Datastore

  4. If you have a large database, it would speed up the migration process by hosting your script on App Engine.



If you require assistance in writing your script for migrating relational database to Datastore it is recommended to post your complete question to Stack Overflow using one of our supported tags, as your question will receive a lot more attention there.


I have found a useful post on Stack Overflow for you that I think might help you.



On Sunday, November 18, 2018 at 4:22:23 PM UTC-5, sajid saiyed wrote:
Hi,
I am currently using Cloud SQL but its an over kill for the small application that I moved from another host to Google Cloud.
I wanted to know how can I move my data from SQL to Datastore?

Is there an automatic way to do that?
It would be impossible to manually re-create the existing database in Datastore (100's of rows of sql data).

Any tips are appreciated.

--
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/448dd779-1bae-4943-bf21-98f278074ca6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] LDAP authentication for PostgreSQL

Hi,

We're using Cloud SQL for PostgreSQL.
Is it possible to use LDAP to authenticate users?


I found this section in the PostgreSQL documentation:
https://www.postgresql.org/docs/9.6/client-authentication.html

It seems that we need access to pg_hba.conf is that possible with Cloud SQL?


John Malone

--
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/919addb6-bf8c-437e-9c55-db87e46c4e8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] The default value about “idle_in_transaction_session_timeout” of PostgreSQL in CloudSQL?

I spent more time to figure out this problem, but get nothing. Have anyone know the answer ? 


Or teach me how to set the value "idle_in_transaction_session_timeout" of Postgres in CloudSQL.


Thanks for your help !!

--
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/f30e2f2c-2bc1-4353-9d1f-73fa1f60aa95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tuesday, November 20, 2018

[google-cloud-sql-discuss] Re: HTTPError 409: The instance or operation is not in an appropriate state to handle the request.

Hi Marcin,

As noted here, you can't reuse the instance name for up to a week when you delete the instance.

--
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/60ffaee6-f564-49b7-b4ea-a229500d2c80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: triggers in postgres

Hello Jonathan,


While Google Cloud SQL allows users to create triggers on Postgres database it is not something that comes under the scope of Google Cloud Platform. Triggers on Cloud SQL are similar to triggers created on locally hosted Postgres DB instance. I have found a useful link for you to learn how to create triggers in Postgres.


I hope this helps. Feel free to contact us again should you require any further assistance.



On Tuesday, November 20, 2018 at 2:19:08 PM UTC-5, Jonathan Delgado wrote:

Good day: How can I create, store and execute triggers in postgres?

--
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/7d405471-ad6c-4def-af71-21dafceab433%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: ERROR: (gcloud.sql.instances.create)/(gcloud.sql.instances.delete) HTTPError 409: The instance or operation is not in an appropriate state to handle the request.

I see you have created a duplicate thread about the same question in Google Groups. In order to avoid duplicating efforts I recommend to work with the duplicate one. 

--
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/80b82907-7833-4001-991f-501d9d3f116a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Google Cloud SQL slow outputting query result

Hello,


It seems that you're following the right steps to improve the Database performance, such as check the geographic location and set the system to be near the database, increase the tier when the instance looks throttled and upgrade the disk since larger disks have more IOPS available.


I would add on your to-do list like, implement a cache system, case your queries will not be constrained to I/O performance. Ideally, the entire data set can fit in 70% of RAM. And additionally, I recommend that you investigate non-Cloud SQL issues, like optimized queries by adding appropriate indexing, reduce the scanned data and avoid extra round trips. You can find some information regarding this in the following website[1].


Also, you can troubleshoot performance issues by following the instructions in the following documentation[2].


I hope this documentation could help you to determine the root cause of this performance issue.


[1] https://use-the-index-luke.com/

[2] https://cloud.google.com/sql/docs/postgres/diagnose-issues

--
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/e2dde5be-bc7f-4820-bb0b-026d5e1f8dd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Google Cloud SQL slow outputting query result

I would add on your to-do list like, implement a cache system, case your queries will not be constrained to I/O performance. Ideally, the entire data set can fit in 70% of RAM. And additionally, I recommend that you investigate non-Cloud SQL issues, like optimized queries by adding appropriate indexing, reduce the scanned data and avoid extra round trips. You can find some information regarding this in the following website[1].

Also, you can troubleshoot performance issues by following the instructions in the following documentation[2].

I hope this documentation could help you to determine the root cause of this performance issue.

[1] https://use-the-index-luke.com/
[2] https://cloud.google.com/sql/docs/postgres/diagnose-issues

On Wednesday, November 14, 2018 at 3:59:49 PM UTC-5, Nicola Donadoni wrote:

I am having a problem querying my database on Google Cloud SQL (mysql second generation): whenever I execute a query, its result is received in a relatively large amount of time, and I've noticed that it's a problem of fetching the data rather than executing the query, because this duration changes every time that I re-run the same query on the same underline data.

My SQL instance is a db-n1-standard-1 and CPU or RAM usage don't get even close to its hardware limitation. I have increased the disk space to 50GB (SSD) to allow higher throughput but nothing changed.

For example, if I query 6MB of data, I get an answer after ~600ms to ~1s when I would expect to receive it in about 300ms given that the lowest throughput on the SSD is 24MB/s and the network throughput is irrelevant at 250MB/s. This happens both when I connect to the SQL instance from my computer or from Google App Engine (I isolated the log for detecting exactly only the query + data transport time), DB is in Belgium, App Engine Server is in London.

If I run the query with the mysql profiling active, I can see that the actual query (the sum of all the durations of the steps) takes about 3ms so my guess is that there is problem transporting the data. I do use some JSON_OBJECT transformation when selecting but I guess that that should be already considered in some of the steps of the profiling result?

Can you please help me to identify and solve the problem?

--
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/b1ea6258-f062-4109-873a-744012342941%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] Re: Cannot connect to Cloud SQL with Java SocketFactory Library

Hello,

Are you connecting to Cloud SQL through a proxy? If you have a corporate firewall setup, you might need to add an exception to allow connections to the instance. It is worth looking into this if the connection is being blocked. 

I found a similar issue on the issue tracker website that suggest this is a proxy issue [1]. There is also a similar issue posted on Stackoverflow but for MySQL [2]. 

It might be better to post this issue on Stackoverflow as it is more suited for development questions.

[1] https://issuetracker.google.com/116257089
[2] https://stackoverflow.com/questions/46221131/using-cloud-sql-proxy-behind-corporate-firewall-cant-connect-to-mysql-instanc

--
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/dc863426-d6f4-4c29-8ff1-5fbc52dd7e2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: [google-cloud-sql-discuss] ERROR: (gcloud.sql.instances.create)/(gcloud.sql.instances.delete) HTTPError 409: The instance or operation is not in an appropriate state to handle the request.

Use a different name, CloudSQL names are hashed for 7 days after deletion.
-Doron


On Tue, Nov 20, 2018 at 9:19 PM Marcin Goleń <marcin.golen@gft.com> wrote:
I have created CloudSQL instance with name 'my-instance' in 'gft-swat-team' project.
Deletion process was started.

Now I cannot create CloudSQL instance with the same name 'my-instance' either I cannot delete 'my-instance'.
I am trying to both create/delete with gcloud command.
Error message that is in subject appears in both cases.

No instances are visible in Console.

Can you help me?
Regards,

--
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/16a42e1f-2250-4820-8de6-e942c434d041%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CALOz8irAoKaQC%3DGKUydZoDwyVejOCymC3eT5kNvHV_hkdM8hmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] triggers in postgres


Good day: How can I create, store and execute triggers in postgres?

--
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/95a58251-674b-4f57-bfe2-ada2c6ca6775%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] triggers in postgres

ood day:    How can I create, store and execute triggers in postgres?

--
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/1c9772d4-6329-40f8-bdef-a6ca6b59caf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] HTTPError 409: The instance or operation is not in an appropriate state to handle the request.

Hi,

I have created CloudSQL instance with name 'my-instance'.
Then I 'almost' delete it. I mean I have deleted it by gcloud command, but it looks like it is not deleted yet, because I'm not able to delete this CloudSQL instance either to create CloudSQL instance with name 'my-instance'.
Following error message appears:
"HTTPError 409: The instance or operation is not in an appropriate state to handle the request."

Regards,

--
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/61c95b9a-3082-49f5-9c12-a62d40071c4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[google-cloud-sql-discuss] ERROR: (gcloud.sql.instances.create)/(gcloud.sql.instances.delete) HTTPError 409: The instance or operation is not in an appropriate state to handle the request.

I have created CloudSQL instance with name 'my-instance' in 'gft-swat-team' project.
Deletion process was started.

Now I cannot create CloudSQL instance with the same name 'my-instance' either I cannot delete 'my-instance'.
I am trying to both create/delete with gcloud command.
Error message that is in subject appears in both cases.

No instances are visible in Console.

Can you help me?
Regards,

--
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/16a42e1f-2250-4820-8de6-e942c434d041%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Monday, November 19, 2018

[google-cloud-sql-discuss] Re: Migrating from Cloud SQL to Datastore

Thanks Omair for your guidance.

So I tried to first see if my PHP can talk to Datastore and retrieve data.
I created two entities nuder the kind "keypad_research".

This is how my PHP looks like:

<?php
require __DIR__ . '/../../vendor/autoload.php';
use Google\Cloud\Datastore\DatastoreClient;
use Google\Cloud\Datastore\Entity;
$projectId = "__my projectID__";
$datasetId = $projectId;
$datastore = new DatastoreClient(['projectId' => $projectId]);
function llist($datastore){
$query = $datastore->query()
        ->kind('keypad_research')
->start($cursor);

    $results = $datastore->runQuery($query);
$entries = [];
$count = 0;
foreach ($results as $entity) {
$count++;
}

echo $count; // this shows me '0' results even when I have 2 entities.
}
llist($datastore);
?>

Do I need to do any addition configuration or edit my PHP to be able to read from datastore?

I am thinking of writing a PHP script that will first read from SQL database and insert entities in datastore.
But my very basic attempt at reading data from datastore using PHP is failing.

Any advice is appreciated.


On Monday, November 19, 2018 at 9:28:34 AM UTC-8, Omair (Cloud Platform Support) wrote:

Hi Sajid,


Unfortunately there is no automatic way to migrate a Cloud SQL database to Datastore.  The general process for migrating is as follows:


  1. Map your relational model to datastore kinds and entities

  2. [Optional] Download your relational database as csv

  3. Write a script using one of our Cloud Datastore Client Libraries that would transfer your data from Cloud SQL or the csv in step 2 to Datastore

  4. If you have a large database, it would speed up the migration process by hosting your script on App Engine.



If you require assistance in writing your script for migrating relational database to Datastore it is recommended to post your complete question to Stack Overflow using one of our supported tags, as your question will receive a lot more attention there.


I have found a useful post on Stack Overflow for you that I think might help you.



On Sunday, November 18, 2018 at 4:22:23 PM UTC-5, sajid saiyed wrote:
Hi,
I am currently using Cloud SQL but its an over kill for the small application that I moved from another host to Google Cloud.
I wanted to know how can I move my data from SQL to Datastore?

Is there an automatic way to do that?
It would be impossible to manually re-create the existing database in Datastore (100's of rows of sql data).

Any tips are appreciated.

--
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/9d54e616-355f-4249-8eda-735f4c7152bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.