@@ -14,50 +14,43 @@ def setUp(self):
14
14
self .fname = self .id ().split ('.' )[3 ]
15
15
16
16
# @unittest.expectedFailure
17
- # @unittest.skip("skip")
17
+ @unittest .skip ("skip" )
18
18
def test_catchup_with_different_remote_major_pg (self ):
19
- "Decription in jira issue PBCKP-236" #TODO REVIEW XXX explain the test
19
+ """
20
+ Decription in jira issue PBCKP-236
21
+ This test requires builds both PGPROEE11 and PGPROEE9_6
22
+
23
+ prerequisites:
24
+ - git tag for PBCKP 2.5.1
25
+ - master probackup build should be inside PGPROEE11
26
+ - agent probackup build is inside PGPROEE9_6
27
+
28
+ calling probackup PGPROEE9_6 agent from PGPROEE11 probackup master for DELTA backup causes the PBCKP-236 problem
29
+
30
+ please correct path for agent's pg_path_ee_9_6 = '/home/avaness/postgres/postgres.build.ee.9.6/bin/'
31
+ """
32
+
20
33
self .verbose = True
21
34
self .remote = True
22
- pg_config = os .environ ['PG_CONFIG' ]
23
- pg_path_ee_9_6 = '/home/avaness/postgres/postgres.build.9.6/bin/'
24
- pg_config_ee_9_6 = pg_path_ee_9_6 + 'pg_config'
25
- probackup_path_ee_9_6 = pg_path_ee_9_6 + 'pg_probackup'
26
- pg_path_ee_11 = '/home/avaness/postgres/postgres.build.11/bin/'
27
- pg_config_ee_11 = pg_path_ee_11 + 'pg_config'
28
- probackup_path_ee_11 = pg_path_ee_11 + 'pg_probackup'
29
-
30
- os .environ ['PG_CONFIG' ] = pg_config_ee_11
31
- self .probackup_path = probackup_path_ee_11
32
- # os.environ['PG_CONFIG'] = pg_config_ee_9_6
33
- # self.probackup_path = probackup_path_ee_9_6
34
-
35
- # backup_dir = os.path.join(self.tmp_path, module_name, self.fname, 'backup')
35
+ # please use your own local path
36
+ pg_path_ee_9_6 = '/home/avaness/postgres/postgres.build.ee.9.6/bin/'
37
+
36
38
src_pg = self .make_simple_node (
37
39
base_dir = os .path .join (module_name , self .fname , 'src' ),
38
40
set_replication = True ,
39
- # initdb_params=['--data-checksums']
40
41
)
41
42
src_pg .slow_start ()
42
43
src_pg .safe_psql (
43
44
"postgres" ,
44
45
"CREATE TABLE ultimate_question AS SELECT 42 AS answer" )
45
46
46
47
# do full catchup
47
- os .environ ['PG_CONFIG' ] = pg_config_ee_11
48
- self .probackup_path = probackup_path_ee_11
49
-
50
48
dst_pg = self .make_empty_node (os .path .join (module_name , self .fname , 'dst' ))
51
- # dst_pg = self.make_simple_node(
52
- # base_dir=os.path.join(module_name, self.fname, 'dst'),
53
- # set_replication=True,
54
- # # initdb_params=['--data-checksums']
55
- # )
56
49
self .catchup_node (
57
50
backup_mode = 'FULL' ,
58
51
source_pgdata = src_pg .data_dir ,
59
52
destination_node = dst_pg ,
60
- options = ['-d' , 'postgres' , '-p' , str (src_pg .port ), '--stream' ]#, '--remote-path=' + pg_path_ee_9_6]
53
+ options = ['-d' , 'postgres' , '-p' , str (src_pg .port ), '--stream' ]
61
54
)
62
55
63
56
dst_options = {}
@@ -70,12 +63,13 @@ def test_catchup_with_different_remote_major_pg(self):
70
63
"postgres" ,
71
64
"CREATE TABLE ultimate_question2 AS SELECT 42 AS answer" )
72
65
73
- # do delta catchup
74
- #TODO REVIEW XXX try to apply only one catchup (FULL) for test failure
66
+ # do delta catchup with remote pg_probackup agent with another postgres major version
67
+ # this DELTA backup should fail without PBCKP-236 patch.
75
68
self .catchup_node (
76
69
backup_mode = 'DELTA' ,
77
70
source_pgdata = src_pg .data_dir ,
78
71
destination_node = dst_pg ,
72
+ # here's substitution of --remoge-path pg_probackup agent compiled with another postgres version
79
73
options = ['-d' , 'postgres' , '-p' , str (src_pg .port ), '--stream' , '--remote-path=' + pg_path_ee_9_6 ]
80
74
)
81
75
0 commit comments