@@ -556,7 +556,7 @@ void cfs_lock_file(FileMap* map, char const* file_path)
556556}
557557else
558558{
559- if (! pg_atomic_unlocked_test_flag (& cfs_state -> gc_started ))
559+ if (pg_atomic_unlocked_test_flag (& cfs_state -> gc_started ))
560560{
561561if (++ n_attempts > MAX_LOCK_ATTEMPTS )
562562{
@@ -566,6 +566,7 @@ void cfs_lock_file(FileMap* map, char const* file_path)
566566 * We should revoke the the lock to allow access to this segment.
567567 */
568568revokeLock = true;
569+ elog (WARNING ,"CFS revokes lock on file %s\n" ,file_path );
569570}
570571}
571572else
@@ -583,6 +584,8 @@ void cfs_lock_file(FileMap* map, char const* file_path)
583584char * map_bck_path = psprintf ("%s.cfm.bck" ,file_path );
584585char * file_bck_path = psprintf ("%s.bck" ,file_path );
585586
587+ elog (WARNING ,"CFS indicates that GC of %s was interrupted: try to perform recovery" ,file_path );
588+
586589if (access (file_bck_path ,R_OK )!= 0 )
587590{
588591/* There is no backup file: new map should be constructed */
@@ -742,6 +745,7 @@ static bool cfs_gc_file(char* map_path, bool noerror)
742745/* Uhhh... looks like last GC was interrupted.
743746 * Try to recover file
744747 */
748+ elog (WARNING ,"CFS indicates that last GC of %s was interrupted: perform recovery" ,file_bck_path );
745749if (access (file_bck_path ,R_OK )!= 0 )
746750{
747751/* There is no backup file: new map should be constructed */