I am trying to connect to Cloud SQL postgres using Debezium Postgres connector. And I am getting the following error in logs.
connect_1 | org.apache.kafka.connect.errors.ConnectException: org.postgresql.util.PSQLException: FATAL: must be superuser or replication role to start walsender
connect_1 | at io.debezium.connector.postgresql.PostgresConnectorTask.start(PostgresConnectorTask.java:127)
It occurred to me that I need to add REPLICATION to my user role. However, CloudSQL docs say the following.
When you create a new Cloud SQL for PostgreSQL instance, the default postgres user is already created for you, though you must set its password. The postgres user is part of the cloudsqlsuperuser role, and has the following attributes (privileges): CREATEROLE, CREATEDB, and LOGIN. It does not have the SUPERUSER or REPLICATION attributes.
Now because of this, I can't ALTER ROLE to add REPLICATION
ps: the cloud SQL instance is configured for high availability.