Skip to content

PostgreSQL Reader Overview

DBConvert Streams provides two methods for reading data from PostgreSQL databases:

CDC (Change Data Capture) Mode

Transaction Log Change Data Capture

CDC mode captures real-time changes from PostgreSQL's Write-Ahead Logs (WALs):

  • Real-time change capture (INSERT, UPDATE, DELETE)
  • Uses native PostgreSQL logical replication
  • Ideal for continuous data synchronization
  • Requires specific server configuration

Example CDC configuration:

json
{
    "name": "postgresql-cdc",
    "type": "postgresql",
    "mode": "cdc",
    "host": "localhost",
    "port": 5432,
    "username": "postgres",
    "password": "postgres",
    "database": "source_db",
    "tables": [
        {
            "name": "public.users",
            "operations": ["insert", "update", "delete"]
        }
    ]
}

For detailed CDC setup and configuration, see:

Convert Mode

Convert mode reads data directly from database tables:

  • One-time data transfers
  • Direct table access
  • No special server configuration needed
  • Supports custom SQL queries

Example convert configuration:

json
{
    "name": "postgresql-convert",
    "type": "postgresql",
    "mode": "convert",
    "host": "localhost",
    "port": 5432,
    "username": "postgres",
    "password": "postgres",
    "database": "source_db",
    "tables": [
        {
            "name": "users",
            "query": "SELECT * FROM users WHERE active = true"
        }
    ]
}

For detailed conversion mode setup, see:

Schema Support

PostgreSQL uses schemas to organize tables. In both modes:

  • public schema is default
  • Use schema_name.table_name for other schemas
  • Schema names are case-sensitive

Example:

json
{
    "tables": [
        {"name": "public.users"},        // Explicit public schema
        {"name": "users"},               // Implicit public schema
        {"name": "inventory.products"}   // Custom schema
    ]
}

Cloud Provider Support

DBConvert Streams supports major cloud PostgreSQL providers:

Mode Selection

  • Choose CDC mode for real-time synchronization
  • Choose Convert mode for one-time migrations

DBConvert Streams - event driven replication for databases