@@ -292,7 +292,7 @@ def test_tli_delta_catchup(self):
292
292
src_pg .safe_psql ("postgres" , "CREATE TABLE ultimate_question AS SELECT 42 AS answer" )
293
293
src_query_result = src_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
294
294
295
- # do catchup
295
+ # do catchup (src_tli = 2, dst_tli = 1)
296
296
self .catchup_node (
297
297
backup_mode = 'DELTA' ,
298
298
source_pgdata = src_pg .data_dir ,
@@ -310,15 +310,25 @@ def test_tli_delta_catchup(self):
310
310
dst_options = {}
311
311
dst_options ['port' ] = str (dst_pg .port )
312
312
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 )
314
315
315
316
# 2nd check: run verification query
316
317
dst_query_result = dst_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
317
318
self .assertEqual (src_query_result , dst_query_result , 'Different answer from copy' )
318
319
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
+
319
330
# Cleanup
320
331
src_pg .stop ()
321
- dst_pg .stop ()
322
332
self .del_test_dir (module_name , self .fname )
323
333
324
334
def test_tli_ptrack_catchup (self ):
@@ -365,7 +375,7 @@ def test_tli_ptrack_catchup(self):
365
375
src_pg .safe_psql ("postgres" , "CREATE TABLE ultimate_question AS SELECT 42 AS answer" )
366
376
src_query_result = src_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
367
377
368
- # do catchup
378
+ # do catchup (src_tli = 2, dst_tli = 1)
369
379
self .catchup_node (
370
380
backup_mode = 'PTRACK' ,
371
381
source_pgdata = src_pg .data_dir ,
@@ -383,15 +393,25 @@ def test_tli_ptrack_catchup(self):
383
393
dst_options = {}
384
394
dst_options ['port' ] = str (dst_pg .port )
385
395
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 )
387
398
388
399
# 2nd check: run verification query
389
400
dst_query_result = dst_pg .safe_psql ("postgres" , "SELECT * FROM ultimate_question" )
390
401
self .assertEqual (src_query_result , dst_query_result , 'Different answer from copy' )
391
402
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
+
392
413
# Cleanup
393
414
src_pg .stop ()
394
- dst_pg .stop ()
395
415
self .del_test_dir (module_name , self .fname )
396
416
397
417
#########################################
0 commit comments