Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:Risingwavelabs Risingwave CDC Source Database Preparation

From Leeroopedia


Knowledge Sources
Domains CDC, Database_Administration
Last Updated 2026-02-09 07:00 GMT

Overview

A database configuration procedure that enables Change Data Capture by activating transaction log replication features on the source database.

Description

CDC Source Database Preparation is the prerequisite step for any Change Data Capture pipeline. Before a streaming database can capture changes from an upstream relational database, that database must be configured to expose its transaction log (binlog for MySQL, Write-Ahead Log for PostgreSQL).

For MySQL, this involves enabling row-based binary logging (binlog_format=ROW) and creating a user with REPLICATION SLAVE privileges. For PostgreSQL, it requires setting wal_level=logical and creating a publication for the tables to be replicated. For MongoDB, replica set mode must be enabled.

This preparation is database-specific and must be done by a database administrator before RisingWave can establish a CDC connection.

Usage

Use this principle when:

  • Setting up a CDC pipeline from MySQL, PostgreSQL, or MongoDB
  • Configuring source database permissions for replication
  • Preparing tables with correct REPLICA IDENTITY settings (PostgreSQL)
  • Enabling binary logging on MySQL instances

Theoretical Basis

CDC relies on database transaction logs that record every data modification:

MySQL (Binlog):
    SET binlog_format = ROW;
    -- Each row change is recorded individually

PostgreSQL (WAL):
    ALTER SYSTEM SET wal_level = logical;
    CREATE PUBLICATION my_pub FOR TABLE t1, t2;
    ALTER TABLE t1 REPLICA IDENTITY FULL;
    -- Logical decoding slots stream changes

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment