@@ -161,8 +161,8 @@ ptrackMapInit(void)
161
161
if (stat (ptrack_path , & stat_buf ) == 0 &&
162
162
stat_buf .st_size != PtrackActualSize )
163
163
{
164
- elog (WARNING , "ptrack init: stat_buf.st_size != ptrack_map_size %zu != " UINT64_FORMAT ,
165
- (Size ) stat_buf .st_size , PtrackActualSize );
164
+ elog (WARNING , "ptrack init: unexpected \"%s\" file size %zu != " UINT64_FORMAT ", deleting" ,
165
+ ptrack_path , (Size ) stat_buf .st_size , PtrackActualSize );
166
166
durable_unlink (ptrack_path , LOG );
167
167
}
168
168
@@ -242,10 +242,13 @@ ptrackMapInit(void)
242
242
elog (DEBUG1 , "ptrack init: crc %u, file_crc %u, init_lsn %X/%X" ,
243
243
crc , * file_crc , (uint32 ) (init_lsn >> 32 ), (uint32 ) init_lsn );
244
244
245
- /* TODO Handle this error. Probably we can just recreate the file */
245
+ /* TODO: Handle this error. Probably we can just recreate the file */
246
246
if (!EQ_CRC32C (* file_crc , crc ))
247
247
{
248
- elog (ERROR , "ptrack init: incorrect checksum of file \"%s\"" , ptrack_path );
248
+ ereport (ERROR ,
249
+ (errcode (ERRCODE_DATA_CORRUPTED ),
250
+ errmsg ("ptrack init: incorrect checksum of file \"%s\"" , ptrack_path ),
251
+ errhint ("Delete \"%s\" and start the server again." , ptrack_path )));
249
252
}
250
253
}
251
254
else
0 commit comments