Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there logical decoding plug-ins available for Cloud SQL PostgreSQL?

I'm facing the following situation:

I have to do a logical replication of my Cloud SQL PostgreSQL instance to an external PostgreSQL database and vice-versa. More specifically, the CloudSQL and the external instance will contain some master and slave tables that must be replicated between each database. However, PostgreSQL logical and external replication are currently not supported by the GCP.

Since it is not supported, I've searched for an alternative, and I noticed that Debezium + Kafka can be used with CloudSQL MySQL to capture database changes and do logical replication. I asked the same question on the Debezium google group (link below) https://groups.google.com/forum/#!topic/debezium/yS61un46x8k

And they've answered to me:
"Debezium requires a specific logical decoding plug-in (either ProtoBufs or wal2json) installed within the source Postgres, I'm not sure whether you have that flexibility with your cloud SQL provider (but e.g. on Amazon RDS, wal2json is installed by default)."

Can anybody answer me if one of these plugins are available or can be installed within Cloud SQL PostgreSQL? If not, are there any alternative approach for logical replication while it is not supported by the platform? Thanks in advance.

like image 952
d4nielfr4nco Avatar asked Jun 21 '18 14:06

d4nielfr4nco


1 Answers

Cloud SQL Postgres does not support logical replication right now. You also have no way to use Debezium + Kafka because of missing logical replication.

I have to migrate from Cloud SQL Postgres to on-premises Postgres.

like image 97
Kevin Avatar answered Sep 22 '22 17:09

Kevin