Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4489153

Browse files
committed
Fix bug in cfs_verify_file
1 parent 0965e2d commit 4489153

File tree

1 file changed

+2
-2
lines changed
  • src/backend/storage/file

1 file changed

+2
-2
lines changed

src/backend/storage/file/cfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ static bool cfs_gc_file(char* map_path, bool noerror)
908908
{
909909
inode_t inode = newMap->inodes[i];
910910
int size = CFS_INODE_SIZE(inode);
911-
if (size != 0)
911+
if (size != 0 && size < BLCKSZ)
912912
{
913913
char block[BLCKSZ];
914914
char decomressedBlock[BLCKSZ];
@@ -926,7 +926,7 @@ static bool cfs_gc_file(char* map_path, bool noerror)
926926
pg_atomic_fetch_sub_u32(&map->lock, CFS_GC_LOCK); /* release lock */
927927
/* TODO Is it worth to PANIC or ERROR will be enough? */
928928
elog(PANIC, "Verification failed for block %d of relation %s: error code %d",
929-
i, file_path, (int)res);
929+
i, file_bck_path, (int)res);
930930
}
931931
}
932932
}

0 commit comments

Comments
 (0)