@@ -398,15 +398,11 @@ def test_archive_push_file_exists(self):
398
398
log_content )
399
399
400
400
self .assertIn (
401
- 'INFO: pg_probackup archive- push from ' ,
401
+ 'pg_probackup push file ' ,
402
402
log_content )
403
403
404
404
self .assertIn (
405
- 'ERROR: WAL segment ' ,
406
- log_content )
407
-
408
- self .assertIn (
409
- 'already exists.' ,
405
+ 'WAL file already exists in archive with different checksum' ,
410
406
log_content )
411
407
412
408
self .assertNotIn (
@@ -448,8 +444,7 @@ def test_archive_push_file_exists_overwrite(self):
448
444
base_dir = os .path .join (module_name , fname , 'node' ),
449
445
set_replication = True ,
450
446
initdb_params = ['--data-checksums' ],
451
- pg_options = {
452
- 'checkpoint_timeout' : '30s' })
447
+ pg_options = {'checkpoint_timeout' : '30s' })
453
448
454
449
self .init_pb (backup_dir )
455
450
self .add_instance (backup_dir , 'node' , node )
@@ -487,24 +482,32 @@ def test_archive_push_file_exists_overwrite(self):
487
482
self .assertIn (
488
483
'DETAIL: The failed archive command was:' , log_content )
489
484
self .assertIn (
490
- 'INFO: pg_probackup archive-push from' , log_content )
485
+ 'pg_probackup push file' , log_content )
486
+ self .assertNotIn (
487
+ 'WAL file already exists in archive with '
488
+ 'different checksum, overwriting' , log_content )
491
489
self .assertIn (
492
- '{0}" already exists.' .format (filename ), log_content )
490
+ 'WAL file already exists in archive with '
491
+ 'different checksum' , log_content )
493
492
494
493
self .assertNotIn (
495
494
'pg_probackup archive-push completed successfully' , log_content )
496
495
497
496
self .set_archiving (backup_dir , 'node' , node , overwrite = True )
498
497
node .reload ()
499
498
self .switch_wal_segment (node )
500
- sleep (2 )
499
+ sleep (5 )
501
500
502
501
with open (log_file , 'r' ) as f :
503
502
log_content = f .read ()
504
503
self .assertTrue (
505
504
'pg_probackup archive-push completed successfully' in log_content ,
506
505
'Expecting messages about successfull execution archive_command' )
507
506
507
+ self .assertIn (
508
+ 'WAL file already exists in archive with '
509
+ 'different checksum, overwriting' , log_content )
510
+
508
511
# Clean after yourself
509
512
self .del_test_dir (module_name , fname )
510
513
@@ -520,7 +523,7 @@ def test_archive_push_partial_file_exists(self):
520
523
521
524
self .init_pb (backup_dir )
522
525
self .add_instance (backup_dir , 'node' , node )
523
- self .set_archiving (backup_dir , 'node' , node )
526
+ self .set_archiving (backup_dir , 'node' , node , log_level = 'verbose' )
524
527
525
528
node .slow_start ()
526
529
@@ -579,12 +582,9 @@ def test_archive_push_partial_file_exists(self):
579
582
log_file = os .path .join (node .logs_dir , 'postgresql.log' )
580
583
with open (log_file , 'r' ) as f :
581
584
log_content = f .read ()
582
- self .assertIn (
583
- 'Cannot open destination temporary WAL file' ,
584
- log_content )
585
585
586
586
self .assertIn (
587
- 'Reusing stale destination temporary WAL file' ,
587
+ 'Reusing stale temp WAL file' ,
588
588
log_content )
589
589
590
590
# Clean after yourself
@@ -905,8 +905,8 @@ def test_basic_master_and_replica_concurrent_archiving(self):
905
905
initdb_params = ['--data-checksums' ],
906
906
pg_options = {
907
907
'checkpoint_timeout' : '30s' ,
908
- 'archive_timeout' : '10s' }
909
- )
908
+ 'archive_timeout' : '10s' })
909
+
910
910
replica = self .make_simple_node (
911
911
base_dir = os .path .join (module_name , fname , 'replica' ))
912
912
replica .cleanup ()
@@ -923,6 +923,8 @@ def test_basic_master_and_replica_concurrent_archiving(self):
923
923
"md5(repeat(i::text,10))::tsvector as tsvector "
924
924
"from generate_series(0,10000) i" )
925
925
926
+ master .pgbench_init (scale = 5 )
927
+
926
928
# TAKE FULL ARCHIVE BACKUP FROM MASTER
927
929
self .backup_node (backup_dir , 'master' , master )
928
930
# GET LOGICAL CONTENT FROM MASTER
@@ -1718,7 +1720,7 @@ def test_hexadecimal_timeline(self):
1718
1720
1719
1721
self .init_pb (backup_dir )
1720
1722
self .add_instance (backup_dir , 'node' , node )
1721
- self .set_archiving (backup_dir , 'node' , node )
1723
+ self .set_archiving (backup_dir , 'node' , node , log_level = 'verbose' )
1722
1724
node .slow_start ()
1723
1725
1724
1726
backup_id = self .backup_node (backup_dir , 'node' , node )
@@ -1734,6 +1736,8 @@ def test_hexadecimal_timeline(self):
1734
1736
node .slow_start ()
1735
1737
node .pgbench_init (scale = 2 )
1736
1738
1739
+ sleep (5 )
1740
+
1737
1741
show = self .show_archive (backup_dir )
1738
1742
1739
1743
timelines = show [0 ]['timelines' ]
0 commit comments