[{"data":1,"prerenderedAt":1930},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fstreams\u002Finitial-load-and-cdc-walkthrough":3},{"id":4,"title":5,"body":6,"description":1921,"extension":1922,"meta":1923,"navigation":1924,"path":1925,"redirect":1926,"seo":1927,"stem":1928,"__hash__":1929},"docs\u002Fdocs\u002Fstreams\u002Finitial-load-and-cdc-walkthrough.md","Initial Load + CDC Walkthrough",{"type":7,"value":8,"toc":1898},"minimark",[9,14,24,31,36,39,56,70,74,113,117,122,125,295,299,310,320,400,403,407,763,767,778,823,826,830,833,853,857,860,928,943,1002,1005,1009,1012,1016,1186,1190,1201,1282,1286,1314,1317,1320,1411,1418,1489,1493,1496,1505,1568,1573,1638,1646,1713,1716,1720,1777,1783,1787,1793,1812,1816,1866,1870,1894],[10,11,13],"h1",{"id":12},"initial-load-cdc-walkthrough","Initial Load + CDC walkthrough",[15,16,17,18,23],"p",{},"This page shows a complete example of a CDC stream with ",[19,20,22],"a",{"href":21},"\u002Fdocs\u002Fstreams\u002Finitial-load-and-cdc","initial snapshot"," enabled. The same schema is exercised in both directions so you can see what each engine produces at the source-log boundary and how live changes land on the target after bootstrap.",[15,25,26,27,30],{},"For the conceptual overview and configuration reference, read ",[19,28,29],{"href":21},"Initial Load + CDC"," first.",[32,33,35],"h2",{"id":34},"what-you-will-build","What you will build",[15,37,38],{},"Two related tables on the source side:",[40,41,42,50],"ul",{},[43,44,45,49],"li",{},[46,47,48],"code",{},"categories"," — 10 rows, used as a parent table",[43,51,52,55],{},[46,53,54],{},"products"," — 1,000 rows, each referencing a category",[15,57,58,59,62,63,62,66,69],{},"The stream bootstraps all 1,010 rows, then a small set of live ",[46,60,61],{},"INSERT"," \u002F ",[46,64,65],{},"UPDATE",[46,67,68],{},"DELETE"," operations proves that CDC picks up from the handoff position and applies later changes to the target. You will also stop the stream, write more source rows while it is offline, start it again, and verify that the target catches up from the saved CDC checkpoint without re-running the snapshot.",[32,71,73],{"id":72},"prerequisites","Prerequisites",[40,75,76,79,90,102],{},[43,77,78],{},"Both source and target connections are configured in DBConvert Streams",[43,80,81,82,85,86,89],{},"Source database is MySQL (ROW binlog format, ",[46,83,84],{},"binlog_row_image=FULL",") or PostgreSQL (",[46,87,88],{},"wal_level=logical",", at least one free replication slot)",[43,91,92,93,97,98,101],{},"Target tables are empty before the first data copy. For database targets, either let DBConvert Streams create missing tables with ",[94,95,96],"strong",{},"Create missing only"," or pre-create compatible empty tables with ",[94,99,100],{},"Validate existing",".",[43,103,104,105,108,109,112],{},"Source user has CDC privileges (PostgreSQL replication role, or MySQL ",[46,106,107],{},"REPLICATION SLAVE","\u002F",[46,110,111],{},"REPLICATION CLIENT",")",[32,114,116],{"id":115},"direction-1-postgresql-to-mysql","Direction 1: PostgreSQL to MySQL",[118,119,121],"h3",{"id":120},"create-and-populate-source-tables","Create and populate source tables",[15,123,124],{},"On the PostgreSQL source:",[126,127,132],"pre",{"className":128,"code":129,"language":130,"meta":131,"style":131},"language-sql shiki shiki-themes github-light github-dark","CREATE TABLE public.categories (\n    id INT PRIMARY KEY,\n    name VARCHAR(100) NOT NULL,\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);\n\nCREATE TABLE public.products (\n    id INT PRIMARY KEY,\n    category_id INT NOT NULL REFERENCES public.categories(id),\n    name VARCHAR(200) NOT NULL,\n    sku VARCHAR(50),\n    price DECIMAL(10,2),\n    stock INT DEFAULT 0,\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);\n\nINSERT INTO public.categories (id, name)\nSELECT i, 'Category_' || i FROM generate_series(1, 10) AS i;\n\nINSERT INTO public.products (id, category_id, name, sku, price, stock)\nSELECT i, ((i - 1) % 10) + 1,\n       'Product_' || i,\n       'SKU-' || LPAD(i::text, 6, '0'),\n       ROUND((random() * 999 + 1)::numeric, 2),\n       (random() * 500)::int\nFROM generate_series(1, 1000) AS i;\n","sql","",[46,133,134,142,148,154,160,166,173,179,184,190,196,202,208,214,220,226,231,236,242,248,253,259,265,271,277,283,289],{"__ignoreMap":131},[135,136,139],"span",{"class":137,"line":138},"line",1,[135,140,141],{},"CREATE TABLE public.categories (\n",[135,143,145],{"class":137,"line":144},2,[135,146,147],{},"    id INT PRIMARY KEY,\n",[135,149,151],{"class":137,"line":150},3,[135,152,153],{},"    name VARCHAR(100) NOT NULL,\n",[135,155,157],{"class":137,"line":156},4,[135,158,159],{},"    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n",[135,161,163],{"class":137,"line":162},5,[135,164,165],{},");\n",[135,167,169],{"class":137,"line":168},6,[135,170,172],{"emptyLinePlaceholder":171},true,"\n",[135,174,176],{"class":137,"line":175},7,[135,177,178],{},"CREATE TABLE public.products (\n",[135,180,182],{"class":137,"line":181},8,[135,183,147],{},[135,185,187],{"class":137,"line":186},9,[135,188,189],{},"    category_id INT NOT NULL REFERENCES public.categories(id),\n",[135,191,193],{"class":137,"line":192},10,[135,194,195],{},"    name VARCHAR(200) NOT NULL,\n",[135,197,199],{"class":137,"line":198},11,[135,200,201],{},"    sku VARCHAR(50),\n",[135,203,205],{"class":137,"line":204},12,[135,206,207],{},"    price DECIMAL(10,2),\n",[135,209,211],{"class":137,"line":210},13,[135,212,213],{},"    stock INT DEFAULT 0,\n",[135,215,217],{"class":137,"line":216},14,[135,218,219],{},"    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n",[135,221,223],{"class":137,"line":222},15,[135,224,225],{},"    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n",[135,227,229],{"class":137,"line":228},16,[135,230,165],{},[135,232,234],{"class":137,"line":233},17,[135,235,172],{"emptyLinePlaceholder":171},[135,237,239],{"class":137,"line":238},18,[135,240,241],{},"INSERT INTO public.categories (id, name)\n",[135,243,245],{"class":137,"line":244},19,[135,246,247],{},"SELECT i, 'Category_' || i FROM generate_series(1, 10) AS i;\n",[135,249,251],{"class":137,"line":250},20,[135,252,172],{"emptyLinePlaceholder":171},[135,254,256],{"class":137,"line":255},21,[135,257,258],{},"INSERT INTO public.products (id, category_id, name, sku, price, stock)\n",[135,260,262],{"class":137,"line":261},22,[135,263,264],{},"SELECT i, ((i - 1) % 10) + 1,\n",[135,266,268],{"class":137,"line":267},23,[135,269,270],{},"       'Product_' || i,\n",[135,272,274],{"class":137,"line":273},24,[135,275,276],{},"       'SKU-' || LPAD(i::text, 6, '0'),\n",[135,278,280],{"class":137,"line":279},25,[135,281,282],{},"       ROUND((random() * 999 + 1)::numeric, 2),\n",[135,284,286],{"class":137,"line":285},26,[135,287,288],{},"       (random() * 500)::int\n",[135,290,292],{"class":137,"line":291},27,[135,293,294],{},"FROM generate_series(1, 1000) AS i;\n",[118,296,298],{"id":297},"prepare-target-structure","Prepare target structure",[15,300,301,302,305,306,309],{},"For a new empty target, use ",[94,303,304],{},"Create structure"," with ",[94,307,308],{},"Schema policy: Create missing only",". DBConvert Streams creates the target tables before the snapshot copy, then verifies they are empty.",[15,311,312,313,315,316,319],{},"If you use ",[94,314,100],{}," instead, pre-create compatible empty tables on the MySQL target. Match the source column types and primary keys. Do not add ",[46,317,318],{},"ON UPDATE CURRENT_TIMESTAMP"," to datetime columns — it will rewrite the timestamps CDC is trying to replicate.",[126,321,323],{"className":128,"code":322,"language":130,"meta":131,"style":131},"CREATE TABLE categories (\n    id INT PRIMARY KEY,\n    name VARCHAR(100) NOT NULL,\n    created_at DATETIME\n);\n\nCREATE TABLE products (\n    id INT PRIMARY KEY,\n    category_id INT NOT NULL,\n    name VARCHAR(200) NOT NULL,\n    sku VARCHAR(50),\n    price DECIMAL(10,2),\n    stock INT DEFAULT 0,\n    created_at DATETIME,\n    updated_at DATETIME,\n    INDEX idx_category (category_id)\n);\n",[46,324,325,330,334,338,343,347,351,356,360,365,369,373,377,381,386,391,396],{"__ignoreMap":131},[135,326,327],{"class":137,"line":138},[135,328,329],{},"CREATE TABLE categories (\n",[135,331,332],{"class":137,"line":144},[135,333,147],{},[135,335,336],{"class":137,"line":150},[135,337,153],{},[135,339,340],{"class":137,"line":156},[135,341,342],{},"    created_at DATETIME\n",[135,344,345],{"class":137,"line":162},[135,346,165],{},[135,348,349],{"class":137,"line":168},[135,350,172],{"emptyLinePlaceholder":171},[135,352,353],{"class":137,"line":175},[135,354,355],{},"CREATE TABLE products (\n",[135,357,358],{"class":137,"line":181},[135,359,147],{},[135,361,362],{"class":137,"line":186},[135,363,364],{},"    category_id INT NOT NULL,\n",[135,366,367],{"class":137,"line":192},[135,368,195],{},[135,370,371],{"class":137,"line":198},[135,372,201],{},[135,374,375],{"class":137,"line":204},[135,376,207],{},[135,378,379],{"class":137,"line":210},[135,380,213],{},[135,382,383],{"class":137,"line":216},[135,384,385],{},"    created_at DATETIME,\n",[135,387,388],{"class":137,"line":222},[135,389,390],{},"    updated_at DATETIME,\n",[135,392,393],{"class":137,"line":228},[135,394,395],{},"    INDEX idx_category (category_id)\n",[135,397,398],{"class":137,"line":233},[135,399,165],{},[15,401,402],{},"FK constraints on the target are not required and can cause failures if bootstrap copies rows in an unexpected order. Keep them off on the target.",[118,404,406],{"id":405},"create-the-stream-configuration","Create the stream configuration",[126,408,412],{"className":409,"code":410,"language":411,"meta":131,"style":131},"language-json shiki shiki-themes github-light github-dark","{\n  \"name\": \"pg-to-mysql-with-snapshot\",\n  \"mode\": \"cdc\",\n  \"source\": {\n    \"connections\": [\n      {\n        \"connectionId\": \"conn_pg_source\",\n        \"database\": \"postgres\",\n        \"schema\": \"public\",\n        \"tables\": [\n          { \"name\": \"categories\" },\n          { \"name\": \"products\" }\n        ]\n      }\n    ],\n    \"options\": {\n      \"dataBundleSize\": 100,\n      \"replicationSlot\": \"example_slot\",\n      \"publicationName\": \"example_pub\",\n      \"initialSnapshot\": {\n        \"enabled\": true,\n        \"restartPolicy\": \"fail_until_reset\"\n      },\n      \"operations\": [\"insert\", \"update\", \"delete\"]\n    }\n  },\n  \"target\": {\n    \"id\": \"conn_mysql_target\",\n    \"spec\": {\n      \"db\": {\n        \"database\": \"target\",\n        \"schemaPolicy\": \"create_missing_only\",\n        \"writeMode\": \"upsert\"\n      }\n    }\n  }\n}\n","json",[46,413,414,420,436,448,456,464,469,481,493,505,512,528,542,547,552,557,564,576,588,600,607,619,629,634,659,664,669,676,689,697,705,717,730,741,746,751,757],{"__ignoreMap":131},[135,415,416],{"class":137,"line":138},[135,417,419],{"class":418},"sVt8B","{\n",[135,421,422,426,429,433],{"class":137,"line":144},[135,423,425],{"class":424},"sj4cs","  \"name\"",[135,427,428],{"class":418},": ",[135,430,432],{"class":431},"sZZnC","\"pg-to-mysql-with-snapshot\"",[135,434,435],{"class":418},",\n",[135,437,438,441,443,446],{"class":137,"line":150},[135,439,440],{"class":424},"  \"mode\"",[135,442,428],{"class":418},[135,444,445],{"class":431},"\"cdc\"",[135,447,435],{"class":418},[135,449,450,453],{"class":137,"line":156},[135,451,452],{"class":424},"  \"source\"",[135,454,455],{"class":418},": {\n",[135,457,458,461],{"class":137,"line":162},[135,459,460],{"class":424},"    \"connections\"",[135,462,463],{"class":418},": [\n",[135,465,466],{"class":137,"line":168},[135,467,468],{"class":418},"      {\n",[135,470,471,474,476,479],{"class":137,"line":175},[135,472,473],{"class":424},"        \"connectionId\"",[135,475,428],{"class":418},[135,477,478],{"class":431},"\"conn_pg_source\"",[135,480,435],{"class":418},[135,482,483,486,488,491],{"class":137,"line":181},[135,484,485],{"class":424},"        \"database\"",[135,487,428],{"class":418},[135,489,490],{"class":431},"\"postgres\"",[135,492,435],{"class":418},[135,494,495,498,500,503],{"class":137,"line":186},[135,496,497],{"class":424},"        \"schema\"",[135,499,428],{"class":418},[135,501,502],{"class":431},"\"public\"",[135,504,435],{"class":418},[135,506,507,510],{"class":137,"line":192},[135,508,509],{"class":424},"        \"tables\"",[135,511,463],{"class":418},[135,513,514,517,520,522,525],{"class":137,"line":198},[135,515,516],{"class":418},"          { ",[135,518,519],{"class":424},"\"name\"",[135,521,428],{"class":418},[135,523,524],{"class":431},"\"categories\"",[135,526,527],{"class":418}," },\n",[135,529,530,532,534,536,539],{"class":137,"line":204},[135,531,516],{"class":418},[135,533,519],{"class":424},[135,535,428],{"class":418},[135,537,538],{"class":431},"\"products\"",[135,540,541],{"class":418}," }\n",[135,543,544],{"class":137,"line":210},[135,545,546],{"class":418},"        ]\n",[135,548,549],{"class":137,"line":216},[135,550,551],{"class":418},"      }\n",[135,553,554],{"class":137,"line":222},[135,555,556],{"class":418},"    ],\n",[135,558,559,562],{"class":137,"line":228},[135,560,561],{"class":424},"    \"options\"",[135,563,455],{"class":418},[135,565,566,569,571,574],{"class":137,"line":233},[135,567,568],{"class":424},"      \"dataBundleSize\"",[135,570,428],{"class":418},[135,572,573],{"class":424},"100",[135,575,435],{"class":418},[135,577,578,581,583,586],{"class":137,"line":238},[135,579,580],{"class":424},"      \"replicationSlot\"",[135,582,428],{"class":418},[135,584,585],{"class":431},"\"example_slot\"",[135,587,435],{"class":418},[135,589,590,593,595,598],{"class":137,"line":244},[135,591,592],{"class":424},"      \"publicationName\"",[135,594,428],{"class":418},[135,596,597],{"class":431},"\"example_pub\"",[135,599,435],{"class":418},[135,601,602,605],{"class":137,"line":250},[135,603,604],{"class":424},"      \"initialSnapshot\"",[135,606,455],{"class":418},[135,608,609,612,614,617],{"class":137,"line":255},[135,610,611],{"class":424},"        \"enabled\"",[135,613,428],{"class":418},[135,615,616],{"class":424},"true",[135,618,435],{"class":418},[135,620,621,624,626],{"class":137,"line":261},[135,622,623],{"class":424},"        \"restartPolicy\"",[135,625,428],{"class":418},[135,627,628],{"class":431},"\"fail_until_reset\"\n",[135,630,631],{"class":137,"line":267},[135,632,633],{"class":418},"      },\n",[135,635,636,639,642,645,648,651,653,656],{"class":137,"line":273},[135,637,638],{"class":424},"      \"operations\"",[135,640,641],{"class":418},": [",[135,643,644],{"class":431},"\"insert\"",[135,646,647],{"class":418},", ",[135,649,650],{"class":431},"\"update\"",[135,652,647],{"class":418},[135,654,655],{"class":431},"\"delete\"",[135,657,658],{"class":418},"]\n",[135,660,661],{"class":137,"line":279},[135,662,663],{"class":418},"    }\n",[135,665,666],{"class":137,"line":285},[135,667,668],{"class":418},"  },\n",[135,670,671,674],{"class":137,"line":291},[135,672,673],{"class":424},"  \"target\"",[135,675,455],{"class":418},[135,677,679,682,684,687],{"class":137,"line":678},28,[135,680,681],{"class":424},"    \"id\"",[135,683,428],{"class":418},[135,685,686],{"class":431},"\"conn_mysql_target\"",[135,688,435],{"class":418},[135,690,692,695],{"class":137,"line":691},29,[135,693,694],{"class":424},"    \"spec\"",[135,696,455],{"class":418},[135,698,700,703],{"class":137,"line":699},30,[135,701,702],{"class":424},"      \"db\"",[135,704,455],{"class":418},[135,706,708,710,712,715],{"class":137,"line":707},31,[135,709,485],{"class":424},[135,711,428],{"class":418},[135,713,714],{"class":431},"\"target\"",[135,716,435],{"class":418},[135,718,720,723,725,728],{"class":137,"line":719},32,[135,721,722],{"class":424},"        \"schemaPolicy\"",[135,724,428],{"class":418},[135,726,727],{"class":431},"\"create_missing_only\"",[135,729,435],{"class":418},[135,731,733,736,738],{"class":137,"line":732},33,[135,734,735],{"class":424},"        \"writeMode\"",[135,737,428],{"class":418},[135,739,740],{"class":431},"\"upsert\"\n",[135,742,744],{"class":137,"line":743},34,[135,745,551],{"class":418},[135,747,749],{"class":137,"line":748},35,[135,750,663],{"class":418},[135,752,754],{"class":137,"line":753},36,[135,755,756],{"class":418},"  }\n",[135,758,760],{"class":137,"line":759},37,[135,761,762],{"class":418},"}\n",[118,764,766],{"id":765},"start-the-stream-and-read-the-monitor","Start the stream and read the monitor",[15,768,769,770,773,774,777],{},"Click ",[94,771,772],{},"Start"," on the stream config. The Monitor tab shows a ",[94,775,776],{},"CDC Continuity"," card for the snapshot-to-CDC boundary:",[40,779,780,795,804,810,817],{},[43,781,782,428,785,788,789,788,792],{},[46,783,784],{},"Snapshot",[46,786,787],{},"copying"," -> ",[46,790,791],{},"handoff",[46,793,794],{},"complete",[43,796,797,800,801],{},[46,798,799],{},"Snapshot Ended At",": the source-log handoff position, for example PostgreSQL LSN ",[46,802,803],{},"97\u002FCC93E408",[43,805,806,809],{},[46,807,808],{},"CDC Apply",": the latest acknowledged CDC position",[43,811,812,813,816],{},"Status: ",[46,814,815],{},"Healthy"," after the writer acknowledges CDC events",[43,818,819,820],{},"Footer: ",[46,821,822],{},"PostgreSQL LSN · Slot example_slot · Retry-safe apply · Ordered per table · Last update ...",[15,824,825],{},"With 1,000 products plus 10 categories, bootstrap typically completes in a few seconds on a local test setup.",[118,827,829],{"id":828},"verify-the-bootstrap","Verify the bootstrap",[15,831,832],{},"On MySQL target:",[126,834,836],{"className":128,"code":835,"language":130,"meta":131,"style":131},"SELECT (SELECT COUNT(*) FROM categories) AS cats,\n       (SELECT COUNT(*) FROM products)   AS prods;\n-- cats=10, prods=1000\n",[46,837,838,843,848],{"__ignoreMap":131},[135,839,840],{"class":137,"line":138},[135,841,842],{},"SELECT (SELECT COUNT(*) FROM categories) AS cats,\n",[135,844,845],{"class":137,"line":144},[135,846,847],{},"       (SELECT COUNT(*) FROM products)   AS prods;\n",[135,849,850],{"class":137,"line":150},[135,851,852],{},"-- cats=10, prods=1000\n",[118,854,856],{"id":855},"run-live-cdc-operations","Run live CDC operations",[15,858,859],{},"Back on the PostgreSQL source:",[126,861,863],{"className":128,"code":862,"language":130,"meta":131,"style":131},"-- new category + three new products referencing it\nINSERT INTO public.categories (id, name) VALUES (11, 'Category_LIVE_11');\nINSERT INTO public.products (id, category_id, name, sku, price, stock) VALUES\n    (1001, 11, 'LIVE_Product_1001', 'SKU-001001', 19.99, 100),\n    (1002, 11, 'LIVE_Product_1002', 'SKU-001002', 29.99,  50),\n    (1003, 11, 'LIVE_Product_1003', 'SKU-001003', 39.99,  25);\n\n-- update existing rows\nUPDATE public.products SET price = 999.99, updated_at = now() WHERE id IN (1, 2, 3);\nUPDATE public.categories SET name = 'Category_1_UPDATED' WHERE id = 1;\n\n-- delete a row\nDELETE FROM public.products WHERE id = 1002;\n",[46,864,865,870,875,880,885,890,895,899,904,909,914,918,923],{"__ignoreMap":131},[135,866,867],{"class":137,"line":138},[135,868,869],{},"-- new category + three new products referencing it\n",[135,871,872],{"class":137,"line":144},[135,873,874],{},"INSERT INTO public.categories (id, name) VALUES (11, 'Category_LIVE_11');\n",[135,876,877],{"class":137,"line":150},[135,878,879],{},"INSERT INTO public.products (id, category_id, name, sku, price, stock) VALUES\n",[135,881,882],{"class":137,"line":156},[135,883,884],{},"    (1001, 11, 'LIVE_Product_1001', 'SKU-001001', 19.99, 100),\n",[135,886,887],{"class":137,"line":162},[135,888,889],{},"    (1002, 11, 'LIVE_Product_1002', 'SKU-001002', 29.99,  50),\n",[135,891,892],{"class":137,"line":168},[135,893,894],{},"    (1003, 11, 'LIVE_Product_1003', 'SKU-001003', 39.99,  25);\n",[135,896,897],{"class":137,"line":175},[135,898,172],{"emptyLinePlaceholder":171},[135,900,901],{"class":137,"line":181},[135,902,903],{},"-- update existing rows\n",[135,905,906],{"class":137,"line":186},[135,907,908],{},"UPDATE public.products SET price = 999.99, updated_at = now() WHERE id IN (1, 2, 3);\n",[135,910,911],{"class":137,"line":192},[135,912,913],{},"UPDATE public.categories SET name = 'Category_1_UPDATED' WHERE id = 1;\n",[135,915,916],{"class":137,"line":198},[135,917,172],{"emptyLinePlaceholder":171},[135,919,920],{"class":137,"line":204},[135,921,922],{},"-- delete a row\n",[135,924,925],{"class":137,"line":210},[135,926,927],{},"DELETE FROM public.products WHERE id = 1002;\n",[15,929,930,931,934,935,938,939,942],{},"Within seconds the Monitor shows ",[46,932,933],{},"Produced"," and ",[46,936,937],{},"Consumed"," growing and ",[46,940,941],{},"Acked Seq"," advancing. On the MySQL target:",[126,944,946],{"className":128,"code":945,"language":130,"meta":131,"style":131},"SELECT id, name FROM categories WHERE id IN (1, 11);\n-- 1  Category_1_UPDATED\n-- 11 Category_LIVE_11\n\nSELECT id, name, price FROM products WHERE id IN (1, 2, 3, 1001, 1002, 1003);\n-- 1     Product_1           999.99\n-- 2     Product_2           999.99\n-- 3     Product_3           999.99\n-- 1001  LIVE_Product_1001    19.99\n-- 1003  LIVE_Product_1003    39.99\n-- (1002 is gone — it was deleted)\n",[46,947,948,953,958,963,967,972,977,982,987,992,997],{"__ignoreMap":131},[135,949,950],{"class":137,"line":138},[135,951,952],{},"SELECT id, name FROM categories WHERE id IN (1, 11);\n",[135,954,955],{"class":137,"line":144},[135,956,957],{},"-- 1  Category_1_UPDATED\n",[135,959,960],{"class":137,"line":150},[135,961,962],{},"-- 11 Category_LIVE_11\n",[135,964,965],{"class":137,"line":156},[135,966,172],{"emptyLinePlaceholder":171},[135,968,969],{"class":137,"line":162},[135,970,971],{},"SELECT id, name, price FROM products WHERE id IN (1, 2, 3, 1001, 1002, 1003);\n",[135,973,974],{"class":137,"line":168},[135,975,976],{},"-- 1     Product_1           999.99\n",[135,978,979],{"class":137,"line":175},[135,980,981],{},"-- 2     Product_2           999.99\n",[135,983,984],{"class":137,"line":181},[135,985,986],{},"-- 3     Product_3           999.99\n",[135,988,989],{"class":137,"line":186},[135,990,991],{},"-- 1001  LIVE_Product_1001    19.99\n",[135,993,994],{"class":137,"line":192},[135,995,996],{},"-- 1003  LIVE_Product_1003    39.99\n",[135,998,999],{"class":137,"line":198},[135,1000,1001],{},"-- (1002 is gone — it was deleted)\n",[15,1003,1004],{},"CDC apply is ordered per table, not globally across all tables. Keep target-side FK constraints off or deferred for replication workloads so a child-table event cannot fail simply because the related parent-table event is still in another target worker.",[32,1006,1008],{"id":1007},"direction-2-mysql-to-postgresql","Direction 2: MySQL to PostgreSQL",[15,1010,1011],{},"The flow is identical — only the engine, source log type, and target setup change.",[118,1013,1015],{"id":1014},"create-and-populate-source-tables-mysql","Create and populate source tables (MySQL)",[126,1017,1019],{"className":128,"code":1018,"language":130,"meta":131,"style":131},"CREATE TABLE categories (\n    id INT PRIMARY KEY,\n    name VARCHAR(100) NOT NULL,\n    created_at DATETIME DEFAULT CURRENT_TIMESTAMP\n);\n\nCREATE TABLE products (\n    id INT PRIMARY KEY,\n    category_id INT NOT NULL,\n    name VARCHAR(200) NOT NULL,\n    sku VARCHAR(50),\n    price DECIMAL(10,2),\n    stock INT DEFAULT 0,\n    created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n    updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n    INDEX idx_category (category_id),\n    CONSTRAINT fk_cat FOREIGN KEY (category_id) REFERENCES categories(id)\n);\n\nINSERT INTO categories (id, name)\nSELECT n, CONCAT('Category_', n) FROM (\n    SELECT 1 AS n UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5\n    UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9 UNION SELECT 10\n) AS t;\n\nSET SESSION cte_max_recursion_depth = 1100;\nINSERT INTO products (id, category_id, name, sku, price, stock)\nWITH RECURSIVE seq(n) AS (\n    SELECT 1 UNION ALL SELECT n + 1 FROM seq WHERE n \u003C 1000\n)\nSELECT n, ((n - 1) % 10) + 1,\n       CONCAT('Product_', n),\n       CONCAT('SKU-', LPAD(n, 6, '0')),\n       ROUND(RAND() * 999 + 1, 2),\n       FLOOR(RAND() * 500)\nFROM seq;\n",[46,1020,1021,1025,1029,1033,1038,1042,1046,1050,1054,1058,1062,1066,1070,1074,1079,1084,1089,1094,1098,1102,1107,1112,1117,1122,1127,1131,1136,1141,1146,1151,1156,1161,1166,1171,1176,1181],{"__ignoreMap":131},[135,1022,1023],{"class":137,"line":138},[135,1024,329],{},[135,1026,1027],{"class":137,"line":144},[135,1028,147],{},[135,1030,1031],{"class":137,"line":150},[135,1032,153],{},[135,1034,1035],{"class":137,"line":156},[135,1036,1037],{},"    created_at DATETIME DEFAULT CURRENT_TIMESTAMP\n",[135,1039,1040],{"class":137,"line":162},[135,1041,165],{},[135,1043,1044],{"class":137,"line":168},[135,1045,172],{"emptyLinePlaceholder":171},[135,1047,1048],{"class":137,"line":175},[135,1049,355],{},[135,1051,1052],{"class":137,"line":181},[135,1053,147],{},[135,1055,1056],{"class":137,"line":186},[135,1057,364],{},[135,1059,1060],{"class":137,"line":192},[135,1061,195],{},[135,1063,1064],{"class":137,"line":198},[135,1065,201],{},[135,1067,1068],{"class":137,"line":204},[135,1069,207],{},[135,1071,1072],{"class":137,"line":210},[135,1073,213],{},[135,1075,1076],{"class":137,"line":216},[135,1077,1078],{},"    created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n",[135,1080,1081],{"class":137,"line":222},[135,1082,1083],{},"    updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n",[135,1085,1086],{"class":137,"line":228},[135,1087,1088],{},"    INDEX idx_category (category_id),\n",[135,1090,1091],{"class":137,"line":233},[135,1092,1093],{},"    CONSTRAINT fk_cat FOREIGN KEY (category_id) REFERENCES categories(id)\n",[135,1095,1096],{"class":137,"line":238},[135,1097,165],{},[135,1099,1100],{"class":137,"line":244},[135,1101,172],{"emptyLinePlaceholder":171},[135,1103,1104],{"class":137,"line":250},[135,1105,1106],{},"INSERT INTO categories (id, name)\n",[135,1108,1109],{"class":137,"line":255},[135,1110,1111],{},"SELECT n, CONCAT('Category_', n) FROM (\n",[135,1113,1114],{"class":137,"line":261},[135,1115,1116],{},"    SELECT 1 AS n UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5\n",[135,1118,1119],{"class":137,"line":267},[135,1120,1121],{},"    UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9 UNION SELECT 10\n",[135,1123,1124],{"class":137,"line":273},[135,1125,1126],{},") AS t;\n",[135,1128,1129],{"class":137,"line":279},[135,1130,172],{"emptyLinePlaceholder":171},[135,1132,1133],{"class":137,"line":285},[135,1134,1135],{},"SET SESSION cte_max_recursion_depth = 1100;\n",[135,1137,1138],{"class":137,"line":291},[135,1139,1140],{},"INSERT INTO products (id, category_id, name, sku, price, stock)\n",[135,1142,1143],{"class":137,"line":678},[135,1144,1145],{},"WITH RECURSIVE seq(n) AS (\n",[135,1147,1148],{"class":137,"line":691},[135,1149,1150],{},"    SELECT 1 UNION ALL SELECT n + 1 FROM seq WHERE n \u003C 1000\n",[135,1152,1153],{"class":137,"line":699},[135,1154,1155],{},")\n",[135,1157,1158],{"class":137,"line":707},[135,1159,1160],{},"SELECT n, ((n - 1) % 10) + 1,\n",[135,1162,1163],{"class":137,"line":719},[135,1164,1165],{},"       CONCAT('Product_', n),\n",[135,1167,1168],{"class":137,"line":732},[135,1169,1170],{},"       CONCAT('SKU-', LPAD(n, 6, '0')),\n",[135,1172,1173],{"class":137,"line":743},[135,1174,1175],{},"       ROUND(RAND() * 999 + 1, 2),\n",[135,1177,1178],{"class":137,"line":748},[135,1179,1180],{},"       FLOOR(RAND() * 500)\n",[135,1182,1183],{"class":137,"line":753},[135,1184,1185],{},"FROM seq;\n",[118,1187,1189],{"id":1188},"prepare-target-structure-postgresql","Prepare target structure (PostgreSQL)",[15,1191,1192,1193,934,1195,1197,1198,1200],{},"For a new empty target, use the same ",[94,1194,304],{},[94,1196,308],{}," setup. If you use ",[94,1199,100],{},", pre-create compatible empty PostgreSQL tables:",[126,1202,1204],{"className":128,"code":1203,"language":130,"meta":131,"style":131},"CREATE TABLE public.categories (\n    id INT PRIMARY KEY,\n    name VARCHAR(100) NOT NULL,\n    created_at TIMESTAMP\n);\n\nCREATE TABLE public.products (\n    id INT PRIMARY KEY,\n    category_id INT NOT NULL,\n    name VARCHAR(200) NOT NULL,\n    sku VARCHAR(50),\n    price DECIMAL(10,2),\n    stock INT DEFAULT 0,\n    created_at TIMESTAMP,\n    updated_at TIMESTAMP\n);\n\nCREATE INDEX idx_products_category ON public.products(category_id);\n",[46,1205,1206,1210,1214,1218,1223,1227,1231,1235,1239,1243,1247,1251,1255,1259,1264,1269,1273,1277],{"__ignoreMap":131},[135,1207,1208],{"class":137,"line":138},[135,1209,141],{},[135,1211,1212],{"class":137,"line":144},[135,1213,147],{},[135,1215,1216],{"class":137,"line":150},[135,1217,153],{},[135,1219,1220],{"class":137,"line":156},[135,1221,1222],{},"    created_at TIMESTAMP\n",[135,1224,1225],{"class":137,"line":162},[135,1226,165],{},[135,1228,1229],{"class":137,"line":168},[135,1230,172],{"emptyLinePlaceholder":171},[135,1232,1233],{"class":137,"line":175},[135,1234,178],{},[135,1236,1237],{"class":137,"line":181},[135,1238,147],{},[135,1240,1241],{"class":137,"line":186},[135,1242,364],{},[135,1244,1245],{"class":137,"line":192},[135,1246,195],{},[135,1248,1249],{"class":137,"line":198},[135,1250,201],{},[135,1252,1253],{"class":137,"line":204},[135,1254,207],{},[135,1256,1257],{"class":137,"line":210},[135,1258,213],{},[135,1260,1261],{"class":137,"line":216},[135,1262,1263],{},"    created_at TIMESTAMP,\n",[135,1265,1266],{"class":137,"line":222},[135,1267,1268],{},"    updated_at TIMESTAMP\n",[135,1270,1271],{"class":137,"line":228},[135,1272,165],{},[135,1274,1275],{"class":137,"line":233},[135,1276,172],{"emptyLinePlaceholder":171},[135,1278,1279],{"class":137,"line":238},[135,1280,1281],{},"CREATE INDEX idx_products_category ON public.products(category_id);\n",[118,1283,1285],{"id":1284},"stream-configuration","Stream configuration",[15,1287,1288,1289,1292,1293,1296,1297,1300,1301,1303,1304,1307,1308,1310,1311,101],{},"Same shape as direction 1. Keep ",[46,1290,1291],{},"target.spec.db.schemaPolicy"," set to ",[46,1294,1295],{},"create_missing_only"," for a new empty target, or switch to ",[46,1298,1299],{},"validate_existing"," if you pre-created the target tables. The ",[94,1302,776],{}," footer starts with ",[46,1305,1306],{},"MySQL binlog",", and ",[46,1309,799],{}," shows a binlog-style handoff like ",[46,1312,1313],{},"mysql-bin.000176:79269",[118,1315,856],{"id":1316},"run-live-cdc-operations-1",[15,1318,1319],{},"On the MySQL source:",[126,1321,1323],{"className":128,"code":1322,"language":130,"meta":131,"style":131},"INSERT INTO categories (id, name)\nVALUES (11, 'Category_LIVE_11');\n\nINSERT INTO products (id, category_id, name, sku, price, stock)\nVALUES\n    (1001, 11, 'LIVE_Product_1001', 'SKU-001001', 19.99, 100),\n    (1002, 11, 'LIVE_Product_1002', 'SKU-001002', 29.99,  50),\n    (1003, 11, 'LIVE_Product_1003', 'SKU-001003', 39.99,  25);\n\nUPDATE products\nSET price = 999.99,\n    updated_at = NOW()\nWHERE id IN (1, 2, 3);\n\nUPDATE categories\nSET name = 'Category_1_UPDATED'\nWHERE id = 1;\n\nDELETE FROM products WHERE id = 1002;\n",[46,1324,1325,1329,1334,1338,1342,1347,1351,1355,1359,1363,1368,1373,1378,1383,1387,1392,1397,1402,1406],{"__ignoreMap":131},[135,1326,1327],{"class":137,"line":138},[135,1328,1106],{},[135,1330,1331],{"class":137,"line":144},[135,1332,1333],{},"VALUES (11, 'Category_LIVE_11');\n",[135,1335,1336],{"class":137,"line":150},[135,1337,172],{"emptyLinePlaceholder":171},[135,1339,1340],{"class":137,"line":156},[135,1341,1140],{},[135,1343,1344],{"class":137,"line":162},[135,1345,1346],{},"VALUES\n",[135,1348,1349],{"class":137,"line":168},[135,1350,884],{},[135,1352,1353],{"class":137,"line":175},[135,1354,889],{},[135,1356,1357],{"class":137,"line":181},[135,1358,894],{},[135,1360,1361],{"class":137,"line":186},[135,1362,172],{"emptyLinePlaceholder":171},[135,1364,1365],{"class":137,"line":192},[135,1366,1367],{},"UPDATE products\n",[135,1369,1370],{"class":137,"line":198},[135,1371,1372],{},"SET price = 999.99,\n",[135,1374,1375],{"class":137,"line":204},[135,1376,1377],{},"    updated_at = NOW()\n",[135,1379,1380],{"class":137,"line":210},[135,1381,1382],{},"WHERE id IN (1, 2, 3);\n",[135,1384,1385],{"class":137,"line":216},[135,1386,172],{"emptyLinePlaceholder":171},[135,1388,1389],{"class":137,"line":222},[135,1390,1391],{},"UPDATE categories\n",[135,1393,1394],{"class":137,"line":228},[135,1395,1396],{},"SET name = 'Category_1_UPDATED'\n",[135,1398,1399],{"class":137,"line":233},[135,1400,1401],{},"WHERE id = 1;\n",[135,1403,1404],{"class":137,"line":238},[135,1405,172],{"emptyLinePlaceholder":171},[135,1407,1408],{"class":137,"line":244},[135,1409,1410],{},"DELETE FROM products WHERE id = 1002;\n",[15,1412,1413,1414,1417],{},"After CDC applies those changes, the PostgreSQL target reconciles to ",[46,1415,1416],{},"cats=11, prods=1002"," with all updates and the delete applied:",[126,1419,1421],{"className":128,"code":1420,"language":130,"meta":131,"style":131},"SELECT (SELECT COUNT(*) FROM public.categories) AS cats,\n       (SELECT COUNT(*) FROM public.products)   AS prods;\n-- cats=11, prods=1002\n\nSELECT id, name FROM public.categories WHERE id IN (1, 11);\n-- 1  Category_1_UPDATED\n-- 11 Category_LIVE_11\n\nSELECT id, name, price FROM public.products WHERE id IN (1, 2, 3, 1001, 1002, 1003);\n-- 1     Product_1           999.99\n-- 2     Product_2           999.99\n-- 3     Product_3           999.99\n-- 1001  LIVE_Product_1001    19.99\n-- 1003  LIVE_Product_1003    39.99\n-- (1002 is gone because it was deleted)\n",[46,1422,1423,1428,1433,1438,1442,1447,1451,1455,1459,1464,1468,1472,1476,1480,1484],{"__ignoreMap":131},[135,1424,1425],{"class":137,"line":138},[135,1426,1427],{},"SELECT (SELECT COUNT(*) FROM public.categories) AS cats,\n",[135,1429,1430],{"class":137,"line":144},[135,1431,1432],{},"       (SELECT COUNT(*) FROM public.products)   AS prods;\n",[135,1434,1435],{"class":137,"line":150},[135,1436,1437],{},"-- cats=11, prods=1002\n",[135,1439,1440],{"class":137,"line":156},[135,1441,172],{"emptyLinePlaceholder":171},[135,1443,1444],{"class":137,"line":162},[135,1445,1446],{},"SELECT id, name FROM public.categories WHERE id IN (1, 11);\n",[135,1448,1449],{"class":137,"line":168},[135,1450,957],{},[135,1452,1453],{"class":137,"line":175},[135,1454,962],{},[135,1456,1457],{"class":137,"line":181},[135,1458,172],{"emptyLinePlaceholder":171},[135,1460,1461],{"class":137,"line":186},[135,1462,1463],{},"SELECT id, name, price FROM public.products WHERE id IN (1, 2, 3, 1001, 1002, 1003);\n",[135,1465,1466],{"class":137,"line":192},[135,1467,976],{},[135,1469,1470],{"class":137,"line":198},[135,1471,981],{},[135,1473,1474],{"class":137,"line":204},[135,1475,986],{},[135,1477,1478],{"class":137,"line":210},[135,1479,991],{},[135,1481,1482],{"class":137,"line":216},[135,1483,996],{},[135,1485,1486],{"class":137,"line":222},[135,1487,1488],{},"-- (1002 is gone because it was deleted)\n",[118,1490,1492],{"id":1491},"verify-offline-catch-up-after-restart","Verify offline catch-up after restart",[15,1494,1495],{},"This exercise uses direction 2, where MySQL is the source and PostgreSQL is the target. The same behavior applies in the opposite direction as long as the source log still contains the stopped interval.",[1497,1498,1499,1502],"ol",{},[43,1500,1501],{},"Stop the stream from the Monitor tab.",[43,1503,1504],{},"While the stream is stopped, run this on the MySQL source:",[126,1506,1508],{"className":128,"code":1507,"language":130,"meta":131,"style":131},"INSERT INTO categories (id, name)\nVALUES (12, 'Category_OFFLINE_12');\n\nINSERT INTO products (id, category_id, name, sku, price, stock)\nVALUES\n    (1004, 12, 'OFFLINE_Product_1004', 'SKU-001004', 49.99, 77),\n    (1005, 12, 'OFFLINE_Product_1005', 'SKU-001005', 69.99, 55);\n\nUPDATE products\nSET price = 55.55,\n    stock = 188,\n    updated_at = NOW()\nWHERE id = 1003;\n",[46,1509,1510,1514,1519,1523,1527,1531,1536,1541,1545,1549,1554,1559,1563],{"__ignoreMap":131},[135,1511,1512],{"class":137,"line":138},[135,1513,1106],{},[135,1515,1516],{"class":137,"line":144},[135,1517,1518],{},"VALUES (12, 'Category_OFFLINE_12');\n",[135,1520,1521],{"class":137,"line":150},[135,1522,172],{"emptyLinePlaceholder":171},[135,1524,1525],{"class":137,"line":156},[135,1526,1140],{},[135,1528,1529],{"class":137,"line":162},[135,1530,1346],{},[135,1532,1533],{"class":137,"line":168},[135,1534,1535],{},"    (1004, 12, 'OFFLINE_Product_1004', 'SKU-001004', 49.99, 77),\n",[135,1537,1538],{"class":137,"line":175},[135,1539,1540],{},"    (1005, 12, 'OFFLINE_Product_1005', 'SKU-001005', 69.99, 55);\n",[135,1542,1543],{"class":137,"line":181},[135,1544,172],{"emptyLinePlaceholder":171},[135,1546,1547],{"class":137,"line":186},[135,1548,1367],{},[135,1550,1551],{"class":137,"line":192},[135,1552,1553],{},"SET price = 55.55,\n",[135,1555,1556],{"class":137,"line":198},[135,1557,1558],{},"    stock = 188,\n",[135,1560,1561],{"class":137,"line":204},[135,1562,1377],{},[135,1564,1565],{"class":137,"line":210},[135,1566,1567],{},"WHERE id = 1003;\n",[1497,1569,1570],{"start":150},[43,1571,1572],{},"Before restarting the stream, check the PostgreSQL target. It should still reflect the pre-stop state:",[126,1574,1576],{"className":128,"code":1575,"language":130,"meta":131,"style":131},"SELECT (SELECT COUNT(*) FROM public.categories) AS cats,\n       (SELECT COUNT(*) FROM public.products)   AS prods;\n-- cats=11, prods=1002\n\nSELECT id, name FROM public.categories WHERE id = 12;\n-- no rows\n\nSELECT id, name, price, stock\nFROM public.products\nWHERE id IN (1003, 1004, 1005)\nORDER BY id;\n-- 1003 is still the old live row\n-- 1004 and 1005 are not present yet\n",[46,1577,1578,1582,1586,1590,1594,1599,1604,1608,1613,1618,1623,1628,1633],{"__ignoreMap":131},[135,1579,1580],{"class":137,"line":138},[135,1581,1427],{},[135,1583,1584],{"class":137,"line":144},[135,1585,1432],{},[135,1587,1588],{"class":137,"line":150},[135,1589,1437],{},[135,1591,1592],{"class":137,"line":156},[135,1593,172],{"emptyLinePlaceholder":171},[135,1595,1596],{"class":137,"line":162},[135,1597,1598],{},"SELECT id, name FROM public.categories WHERE id = 12;\n",[135,1600,1601],{"class":137,"line":168},[135,1602,1603],{},"-- no rows\n",[135,1605,1606],{"class":137,"line":175},[135,1607,172],{"emptyLinePlaceholder":171},[135,1609,1610],{"class":137,"line":181},[135,1611,1612],{},"SELECT id, name, price, stock\n",[135,1614,1615],{"class":137,"line":186},[135,1616,1617],{},"FROM public.products\n",[135,1619,1620],{"class":137,"line":192},[135,1621,1622],{},"WHERE id IN (1003, 1004, 1005)\n",[135,1624,1625],{"class":137,"line":198},[135,1626,1627],{},"ORDER BY id;\n",[135,1629,1630],{"class":137,"line":204},[135,1631,1632],{},"-- 1003 is still the old live row\n",[135,1634,1635],{"class":137,"line":210},[135,1636,1637],{},"-- 1004 and 1005 are not present yet\n",[1497,1639,1640,1643],{"start":156},[43,1641,1642],{},"Start the stream again.",[43,1644,1645],{},"After CDC catches up, run the same checks on the PostgreSQL target:",[126,1647,1649],{"className":128,"code":1648,"language":130,"meta":131,"style":131},"SELECT (SELECT COUNT(*) FROM public.categories) AS cats,\n       (SELECT COUNT(*) FROM public.products)   AS prods;\n-- cats=12, prods=1004\n\nSELECT id, name FROM public.categories WHERE id = 12;\n-- 12  Category_OFFLINE_12\n\nSELECT id, category_id, name, price, stock\nFROM public.products\nWHERE id IN (1003, 1004, 1005)\nORDER BY id;\n-- 1003  ... 55.55 188\n-- 1004  12  OFFLINE_Product_1004 49.99 77\n-- 1005  12  OFFLINE_Product_1005 69.99 55\n",[46,1650,1651,1655,1659,1664,1668,1672,1677,1681,1686,1690,1694,1698,1703,1708],{"__ignoreMap":131},[135,1652,1653],{"class":137,"line":138},[135,1654,1427],{},[135,1656,1657],{"class":137,"line":144},[135,1658,1432],{},[135,1660,1661],{"class":137,"line":150},[135,1662,1663],{},"-- cats=12, prods=1004\n",[135,1665,1666],{"class":137,"line":156},[135,1667,172],{"emptyLinePlaceholder":171},[135,1669,1670],{"class":137,"line":162},[135,1671,1598],{},[135,1673,1674],{"class":137,"line":168},[135,1675,1676],{},"-- 12  Category_OFFLINE_12\n",[135,1678,1679],{"class":137,"line":175},[135,1680,172],{"emptyLinePlaceholder":171},[135,1682,1683],{"class":137,"line":181},[135,1684,1685],{},"SELECT id, category_id, name, price, stock\n",[135,1687,1688],{"class":137,"line":186},[135,1689,1617],{},[135,1691,1692],{"class":137,"line":192},[135,1693,1622],{},[135,1695,1696],{"class":137,"line":198},[135,1697,1627],{},[135,1699,1700],{"class":137,"line":204},[135,1701,1702],{},"-- 1003  ... 55.55 188\n",[135,1704,1705],{"class":137,"line":210},[135,1706,1707],{},"-- 1004  12  OFFLINE_Product_1004 49.99 77\n",[135,1709,1710],{"class":137,"line":216},[135,1711,1712],{},"-- 1005  12  OFFLINE_Product_1005 69.99 55\n",[15,1714,1715],{},"The restart resumes from the saved CDC checkpoint. The initial snapshot is not repeated, and the target receives only the source changes that occurred after the last acknowledged checkpoint.",[32,1717,1719],{"id":1718},"what-each-card-actually-shows","What each card actually shows",[1721,1722,1723,1739],"table",{},[1724,1725,1726],"thead",{},[1727,1728,1729,1733,1736],"tr",{},[1730,1731,1732],"th",{},"Card",[1730,1734,1735],{},"When it appears",[1730,1737,1738],{},"What to look for",[1740,1741,1742,1763],"tbody",{},[1727,1743,1744,1747,1753],{},[1745,1746,776],"td",{},[1745,1748,1749,1750],{},"CDC streams with ",[46,1751,1752],{},"initialSnapshot.enabled=true",[1745,1754,1755,1756,1758,1759,1762],{},"Snapshot state, handoff position, latest acknowledged CDC position, and the status footer (",[46,1757,1306],{}," or ",[46,1760,1761],{},"PostgreSQL LSN",", PostgreSQL slot name when available, retry-safe apply, ordered per table).",[1727,1764,1765,1768,1771],{},[1745,1766,1767],{},"Tables",[1745,1769,1770],{},"All streams with table progress",[1745,1772,1773,1776],{},[46,1774,1775],{},"Finished"," status for each table once bootstrap copy completes.",[15,1778,1779,1780,1782],{},"After bootstrap reaches ",[46,1781,794],{},", the snapshot state keeps showing the handoff position. This is expected: the stored bootstrap state is frozen at handoff time, and restarts resume CDC from the saved checkpoint instead of re-running the snapshot.",[32,1784,1786],{"id":1785},"stop-and-start-behavior","Stop and start behavior",[15,1788,1789,1790,1792],{},"After bootstrap is ",[46,1791,794],{},":",[40,1794,1795,1802,1805],{},[43,1796,1797,1798,1801],{},"Stopping the stream and starting it again ",[94,1799,1800],{},"resumes CDC"," from the saved checkpoint. The initial snapshot is not re-run.",[43,1803,1804],{},"Source changes that happened while the stream was stopped are applied as long as the source log still contains that range.",[43,1806,1807,1808,1811],{},"If you wipe the target manually after bootstrap, the stream will not re-seed it — only future CDC events are applied. The current ",[46,1809,1810],{},"fail_until_reset"," restart policy deliberately leaves repair to the operator. To re-seed, reset the same stream config and then start it again as a fresh first run.",[32,1813,1815],{"id":1814},"common-pitfalls","Common pitfalls",[40,1817,1818,1830,1848,1854,1860],{},[43,1819,1820,1823,1824,1826,1827,1829],{},[94,1821,1822],{},"\"missing target tables\""," on Start — the stream is using ",[94,1825,100],{},", but target tables do not exist or their names do not match. Create them before starting, or use ",[94,1828,96],{}," for a new empty target.",[43,1831,1832,1835,1836,1839,1840,1843,1844,1847],{},[94,1833,1834],{},"\"all replication slots are in use\""," on Start (PostgreSQL) — ",[46,1837,1838],{},"max_replication_slots"," is full. Check Database Overview or the CDC wizard for slot usage such as ",[46,1841,1842],{},"3 \u002F 5 · 0 free",", then drop unused slots from prior test runs with ",[46,1845,1846],{},"SELECT pg_drop_replication_slot('name')"," or raise the limit.",[43,1849,1850,1853],{},[94,1851,1852],{},"Interrupted before bootstrap completes"," — partial bootstrap resume depends on the source and routing path. MySQL tables that routed to the resumable chunked path can continue from saved progress when the same config starts again. PostgreSQL bootstrap and MySQL plain-path tables still require reset before a fresh rerun.",[43,1855,1856,1859],{},[94,1857,1858],{},"Schema \"type diff\" warning on the Compare tab"," — cross-engine numeric or timestamp types rarely match byte-for-byte. This is informational and does not affect CDC correctness.",[43,1861,1862,1865],{},[94,1863,1864],{},"Rows out of order across tables"," — CDC is ordered per table, not globally across all tables. FK constraints on the target side can reject rows if the parent row is still in flight. Keep referential integrity enforced on the source; leave target-side FK constraints off or deferred for replication workloads.",[32,1867,1869],{"id":1868},"related-docs","Related docs",[40,1871,1872,1876,1882,1888],{},[43,1873,1874],{},[19,1875,29],{"href":21},[43,1877,1878],{},[19,1879,1881],{"href":1880},"\u002Fdocs\u002Fstreams\u002Fcdc-reliability-and-resume","CDC Reliability and Resume",[43,1883,1884],{},[19,1885,1887],{"href":1886},"\u002Fdocs\u002Fstreams\u002Fstream-config-reference","Stream Configuration Reference",[43,1889,1890],{},[19,1891,1893],{"href":1892},"\u002Fdocs\u002Fintegration\u002Fwhat-is-cdc","CDC Mode",[1895,1896,1897],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":131,"searchDepth":144,"depth":144,"links":1899},[1900,1901,1902,1910,1917,1918,1919,1920],{"id":34,"depth":144,"text":35},{"id":72,"depth":144,"text":73},{"id":115,"depth":144,"text":116,"children":1903},[1904,1905,1906,1907,1908,1909],{"id":120,"depth":150,"text":121},{"id":297,"depth":150,"text":298},{"id":405,"depth":150,"text":406},{"id":765,"depth":150,"text":766},{"id":828,"depth":150,"text":829},{"id":855,"depth":150,"text":856},{"id":1007,"depth":144,"text":1008,"children":1911},[1912,1913,1914,1915,1916],{"id":1014,"depth":150,"text":1015},{"id":1188,"depth":150,"text":1189},{"id":1284,"depth":150,"text":1285},{"id":1316,"depth":150,"text":856},{"id":1491,"depth":150,"text":1492},{"id":1718,"depth":144,"text":1719},{"id":1785,"depth":144,"text":1786},{"id":1814,"depth":144,"text":1815},{"id":1868,"depth":144,"text":1869},"End-to-end example of a CDC stream with initial snapshot, in both directions (PostgreSQL to MySQL and MySQL to PostgreSQL).","md",{},false,"\u002Fdocs\u002Fstreams\u002Finitial-load-and-cdc-walkthrough",null,{"title":5,"description":1921},"docs\u002Fstreams\u002Finitial-load-and-cdc-walkthrough","LrvNseo1ttTHE-eEM4sJqmvg3bgDg4mjRTecex_t7ig",1783896284819]