@@ -14,50 +14,43 @@ def setUp(self):
1414 self .fname = self .id ().split ('.' )[3 ]
1515
1616 # @unittest.expectedFailure
17- # @unittest.skip("skip")
17+ @unittest .skip ("skip" )
1818 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+
2033 self .verbose = True
2134 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+
3638 src_pg = self .make_simple_node (
3739 base_dir = os .path .join (module_name , self .fname , 'src' ),
3840 set_replication = True ,
39- # initdb_params=['--data-checksums']
4041 )
4142 src_pg .slow_start ()
4243 src_pg .safe_psql (
4344 "postgres" ,
4445 "CREATE TABLE ultimate_question AS SELECT 42 AS answer" )
4546
4647 # do full catchup
47- os .environ ['PG_CONFIG' ] = pg_config_ee_11
48- self .probackup_path = probackup_path_ee_11
49-
5048 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- # )
5649 self .catchup_node (
5750 backup_mode = 'FULL' ,
5851 source_pgdata = src_pg .data_dir ,
5952 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' ]
6154 )
6255
6356 dst_options = {}
@@ -70,12 +63,13 @@ def test_catchup_with_different_remote_major_pg(self):
7063 "postgres" ,
7164 "CREATE TABLE ultimate_question2 AS SELECT 42 AS answer" )
7265
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.
7568 self .catchup_node (
7669 backup_mode = 'DELTA' ,
7770 source_pgdata = src_pg .data_dir ,
7871 destination_node = dst_pg ,
72+ # here's substitution of --remoge-path pg_probackup agent compiled with another postgres version
7973 options = ['-d' , 'postgres' , '-p' , str (src_pg .port ), '--stream' , '--remote-path=' + pg_path_ee_9_6 ]
8074 )
8175
0 commit comments