Before you proceed, ensure that your Postgres service is accessible to the ClickPipes service. This should be the case by default, but if you’ve restricted IP access you may need to grant access to some source IPs from this list based on the region where your ClickHouse service is located.
Configure the replication service
Fill in the replication settings:- Integration name: A name for this ClickPipe
- ClickHouse service: Select an existing ClickHouse Cloud service or create a new one
- Postgres database: The source database to replicate from
- Replication method: Choose one of:
- Initial load + CDC: Import existing data and keep tables updated with new changes (recommended)
- Initial load only: One-time snapshot of existing data with no ongoing updates
- CDC only: Skip the initial snapshot and only capture new changes going forward
Configure replication settings
Fine-tune how data is replicated:- Sync interval (seconds): How often changes are pulled from Postgres (default: 60)
- Parallel threads for initial load: Number of threads used during the initial snapshot (default: 4)
- Pull batch size: Number of rows fetched per batch during replication (default: 100000)
- Snapshot number of rows per partition: Rows per partition during the initial snapshot (default: 100000)
- Snapshot number of tables in parallel: How many tables are snapshotted concurrently (default: 1)
Select tables to replicate
Choose a destination database and select which tables to replicate:- Destination database: Select an existing ClickHouse database or create a new one
- Prefix default destination table names with schema name: Adds the Postgres schema as a prefix to avoid naming conflicts
- Preserve NULL values from source: Maintains NULL values instead of converting to defaults
- Remove deleted rows during merges: For ReplacingMergeTree tables, physically removes deleted rows during background merges