Using On-prem NTP time service for CloudSQL(PostgreSQL)

318 views
Skip to the first unread message

Suhas Vengilat

unread,
24 July 2020, 8:43:26 am24/7/20
to Google Cloud SQL discuss
Hi Team,

I've some Cloud SQL instances(PostgeSQL managed database services), design principle is to use synchronize the time with one existing in On-premise data center. As this is a managed service,how do I sync this NTP service with CloudSQL? 

Any pointers would be highly appreciated.

Thanks
Suhas
 

David (Google Cloud Support)

unread,
27 July 2020, 10:18:52 am27/7/20
to Google Cloud SQL discuss
I could not find any documentation indicating that syncing a Cloud instance with an on-prem PostgreSQL was possible, only migrating from on-prem to Cloud.
However, you can change the timezone of your Cloud instance from the default value. You can do so by editing your existing instance's `default_time_zone` flag through the console or through running a gcloud command. This information might prove useful to you.

Suhas Vengilat

unread,
29 July 2020, 8:43:54 am29/7/20
to Google Cloud SQL discuss
Hi David,

Thanks for sharing the details. 

My requirements is to sync with my on-premise time server. Not with Cloud SQL on-prem.

Is this possible? 

Thanks
Suhas

Olu

unread,
31 July 2020, 8:33:51 am31/7/20
to Google Cloud SQL discuss

Thank you for providing clarification to your needs. I think I understand this request as trying to keep local clocks in sync to match the time used by Google CloudSQL. Please let me know if my understanding is wrong. 

As you may already know, all Google Cloud Applications and APIs use the same NTP server time source including Cloud Functions, Cloud SQL, Datastore, BigTable, BigQuery, and DataFlow.

So, if indeed your target is to ensure that your Local Clocks are in sync with the same NTP Server, I believe you can find instructions about the required configurations here[1]. 

For more information about the Google Public NTP Servers, I found these articles[2][3] interesting and I think they may be helpful to guide your thoughts. 

Suhas Vengilat

unread,
1 Aug 2020, 8:00:04 pm1/8/20
to Google Cloud SQL discuss
Olu - thank you for providing pointers on this. Your understanding is perfectly right. 

Let me read through this and come back to you on this.

Best Regards
Suhas
Reply all
Reply to author
Forward
0 new messages