Skip to main content

AlloyDB for PostgreSQL

AlloyDB for PostgreSQL connects like any other PostgreSQL database — follow the Postgres guide for the read-only user, the replication slot and publication, the update methods, SSL modes and common errors. This page covers only what's different for AlloyDB, so that change data capture (CDC) runs reliably from the first sync.

Important

You can't build a table directly from an integration. Once the integration has synced, first create a semantic model based on its data — then you can build tables.

What you need before you start​

  • Hostname of the AlloyDB instance (see Instances → Connection info in the Google Cloud console)
  • Port — typically 5432
  • Database name
  • Username and password of a user that can read data and replicate
  • Access to run SQL on the database, to create the replication slot and publication

AlloyDB for PostgreSQL configuration form with Name, Host, Port, Database Name and Username fields

Step 1. Enable logical replication in AlloyDB​

AlloyDB must run with wal_level = logical. You set it as a database flag rather than in postgresql.conf:

  1. Console (UI): open your cluster → Instance → Flags → Add flag → wal_level = logical → Save & restart.

  2. gcloud CLI (same result, handy for automation):

    gcloud alloydb instances update INSTANCE_ID \
    --cluster=CLUSTER_ID \
    --database-flags wal_level=logical

After the instance restarts, check that SHOW wal_level; outputs logical.

Step 2. Create the replication slot and publication​

RevOS does not create them for you. Follow Set up Change Data Capture in the Postgres guide.

AlloyDB has no superuser accounts; the built-in alloydb_admin role is usually enough to create the slot and publication and to give your user replication rights.

Step 3. Fill out the integration form in RevOS​

On the Integrations page, click Add Data Source, choose AlloyDB for PostgreSQL, and fill in the form as described in Configure the integration in RevOS. For AlloyDB:

  • SSL Mode: require (minimum) or verify-full. AlloyDB always encrypts connections, so disable fails.
  • Update Method: Read Changes using Write-Ahead Log (CDC), with Plugin set to pgoutput (required for AlloyDB).

Step 4. Make the instance reachable​

SSH tunnel settings with jump server host, port, login username and private key fields

Check that:

  • AlloyDB authorized networks include the RevOS IP addresses
  • the instance's public or private IP and firewall rules allow inbound traffic on 5432
  • RevOS can reach your network (shared VPC or a VPC-peering route)

If the instance has no public IP and can't be reached directly, connect through an SSH tunnel — see Connect through an SSH tunnel.

Step 5. Test and connect​

Click Connect. RevOS checks the credentials, that it can reach the instance, and that the replication slot and publication exist. If something fails, see Common issues and fixes.