PostgreSQL to Doris Real-Time Synchronization | NineData
PostgreSQL often runs transactional workloads, while Apache Doris is used for analytics, reporting, and data warehouse queries. NineData Data Replication helps replicate PostgreSQL data to Doris through schema replication, full replication, and incremental replication.
Use this workflow to initialize Doris from PostgreSQL, keep Doris updated with source-side changes, and validate the target before it is used by downstream systems.
When to use this workflow
Use this workflow to:
- Build an analytics layer in Doris from PostgreSQL business data.
- Reduce analytical query load on the PostgreSQL source.
- Initialize Doris table structures and data from PostgreSQL.
- Keep the target updated with incremental PostgreSQL changes.
- Validate data consistency before handing the Doris target to analytics users.
For detailed permissions, WAL settings, Doris table model rules, data type mapping, and precheck items, see PostgreSQL to Doris.
Before you begin
Prepare the following items:
- Access to the NineData console.
- Connection information and accounts for the PostgreSQL source and Doris target.
- Required permissions on both systems.
- PostgreSQL WAL settings required for incremental replication, including
wal_level=logical. - Network connectivity from NineData to both systems.
Step 1: Add the source and target data sources
In the NineData console, click Data Source Management > Data Sources, and then click Create Data Source.

Follow the page prompts, test the connection, and click Create Data Source.

Repeat the process for the PostgreSQL source and the Doris target.
Step 2: Create the synchronization task
In the NineData console, click Data Replication > Data Replication, and then click Create Replication.

Configure the PostgreSQL source and Doris target.
Select the replication types required for the task:
- Schema Replication to create target structures.
- Full Replication to load existing source data.
- Incremental Replication to synchronize new source-side changes after the full load.

Select the source objects, configure mapping and filtering if needed, and run the precheck.
After the precheck passes, start the task.
Monitor the task until the full load finishes and incremental delay reaches
0seconds.
Step 3: Validate synchronized data
Use data comparison to confirm that Doris contains the expected data.
Open the replication task created in Step 2.

Click the Data Comparison tab, and click Start Data Comparison if comparison results are not already available.
tipAfter comparison starts, NineData compares the selected source and target objects and displays the comparison result.

Click Re-compare to validate the latest synchronized data.

Step 4: Configure alerts
For a long-running synchronization task, configure alerts for task failure and replication delay.
Open the replication task details page.

Click Configure Alerts.

Enter a Policy Name, review the alert rules, and click Save Configuration.

Result
After the task starts, NineData initializes the selected PostgreSQL data in Doris and then keeps Doris updated through incremental replication. When synchronization delay is 0 seconds and validation passes, the Doris target can be used for analytics, reporting, and downstream warehouse workloads.