Uh oh!
There was an error while loading. Please reload this page.
[Feature](Streaming Job) Extend streaming job to support Postgres synchronization - #59461
Conversation
hello-stephen
commented
Dec 29, 2025
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
JNSimba
commented
Dec 29, 2025
run buildall |
JNSimba
commented
Dec 29, 2025
run buildall |
doris-robot
commented
Dec 29, 2025
TPC-H: Total hot run time: 34820 ms |
doris-robot
commented
Dec 29, 2025
TPC-DS: Total hot run time: 174319 ms |
doris-robot
commented
Dec 29, 2025
ClickBench: Total hot run time: 26.89 s |
doris-robot
commented
Dec 29, 2025
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Dec 29, 2025
FE UT Coverage ReportIncrement line coverage |
hello-stephen
commented
Dec 29, 2025
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Dec 29, 2025
FE Regression Coverage ReportIncrement line coverage |
JNSimba
commented
Dec 30, 2025
run buildall |
hello-stephen
commented
Dec 30, 2025
FE UT Coverage ReportIncrement line coverage |
hello-stephen
commented
Dec 30, 2025
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
shuke987
commented
Jan 4, 2026
skip buildall |
Uh oh!
There was an error while loading. Please reload this page.
### What problem does this PR solve? Related PR: #59461 1. PostgreSQL uses slots for data consumption, but only one client can use a slot at a time. Therefore, after consuming data from the WAL phase, the slot needs to be closed. This doesn't affect MySQL, but it can be closed to avoid consuming connections. 2. Create pg slot first when create job 3. fix unstable case
### What problem does this PR solve? Related PR: #59461 1. PostgreSQL uses slots for data consumption, but only one client can use a slot at a time. Therefore, after consuming data from the WAL phase, the slot needs to be closed. This doesn't affect MySQL, but it can be closed to avoid consuming connections. 2. Create pg slot first when create job 3. fix unstable case
### What problem does this PR solve? Related PR: #58898#59461 This PR primarily optimizes the speed of incremental and snapshot reads. 1. For incremental reads: - Binding the fetch logic to an interval allows fetching data within that interval. - Splitting the fetch and write logic asynchronously. 2. For snapshot reads: - Introducing the `snapshot_split_size` and `snapshot_parallelism` parameters. - `snapshot_split_size`: Adjusts the size of each chunk during the split phase, allowing each split to fetch more data. - `snapshot_parallelism`: The degree of parallelism during the snapshot read phase, i.e., how many chunks can run simultaneously, and how many chunks are scheduled in a single task.
### What problem does this PR solve? Related PR: #58898#59461 This PR primarily optimizes the speed of incremental and snapshot reads. 1. For incremental reads: - Binding the fetch logic to an interval allows fetching data within that interval. - Splitting the fetch and write logic asynchronously. 2. For snapshot reads: - Introducing the `snapshot_split_size` and `snapshot_parallelism` parameters. - `snapshot_split_size`: Adjusts the size of each chunk during the split phase, allowing each split to fetch more data. - `snapshot_parallelism`: The degree of parallelism during the snapshot read phase, i.e., how many chunks can run simultaneously, and how many chunks are scheduled in a single task.
…l/pg streaming job (#60473) ### What problem does this PR solve? Related PR: #58898#59461 In some scenarios, it is necessary to tolerate a certain amount of erroneous data. Supported parameters: `load.strict_mode`: Whether to enable strict mode, defaults to false. `load.max_filter_ratio`: The maximum allowed filtering rate within the sampling window, defaults to zero tolerance. The sampling window is `max_interval * 10`. That is, if the number of erroneous rows/total rows exceeds `max_filter_ratio` within the sampling window, the job will be paused, requiring manual intervention to check data quality issues. eg: ``` CREATE JOB test_streaming_mysql_job_errormsg ON STREAMING FROM MYSQL ( "jdbc_url" = "jdbc:mysql://127.0.0.1:3308", ...... ) TO DATABASE database ( "table.create.properties.replication_num" = "1" ... "load.max_filter_ratio" = "1" ) ```
…l/pg streaming job (#60473) ### What problem does this PR solve? Related PR: #58898#59461 In some scenarios, it is necessary to tolerate a certain amount of erroneous data. Supported parameters: `load.strict_mode`: Whether to enable strict mode, defaults to false. `load.max_filter_ratio`: The maximum allowed filtering rate within the sampling window, defaults to zero tolerance. The sampling window is `max_interval * 10`. That is, if the number of erroneous rows/total rows exceeds `max_filter_ratio` within the sampling window, the job will be paused, requiring manual intervention to check data quality issues. eg: ``` CREATE JOB test_streaming_mysql_job_errormsg ON STREAMING FROM MYSQL ( "jdbc_url" = "jdbc:mysql://127.0.0.1:3308", ...... ) TO DATABASE database ( "table.create.properties.replication_num" = "1" ... "load.max_filter_ratio" = "1" ) ```
### What problem does this PR solve? Related PR: #59461 To enhance partition table synchronization, add `publish_via_partition_root` when creating a PUBLICATION instance, specifically for PG 13+.
### What problem does this PR solve? Related PR: #59461 To enhance partition table synchronization, add `publish_via_partition_root` when creating a PUBLICATION instance, specifically for PG 13+.
…e#60560) ### What problem does this PR solve? Related PR: apache#59461 To enhance partition table synchronization, add `publish_via_partition_root` when creating a PUBLICATION instance, specifically for PG 13+.
…Postgres synchronization apache#59461 (apache#59530) Cherry-picked from apache#59461 Co-authored-by: wudi <wudi@selectdb.com>
### What problem does this PR solve? #58898#59461 These two features support consuming data from MySQL and PostgreSQL. Based on this, this PR introduces cdc_stream tvf, which allows consuming data from MySQL and PostgreSQL in TVF format. Example ``` select * from cdc_stream( "type" = "mysql", "jdbc_url" = "jdbc:mysql://127.0.0.1:3306", "driver_url" = "mysql-connector-j-8.0.31.jar", "driver_class" = "com.mysql.cj.jdbc.Driver", "user" = "root", "password" = "123456", "database" = "test_cdc_db", "table" = "user_info", "offset" = '{"file":"binlog.000003","pos":"496"}' ) ```
### What problem does this PR solve? apache#58898apache#59461 These two features support consuming data from MySQL and PostgreSQL. Based on this, this PR introduces cdc_stream tvf, which allows consuming data from MySQL and PostgreSQL in TVF format. Example ``` select * from cdc_stream( "type" = "mysql", "jdbc_url" = "jdbc:mysql://127.0.0.1:3306", "driver_url" = "mysql-connector-j-8.0.31.jar", "driver_class" = "com.mysql.cj.jdbc.Driver", "user" = "root", "password" = "123456", "database" = "test_cdc_db", "table" = "user_info", "offset" = '{"file":"binlog.000003","pos":"496"}' ) ```
### What problem does this PR solve? #58898#59461 These two features support consuming data from MySQL and PostgreSQL. Based on this, this PR introduces cdc_stream tvf, which allows consuming data from MySQL and PostgreSQL in TVF format. Example ``` select * from cdc_stream( "type" = "mysql", "jdbc_url" = "jdbc:mysql://127.0.0.1:3306", "driver_url" = "mysql-connector-j-8.0.31.jar", "driver_class" = "com.mysql.cj.jdbc.Driver", "user" = "root", "password" = "123456", "database" = "test_cdc_db", "table" = "user_info", "offset" = '{"file":"binlog.000003","pos":"496"}' ) ```
### What problem does this PR solve? apache#58898apache#59461 These two features support consuming data from MySQL and PostgreSQL. Based on this, this PR introduces cdc_stream tvf, which allows consuming data from MySQL and PostgreSQL in TVF format. Example ``` select * from cdc_stream( "type" = "mysql", "jdbc_url" = "jdbc:mysql://127.0.0.1:3306", "driver_url" = "mysql-connector-j-8.0.31.jar", "driver_class" = "com.mysql.cj.jdbc.Driver", "user" = "root", "password" = "123456", "database" = "test_cdc_db", "table" = "user_info", "offset" = '{"file":"binlog.000003","pos":"496"}' ) ```
What problem does this PR solve?
This Issues (#58896) and #58898 implements multi-table synchronization in MySQL, The main purpose of this PR is to extend the data source to Postgres.
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)