Skip to main content
This page covers the Google Cloud SQL-specific steps to prepare your PostgreSQL instance for ELT & CDC. After completing them, follow the common setup (sync user grants, heartbeat table, publication, and replication slot) on the PostgreSQL source for ELT & CDC page.

Requirements

  • Cloud SQL for PostgreSQL version 10 or above.
  • Connect to the primary instance. Logical replication only works on the primary.
  • Tables with a PRIMARY KEY.

Enable logical replication

1

Open the Cloud SQL instance

In the Google Cloud Console, select the project that contains your Cloud SQL instance.
2

Add the cloudsql.logical_decoding flag

Edit the instance, open the Flags section, add cloudsql.logical_decoding and set it to ON, then save your changes.
Adding cloudsql.logical_decoding flag set to ON in Cloud SQL instance
Saving the logical decoding flag changes in Cloud SQL instance settings
3

Restart the instance

This change requires the instance to restart before it takes effect.
Cloud SQL instance restart prompt after flag changes
4

Verify the flag

Confirm the change under Flags on the Overview page, or run:
SHOW cloudsql.logical_decoding;

Grant the replication role

After creating the sync user (see the common setup), grant the replication attribute:
ALTER ROLE integrateio WITH REPLICATION;

Next: common setup

Continue with the canonical PostgreSQL setup for the remaining steps — sync user privileges (USAGE, SELECT, REFERENCES), heartbeat table, publication, and replication slot:

PostgreSQL source for ELT & CDC

SSH Tunnel

PostgreSQL PrivateLink

Last modified on June 2, 2026