@@ -981,9 +981,6 @@ LruDelete(File file)
981981
982982vfdP = & VfdCache [file ];
983983
984- /* delete the vfd record from the LRU ring */
985- Delete (file );
986-
987984if (vfdP -> fileFlags & PG_COMPRESSION )
988985{
989986if (cfs_munmap (vfdP -> map ))
@@ -1022,6 +1019,9 @@ LruDelete(File file)
10221019if (close (vfdP -> fd ))
10231020elog (LOG ,"could not close file \"%s\": %m" ,vfdP -> fileName );
10241021vfdP -> fd = VFD_CLOSED ;
1022+
1023+ /* delete the vfd record from the LRU ring */
1024+ Delete (file );
10251025}
10261026
10271027static void
@@ -1128,7 +1128,6 @@ LruInsert(File file)
11281128vfdP -> fileName );
11291129(void )close (vfdP -> fd );
11301130vfdP -> fd = VFD_CLOSED ;
1131- -- nfile ;
11321131errno = save_errno ;
11331132return -1 ;
11341133}
@@ -2169,9 +2168,7 @@ FileSeek(File file, off_t offset, int whence)
21692168VfdCache [file ].seekPos = fileSize - offset ;
21702169 }
21712170else
2172- if (FileAccess (file )< 0 )
2173- return (off_t )- 1 ;
2174- vfdP -> seekPos = lseek (vfdP -> fd ,offset ,whence );
2171+ vfdP -> seekPos = lseek (vfdP -> fd ,offset ,whence );
21752172
21762173break ;
21772174default :