Connect CDC supports GCP Cloud SQL for Postgres as a source database when configured using the PostgreSQL server type.
To set up a Postgres server for a Cloud SQL database, follow the standard Postgres server configuration steps in Create a new remote PostgreSQL. Additionally, consider the GCP Cloud SQL–specific requirements outlined below.
Support configuration
Connect CDC supports GCP Cloud SQL server for Postgres when all of the following conditions are met:
- The database is hosted on Google Cloud SQL for Postgres.
- Postgres logical replication is enabled on the Cloud SQL instance.
- A dedicated replication user is configured.
- Connect CDC connects to the primary Cloud SQL instance endpoint.
For a complete list of supported Postgres versions, see PostgreSQL platform support.
Replication user requirement
The replication user must have Postgres replication privileges to enable Connect CDC to capture changes using logical replication. For example:
ALTER USER rpuser WITH REPLICATION;Important considerations:
- In GCP Cloud SQL environments, database users cannot be created through SQL by Connect CDC or any other application.
- A database user cannot create or manage other users in the Cloud SQL environment.
- Do not create an
rpuserduring metabase creation. - The
rpuserfor GCP is not created, modified, or managed by the Connect CDC metabase installation. - You must create the
rpuserexternally using the GCP administrative (DCP) portal, then provide the username and password to Connect CDC. - Connect CDC does not support automatic creation of the
rpuser.
Postgres server creation for GCP Cloud SQL
When creating a GCP Cloud SQL server for Postgres database, configure the server properties as described in the following sections.
| Server property | Description |
|---|---|
| DBMS Type | PostgreSQL |
| DBMS Version | The major PostgreSQL version running on the Cloud SQL instance. |
| Remote Machine Name or IP | The endpoint of the primary Cloud SQL instance. |
| Replication (Rep) User | A Cloud SQL user configured with the permissions required for database replication. |
| DBMS Instance Port | The Cloud SQL PostgreSQL port (default: 5432) |
All other server properties are configured and behave the same as they do for any supported PostgreSQL deployment.