@@ -209,20 +209,10 @@ ptrackMapReadFromFile(const char *ptrack_path)
209
209
210
210
if (!EQ_CRC32C (* file_crc , crc ))
211
211
{
212
- /*
213
- * This is ERROR now, because tests.ptrack.PtrackTest.test_corrupt_ptrack_map
214
- * threats this as error with exact error message
215
- * see https://github.com/postgrespro/pg_probackup/blob/a454bd7d63e1329b2c46db6a71aa263ac7621cc6/tests/ptrack.py#L4378
216
- */
217
- /*ereport(WARNING,
212
+ ereport (WARNING ,
218
213
(errcode (ERRCODE_DATA_CORRUPTED ),
219
214
errmsg ("ptrack read map: incorrect checksum of file \"%s\"" , ptrack_path ),
220
215
errdetail ("Deleting file \"%s\" and reinitializing ptrack map." , ptrack_path )));
221
- */
222
- ereport (ERROR ,
223
- (errcode (ERRCODE_DATA_CORRUPTED ),
224
- errmsg ("ptrack init: incorrect checksum of file \"%s\"" , ptrack_path ),
225
- errdetail ("Deleting file \"%s\" and reinitializing ptrack map." , ptrack_path )));
226
216
return false;
227
217
}
228
218
}
@@ -301,21 +291,6 @@ ptrackMapInit(void)
301
291
* so leave it as it is
302
292
*/
303
293
}
304
-
305
- /*
306
- * Very ugly fix:
307
- * create empty old mmap'ed file to make tests.ptrack.PtrackTest.test_corrupt_ptrack_map happy
308
- * see https://github.com/postgrespro/pg_probackup/blob/a454bd7d63e1329b2c46db6a71aa263ac7621cc6/tests/ptrack.py#L4341
309
- *
310
- * TODO: remove this shit
311
- */
312
- elog (WARNING , "ptrack init: not production ready code!" );
313
- {
314
- char old_file [MAXPGPATH ];
315
- sprintf (old_file , "%s/global/ptrack.map.mmap" , DataDir );
316
- unlink (old_file );
317
- copy_file ("/dev/null" , old_file );
318
- }
319
294
}
320
295
321
296
/*
0 commit comments