Skip to content

Commit 7669343

Browse files
knizhnikvbwagner
authored andcommitted
Fix EE merge bugs
1 parent c341722 commit 7669343

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
}
@@ -2149,9 +2148,7 @@ FileSeek(File file, off_t offset, int whence)
21492148
VfdCache[file].seekPos = fileSize - offset;
21502149
}
21512150
else
2152-
if (FileAccess(file) < 0)
2153-
return (off_t) -1;
2154-
vfdP->seekPos = lseek(vfdP->fd, offset, whence);
2151+
vfdP->seekPos = lseek(vfdP->fd, offset, whence);
21552152

21562153
break;
21572154
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