Are there alternatives for CloudSQL PostgreSQL logical replication for now?

1,880 views
Skip to first unread message

Daniel Franco

unread,
Jun 20, 2018, 10:47:59 AM6/20/18
to Google Cloud SQL discuss
Currently, Google Cloud SQL for PostgreSQL does not support logical replication. 
However, I need to build a sync service between two databases (one Cloud SQL instance and one External Database instance).
Some of the tables of the External Database must work as a master table and some as slave tables. The same applies to the Cloud SQL instance.
Also, I don't necessarily need to stream the changes. It could be run in a batch.
I need to use CloudSQL and not GCE for this.

Is there an alternative way to do logical replication leveraging PostgreSQL's WAL in CloudSQL? The only option I can see to gather the CDC is by using triggers, but that implies in overhead in both databases and other issues as well.
I don't know if Google Cloud Dataflow would be an overkill for this situation.

Thanks in advance. I would be really grateful if someone could help me on this. 

Katayoon (Cloud Platform Support)

unread,
Jun 21, 2018, 10:30:04 AM6/21/18
to Google Cloud SQL discuss

Yes, currently Cloud SQL for PostgreSQL does not support replication from an external master or external replicas for Cloud SQL instances. I should note that the Cloud SQL product team are working on this feature request and it is planned to be available soon, however we cannot provide you any ETA for the implementation.


Another storage option can be using Cloud Spanner which is ideal for relational, structured data that requires transactional reads and writes.


Applying Dataflow option depends on the amount/frequency of your transactions. So, I recommend that you contact Google Cloud Platform sales team and discuss your project with them. If you have a Premium support package, the architecture advisory service is available for you as well.


I should note that Google Groups are reserved for general product discussions. We cannot provide you any advice on your system’s architecture.


Daniel Franco

unread,
Jun 21, 2018, 11:54:36 AM6/21/18
to Google Cloud SQL discuss
Thanks for your reply, Katayoon.

I'm definetely looking forward to this feature to become available.

Lindsay Ryan

unread,
Aug 21, 2018, 12:47:42 PM8/21/18
to Google Cloud SQL discuss
@Katayoon - regarding Dataflow - is it possible to connect Dataflow to read CDCs from CloudSQL? Is there any other technology or setup that can serve to publish changes from CloudSQL to subscribers? I've been looking for any cookbook recipes or mention but i haven't found anything

Thanks.

Katayoon (Cloud Platform Support)

unread,
Aug 22, 2018, 8:29:39 PM8/22/18
to Google Cloud SQL discuss

I couldn’t find any hook or setup for CDC from Cloud SQL to Cloud Dataflow, however you may create a feature request so that the Cloud SQL product team may evaluate it.


Petrus Gomes

unread,
Nov 4, 2019, 7:02:57 PM11/4/19
to Google Cloud SQL discuss
Hi, any updates about this feature request?
Thanks

Kiran Shenoy

unread,
Nov 5, 2019, 12:51:19 PM11/5/19
to Google Cloud SQL discuss
Based on Cloud Roadmap ( Oct 2019):
https://drive.google.com/file/d/1T82o5aiBb3quCknoopgA8DvZ8cRKRLIz/view

Both External replica and Cross Region Replication is coming to CloudSQL (PostgreSQL)  in H2-2020 - H1-2021.

Nguyễn Văn Cao Nguyên

unread,
Apr 6, 2020, 10:50:13 AM4/6/20
to Google Cloud SQL discuss
Hi, is that roadmap published somewhere?

To compare with Azure or AWS, GCP SQL features are to poor.
Since our company more and more rely on Postgres, we're considering moving away when our data still small.
But if this feature are promised to deliver in next few months then we can wait.

Katayoon (Cloud Platform Support)

unread,
Apr 7, 2020, 3:08:44 PM4/7/20
to Google Cloud SQL discuss
Hello,

You may follow up the Cloud SQL for PostgreSQL release note for announcements about new features


Germán Larraín

unread,
Jun 2, 2020, 1:24:59 PM6/2/20
to Google Cloud SQL discuss
Yes, currently Cloud SQL for PostgreSQL does not support replication from an external master or external replicas for Cloud SQL instances. I should note that the Cloud SQL product team are working on this feature request and it is planned to be available soon, however we cannot provide you any ETA for the implementation. 

A year later... Any news in this regard? It is quite necessary for our company (and frankly, kind of a basic feature).

Thanks 

maximusm

unread,
Jun 2, 2020, 11:22:32 PM6/2/20
to Google Cloud SQL discuss
Hey Folks,

Still no news on our end. I just poked the team for some news, and I'll post back here if they have any information on their progress. 

Damon Ramsey

unread,
Jun 14, 2020, 1:06:54 PM6/14/20
to Google Cloud SQL discuss

We have been patiently waiting for external replica functionality for about a year now. 
Disappointed that this is not available, and it makes Google Cloud Platform seem very immature compared to Amazon.

D

Germán Larraín Muñoz

unread,
Dec 14, 2020, 3:49:22 AM12/14/20
to Google Cloud SQL discuss
Hey Maximus

Any news? It's been 2.5 years since this message from GCP:
> I should note that the Cloud SQL product team are working on this feature request and it is planned to be available soon, however we cannot provide you any ETA for the implementation.

If it is not really in the roadmap it'd be great to know.

Thanks

jstsetinin

unread,
Dec 15, 2020, 3:27:35 AM12/15/20
to Google Cloud SQL discuss
The Cloud SQL engineering team is working on this issue, here you can find a Feature Request. You can star it in order to get notified when it gets updated. Also you can write a comment there and ask a question. Please, bear in mind that we don't have an ETA for it.
Reply all
Reply to author
Forward
0 new messages