@@ -556,7 +556,7 @@ void cfs_lock_file(FileMap* map, char const* file_path)
556
556
}
557
557
else
558
558
{
559
- if (! pg_atomic_unlocked_test_flag (& cfs_state -> gc_started ))
559
+ if (pg_atomic_unlocked_test_flag (& cfs_state -> gc_started ))
560
560
{
561
561
if (++ n_attempts > MAX_LOCK_ATTEMPTS )
562
562
{
@@ -566,6 +566,7 @@ void cfs_lock_file(FileMap* map, char const* file_path)
566
566
* We should revoke the the lock to allow access to this segment.
567
567
*/
568
568
revokeLock = true;
569
+ elog (WARNING , "CFS revokes lock on file %s\n" , file_path );
569
570
}
570
571
}
571
572
else
@@ -583,6 +584,8 @@ void cfs_lock_file(FileMap* map, char const* file_path)
583
584
char * map_bck_path = psprintf ("%s.cfm.bck" , file_path );
584
585
char * file_bck_path = psprintf ("%s.bck" , file_path );
585
586
587
+ elog (WARNING , "CFS indicates that GC of %s was interrupted: try to perform recovery" , file_path );
588
+
586
589
if (access (file_bck_path , R_OK ) != 0 )
587
590
{
588
591
/* There is no backup file: new map should be constructed */
@@ -742,6 +745,7 @@ static bool cfs_gc_file(char* map_path, bool noerror)
742
745
/* Uhhh... looks like last GC was interrupted.
743
746
* Try to recover file
744
747
*/
748
+ elog (WARNING , "CFS indicates that last GC of %s was interrupted: perform recovery" , file_bck_path );
745
749
if (access (file_bck_path , R_OK ) != 0 )
746
750
{
747
751
/* There is no backup file: new map should be constructed */
0 commit comments