@@ -292,7 +292,7 @@ def test_tli_delta_catchup(self):
292292 src_pg .safe_psql ("postgres" , "CREATE TABLE ultimate_question AS SELECT 42 AS answer" )
293293 src_query_result = src_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
294294
295- # do catchup
295+ # do catchup (src_tli = 2, dst_tli = 1)
296296 self .catchup_node (
297297 backup_mode = 'DELTA' ,
298298 source_pgdata = src_pg .data_dir ,
@@ -310,15 +310,25 @@ def test_tli_delta_catchup(self):
310310 dst_options = {}
311311 dst_options ['port' ] = str (dst_pg .port )
312312 self .set_auto_conf (dst_pg , dst_options )
313- dst_pg .slow_start ()
313+ self .set_replica (master = src_pg , replica = dst_pg )
314+ dst_pg .slow_start (replica = True )
314315
315316 # 2nd check: run verification query
316317 dst_query_result = dst_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
317318 self .assertEqual (src_query_result , dst_query_result , 'Different answer from copy' )
318319
320+ dst_pg .stop ()
321+
322+ # do catchup (src_tli = 2, dst_tli = 2)
323+ self .catchup_node (
324+ backup_mode = 'DELTA' ,
325+ source_pgdata = src_pg .data_dir ,
326+ destination_node = dst_pg ,
327+ options = ['-d' , 'postgres' , '-p' , str (src_pg .port ), '--stream' ]
328+ )
329+
319330 # Cleanup
320331 src_pg .stop ()
321- dst_pg .stop ()
322332 self .del_test_dir (module_name , self .fname )
323333
324334 def test_tli_ptrack_catchup (self ):
@@ -365,7 +375,7 @@ def test_tli_ptrack_catchup(self):
365375 src_pg .safe_psql ("postgres" , "CREATE TABLE ultimate_question AS SELECT 42 AS answer" )
366376 src_query_result = src_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
367377
368- # do catchup
378+ # do catchup (src_tli = 2, dst_tli = 1)
369379 self .catchup_node (
370380 backup_mode = 'PTRACK' ,
371381 source_pgdata = src_pg .data_dir ,
@@ -383,15 +393,25 @@ def test_tli_ptrack_catchup(self):
383393 dst_options = {}
384394 dst_options ['port' ] = str (dst_pg .port )
385395 self .set_auto_conf (dst_pg , dst_options )
386- dst_pg .slow_start ()
396+ self .set_replica (master = src_pg , replica = dst_pg )
397+ dst_pg .slow_start (replica = True )
387398
388399 # 2nd check: run verification query
389400 dst_query_result = dst_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
390401 self .assertEqual (src_query_result , dst_query_result , 'Different answer from copy' )
391402
403+ dst_pg .stop ()
404+
405+ # do catchup (src_tli = 2, dst_tli = 2)
406+ self .catchup_node (
407+ backup_mode = 'PTRACK' ,
408+ source_pgdata = src_pg .data_dir ,
409+ destination_node = dst_pg ,
410+ options = ['-d' , 'postgres' , '-p' , str (src_pg .port ), '--stream' ]
411+ )
412+
392413 # Cleanup
393414 src_pg .stop ()
394- dst_pg .stop ()
395415 self .del_test_dir (module_name , self .fname )
396416
397417#########################################
0 commit comments