Skip to content

Commit e288375

Browse files
author
Sokolov Yura
committed
fix previous commit
1 parent 3422764 commit e288375

File tree

1 file changed

+2
-1
lines changed
  • src/backend/storage/file

1 file changed

+2
-1
lines changed

src/backend/storage/file/fd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1695,6 +1695,7 @@ void
16951695
FileWriteback(File file, off_t offset, off_t nbytes)
16961696
{
16971697
int returnCode;
1698+
FileMap *map = NULL;
16981699

16991700
Assert(FileIsValid(file));
17001701

@@ -1715,7 +1716,6 @@ FileWriteback(File file, off_t offset, off_t nbytes)
17151716

17161717
if (VfdCache[file].fileFlags & PG_COMPRESSION)
17171718
{
1718-
FileMap *map = VfdCache[file].map;
17191719
inode_t inode;
17201720
uint32 i = (uint32)(offset / BLCKSZ);
17211721
uint32 end = (uint32)((offset + nbytes + (BLCKSZ-1)) / BLCKSZ);
@@ -1727,6 +1727,7 @@ FileWriteback(File file, off_t offset, off_t nbytes)
17271727
/* if GC is in progress, no need to flush this file */
17281728
if (!FileLock(file))
17291729
return;
1730+
map = VfdCache[file].map;
17301731
virtSize = pg_atomic_read_u32(&map->hdr.virtSize);
17311732
/* in fact, we should not be here. Should it be Assert? */
17321733
if (virtSize / BLCKSZ < end)

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