Skip to content

Commit 6f6c1a7

Browse files
committed
Fix EE merge bugs
1 parent b34054b commit 6f6c1a7

File tree

1 file changed

+4
-7
lines changed
  • src/backend/storage/file

1 file changed

+4
-7
lines changed

src/backend/storage/file/fd.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -981,9 +981,6 @@ LruDelete(File file)
981981

982982
vfdP = &VfdCache[file];
983983

984-
/* delete the vfd record from the LRU ring */
985-
Delete(file);
986-
987984
if (vfdP->fileFlags & PG_COMPRESSION)
988985
{
989986
if (cfs_munmap(vfdP->map))
@@ -1022,6 +1019,9 @@ LruDelete(File file)
10221019
if (close(vfdP->fd))
10231020
elog(LOG, "could not close file \"%s\": %m", vfdP->fileName);
10241021
vfdP->fd = VFD_CLOSED;
1022+
1023+
/* delete the vfd record from the LRU ring */
1024+
Delete(file);
10251025
}
10261026

10271027
static void
@@ -1128,7 +1128,6 @@ LruInsert(File file)
11281128
vfdP->fileName);
11291129
(void) close(vfdP->fd);
11301130
vfdP->fd = VFD_CLOSED;
1131-
--nfile;
11321131
errno = save_errno;
11331132
return -1;
11341133
}
@@ -2169,9 +2168,7 @@ FileSeek(File file, off_t offset, int whence)
21692168
VfdCache[file].seekPos = fileSize - offset;
21702169
}
21712170
else
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

21762173
break;
21772174
default:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy