@@ -149,7 +149,10 @@ def test_page_stream(self):
149149 page_result = node .execute ("postgres" , "SELECT * FROM t_heap" )
150150 page_backup_id = self .backup_node (
151151 backup_dir , 'node' , node ,
152- backup_type = 'page' , options = ['--stream' ])
152+ backup_type = 'page' , options = ['--stream' , '-j' , '4' ])
153+
154+ if self .paranoia :
155+ pgdata = self .pgdata_content (node .data_dir )
153156
154157 # Drop Node
155158 node .cleanup ()
@@ -162,6 +165,12 @@ def test_page_stream(self):
162165 backup_id = full_backup_id , options = ["-j" , "4" ]),
163166 '\n Unexpected Error Message: {0}\n '
164167 ' CMD: {1}' .format (repr (self .output ), self .cmd ))
168+
169+ # GET RESTORED PGDATA AND COMPARE
170+ if self .paranoia :
171+ pgdata_restored = self .pgdata_content (node .data_dir )
172+ self .compare_pgdata (pgdata , pgdata_restored )
173+
165174 node .slow_start ()
166175 full_result_new = node .execute ("postgres" , "SELECT * FROM t_heap" )
167176 self .assertEqual (full_result , full_result_new )
@@ -211,7 +220,7 @@ def test_page_archive(self):
211220 node .safe_psql (
212221 "postgres" ,
213222 "create table t_heap as select i as id, md5(i::text) as text, "
214- "md5(i::text)::tsvector as tsvector from generate_series(0,1 ) i" )
223+ "md5(i::text)::tsvector as tsvector from generate_series(0,100 ) i" )
215224 full_result = node .execute ("postgres" , "SELECT * FROM t_heap" )
216225 full_backup_id = self .backup_node (
217226 backup_dir , 'node' , node , backup_type = 'full' )
@@ -221,10 +230,14 @@ def test_page_archive(self):
221230 "postgres" ,
222231 "insert into t_heap select i as id, "
223232 "md5(i::text) as text, md5(i::text)::tsvector as tsvector "
224- "from generate_series(0,2 ) i" )
233+ "from generate_series(100, 200 ) i" )
225234 page_result = node .execute ("postgres" , "SELECT * FROM t_heap" )
226235 page_backup_id = self .backup_node (
227- backup_dir , 'node' , node , backup_type = 'page' )
236+ backup_dir , 'node' , node ,
237+ backup_type = 'page' , options = ["-j" , "4" ])
238+
239+ if self .paranoia :
240+ pgdata = self .pgdata_content (node .data_dir )
228241
229242 # Drop Node
230243 node .cleanup ()
@@ -241,6 +254,7 @@ def test_page_archive(self):
241254 "--recovery-target-action=promote" ]),
242255 '\n Unexpected Error Message: {0}\n CMD: {1}' .format (
243256 repr (self .output ), self .cmd ))
257+
244258 node .slow_start ()
245259
246260 full_result_new = node .execute ("postgres" , "SELECT * FROM t_heap" )
@@ -259,6 +273,12 @@ def test_page_archive(self):
259273 "--recovery-target-action=promote" ]),
260274 '\n Unexpected Error Message: {0}\n CMD: {1}' .format (
261275 repr (self .output ), self .cmd ))
276+
277+ # GET RESTORED PGDATA AND COMPARE
278+ if self .paranoia :
279+ pgdata_restored = self .pgdata_content (node .data_dir )
280+ self .compare_pgdata (pgdata , pgdata_restored )
281+
262282 node .slow_start ()
263283
264284 page_result_new = node .execute ("postgres" , "SELECT * FROM t_heap" )
0 commit comments